Add Gradle OneJar plugin

For creation of a self-contained executable jar.

Run:
 - `./gradle executableJar`
 - `java -jar ./build/libs/bitsquare.jar

Note that actually executing the jar fails with an exception from
io.bitsquare.util.AppDirectoryUtil.createDirIfNotExists. This will be
fixed later. The purpose of this commit is only to establish the
executable jar infrastructure.
This commit is contained in:
Chris Beams 2014-08-28 13:39:01 +02:00
parent 0501965b99
commit bf7e46d1d5
No known key found for this signature in database
GPG Key ID: 3D214F8F5BC5ED73

View File

@ -1,5 +1,15 @@
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.github.rholder:gradle-one-jar:1.0.4'
}
}
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'gradle-one-jar'
version = '0.1.0-SNAPSHOT'
sourceCompatibility = 1.8
@ -7,6 +17,11 @@ mainClassName = 'io.bitsquare.BitSquare'
sourceSets.main.resources.srcDirs += 'src/main/java'
task executableJar(type: OneJar) {
mainClass = project.mainClassName
archiveName = 'bitsquare.jar'
}
repositories {
jcenter()
mavenLocal()