Thursday, November 28, 2013

Gradle - Sample build.gradle for Batch

This Gradle file is for batch.

apply plugin: 'java'
// Version number adhere to the name of zip file.
version = ''
// apply from: 'gradle/maven.gradle'
defaultTasks = ['assemble']
sourceCompatibility = '1.7'
targetCompatibility = '1.7'
archivesBaseName = 'vertxWebSocketServer'
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
compile group: 'commons-configuration', name: 'commons-configuration', version: '1.6'
compile group: 'commons-daemon', name: 'commons-daemon', version: '1.0.15'
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.5'
runtime group: 'org.slf4j', name: 'jcl-over-slf4j', version: '1.7.5'
compile group: 'ch.qos.logback', name: 'logback-core', version: '1.0.13'
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.0.13'
compile group: 'org.springframework', name: 'spring-core', version: '3.1.4.RELEASE'
compile group: 'org.springframework', name: 'spring-context', version: '3.1.4.RELEASE'
compile group: 'org.springframework', name: 'spring-context-support', version: '3.1.4.RELEASE'
compile group: 'org.springmodules', name: 'spring-modules-jakarta-commons', version: '0.9'
compile group: 'io.vertx', name: 'vertx-core', version: '2.0.2-final'
compile group: 'io.vertx', name: 'vertx-platform', version: '2.0.2-final'
}
task batch(type: Zip) {
from 'src/dist'
from jar.outputs.files
baseName = 'vertxWebSocketServer'
into('libs') {
from configurations.runtime
}
}
batch.dependsOn(assemble)
//assemble.dependsOn(batch)
view raw build.gradle hosted with ❤ by GitHub

No comments:

Post a Comment