From ec7432c90c17c0a9abf406a29cb1fe32ab3c6068 Mon Sep 17 00:00:00 2001 From: Nehon Date: Fri, 8 May 2015 15:07:43 +0200 Subject: [PATCH] Added a graddle.properties to je jme-examples project with an override of buildJavaDoc to false, to not generate the javadoc when building from jme-examples Also added a parameter to enable assertion as executable classes are only in this project anyway. Removed the global assertion setting as it's only needed in jme-examples. --- build.gradle | 16 ++++++++-------- jme3-examples/build.gradle | 5 ++++- jme3-examples/gradle.properties | 5 +++++ 3 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 jme3-examples/gradle.properties diff --git a/build.gradle b/build.gradle index d9f5cd2ea..8e6790230 100644 --- a/build.gradle +++ b/build.gradle @@ -175,11 +175,11 @@ ext { // } //} -allprojects { - tasks.withType(JavaExec) { - enableAssertions = true // false by default - } - tasks.withType(Test) { - enableAssertions = true // true by default - } -} \ No newline at end of file +//allprojects { +// tasks.withType(JavaExec) { +// enableAssertions = true // false by default +// } +// tasks.withType(Test) { +// enableAssertions = true // true by default +// } +//} \ No newline at end of file diff --git a/jme3-examples/build.gradle b/jme3-examples/build.gradle index 186a6bc2d..de1c3931c 100644 --- a/jme3-examples/build.gradle +++ b/jme3-examples/build.gradle @@ -6,7 +6,10 @@ if (!hasProperty('mainClass')) { task run(dependsOn: 'build', type:JavaExec) { main = mainClass - classpath = sourceSets.main.runtimeClasspath + classpath = sourceSets.main.runtimeClasspath + if( assertions == "true" ){ + enableAssertions = true; + } } dependencies { diff --git a/jme3-examples/gradle.properties b/jme3-examples/gradle.properties new file mode 100644 index 000000000..6f0993120 --- /dev/null +++ b/jme3-examples/gradle.properties @@ -0,0 +1,5 @@ +# When running this project we don't need javadoc to be built. +buildJavaDoc = false + +# We want assertions, because this is the test project. +assertions = true