Kaynağa Gözat

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.

Nehon 10 yıl önce
ebeveyn
işleme
ec7432c90c
3 değiştirilmiş dosya ile 17 ekleme ve 9 silme
  1. 8 8
      build.gradle
  2. 4 1
      jme3-examples/build.gradle
  3. 5 0
      jme3-examples/gradle.properties

+ 8 - 8
build.gradle

@@ -175,11 +175,11 @@ ext {
 //    }
 //}
 
-allprojects {
-    tasks.withType(JavaExec) {
-        enableAssertions = true // false by default
-    }
-    tasks.withType(Test) {
-        enableAssertions = true // true by default
-    }
-}
+//allprojects {
+//    tasks.withType(JavaExec) {
+//        enableAssertions = true // false by default
+//    }
+//    tasks.withType(Test) {
+//        enableAssertions = true // true by default
+//    }
+//}

+ 4 - 1
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 {

+ 5 - 0
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