Created
September 18, 2014 04:37
-
-
Save yoshi0309/37e19e36f2211d9bddd7 to your computer and use it in GitHub Desktop.
Gradle template for Batch Project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: "java" | |
apply plugin: "eclipse" | |
compileJava.options.encoding = "UTF-8" | |
//version = '0.1-SNAPSHOT' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
compile( | |
'org.apache.solr:solr-solrj:4.10.0', | |
'org.elasticsearch:elasticsearch:1.3.2', | |
'org.springframework:spring-aop:3.2.0.RELEASE', | |
'org.springframework:spring-context-support:3.2.0.RELEASE', | |
'org.springframework:spring-expression:3.2.0.RELEASE', | |
'org.springframework:spring-oxm:3.2.0.RELEASE', | |
'org.springframework:spring-tx:3.2.0.RELEASE', | |
'org.mybatis:mybatis:3.2.2', | |
'com.fasterxml.jackson.core:jackson-databind:2.4.2', | |
'org.freemarker:freemarker:2.3.20', | |
'commons-cli:commons-cli:1.2', | |
'commons-beanutils:commons-beanutils:1.7.0', | |
'org.apache.poi:poi-ooxml:3.9', | |
'net.sf.opencsv:opencsv:2.3' | |
) | |
testCompile "junit:junit:4.11" | |
runtime files('lib/db2jcc4.jar') | |
} | |
//jarの対象から設定ファイル類を除外。 | |
jar { | |
excludes = ['*.xml','*.properties','**/sqlmapping*'] | |
} | |
// Application をビルド ****** | |
task buildCopyLib(type: Copy, dependsOn: build) { | |
into "$buildDir/app/lib" | |
from configurations.runtime | |
} | |
task buildCopyAppJar(type: Copy, dependsOn: buildCopyLib) { | |
into "$buildDir/app" | |
from jar.archivePath | |
from "$projectDir/src/bat" | |
} | |
task buildCopyConfig(type: Copy, dependsOn: buildCopyAppJar) { | |
into "$buildDir/app/config" | |
from sourceSets.main.output.resourcesDir | |
} | |
task buildApp(type: Copy, dependsOn: buildCopyConfig) { | |
} | |
// ここまで | |
task wrapper(type: Wrapper) { | |
gradleVersion = '2.1' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment