diff --git a/build.gradle-template b/build.gradle-template index 8af1b54..14cb9dd 100644 --- a/build.gradle-template +++ b/build.gradle-template @@ -57,6 +57,15 @@ dependencies { /*==== You probably don't have to edit below this line =======*/ +// The run task added by the application plugin +// is also of type JavaExec. +tasks.withType(JavaExec) { + // Assign all Java system properties from + // the command line to the JavaExec task. + systemProperties System.properties +} + + protobuf { // Configure the protoc executable protoc { diff --git a/meerkat-common/build.gradle b/meerkat-common/build.gradle index b744fcd..236bd82 100644 --- a/meerkat-common/build.gradle +++ b/meerkat-common/build.gradle @@ -57,6 +57,16 @@ dependencies { /*==== You probably don't have to edit below this line =======*/ + +// The run task added by the application plugin +// is also of type JavaExec. +tasks.withType(JavaExec) { + // Assign all Java system properties from + // the command line to the JavaExec task. + systemProperties System.properties +} + + protobuf { // Configure the protoc executable protoc { @@ -91,33 +101,6 @@ idea { * "Fat" Build targets *===================================*/ -task fatjar(type: Jar) { - description = "Generate a single jar containing everything. Use -Pfatmain=... to override main class" - - destinationDir = buildDir - - def fatMain = hasProperty('fatmain') ? fatmain : mainClassName - def testJar = hasProperty('test') - - appendix = "${fatMain}-fat" - - if (testJar) { - from sourceSets.test.output - from configurations.testRuntime.collect { it.isDirectory() ? it : zipTree(it) } - } - - from sourceSets.main.output // that's it - from { configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) } } - - exclude 'META-INF/MANIFEST.MF' - exclude 'META-INF/*.SF' - exclude 'META-INF/*.DSA' - exclude 'META-INF/*.RSA' - - - manifest { attributes 'Main-Class': fatMain } -} - task mavenCapsule(type: MavenCapsule){ description = "Generate a capsule jar that automatically downloads and caches dependencies when run."