diff --git a/common.gradle b/common.gradle index 164dbee7b..33246566c 100644 --- a/common.gradle +++ b/common.gradle @@ -15,7 +15,7 @@ sourceCompatibility = '1.5' [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' repositories { - mavenCentral(); + mavenCentral() maven{ url "http://nifty-gui.sourceforge.net/nifty-maven-repo" } diff --git a/gradle.properties b/gradle.properties index 1359f6f0e..0df1c0e51 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,6 +5,10 @@ jmeMainVersion = 3.1 # Version addition -pre-alpha-svn, -Stable, -Beta jmeVersionSuffix = -pre-alpha-svn +# specify if SDK and Native libraries get built +buildSdkProject = true +buildNativeProjects = true + # Path to android NDK for building native libraries #ndkPath=/Users/normenhansen/Documents/Code-Import/android-ndk-r7 ndkPath = D:/android/android-ndk-r8e diff --git a/jme3-examples/build.gradle b/jme3-examples/build.gradle index 9288c8a1c..4805e7d60 100644 --- a/jme3-examples/build.gradle +++ b/jme3-examples/build.gradle @@ -87,9 +87,11 @@ task dist (dependsOn: ['build', ':jme3-jogl:jar', ':jme3-bullet:jar']){ into '../dist/opt/native-bullet' rename {project(':jme3-bullet').name+".jar"} } - copy { - from project(':jme3-bullet-native').jar.archivePath - into '../dist/opt/native-bullet' - rename {"jme3-bullet-natives.jar"} + if(buildNativeProjects){ + copy { + from project(':jme3-bullet-native').jar.archivePath + into '../dist/opt/native-bullet' + rename {"jme3-bullet-natives.jar"} + } } } diff --git a/sdk/build.gradle b/sdk/build.gradle index c8bb68691..91349ace7 100644 --- a/sdk/build.gradle +++ b/sdk/build.gradle @@ -333,6 +333,10 @@ ant.properties['plugins.version'] = jmeVersion ant.properties['app.version']= jmeMainVersion + jmeVersionSuffix task buildSdk(dependsOn: [copyBaseLibs, copyProjectLibs, createProjectXml, createBaseXml]) <<{ + ant.propertyfile(file: "nbproject/project.properties") { + entry( key: "plugins.version", value: "${jmeVersion}") + entry( key: "app.version", value: "${jmeMainVersion + jmeVersionSuffix}") + } ant.ant(dir: ".", antfile: "build.xml", target: "build") } diff --git a/settings.gradle b/settings.gradle index 1e35568d6..dca053488 100644 --- a/settings.gradle +++ b/settings.gradle @@ -3,13 +3,6 @@ **/ rootProject.name = 'jmonkeyengine' -/** - * You can enable or disable different subprojects of the build here. - * - * The SDK will only be built if the appropriate library folders exist, - * call the "prepareSdk" target to prepare building the SDK. - **/ - // Core classes, should work on all java platforms include 'jme3-core' include 'jme3-effects' @@ -31,30 +24,16 @@ include 'jme3-android' //native builds include 'jme3-bullet' //java -include 'jme3-bullet-native' //cpp -include 'jme3-android-native' //cpp - +if(buildNativeProjects){ + include 'jme3-bullet-native' //cpp + include 'jme3-android-native' //cpp +} // Test Data project include 'jme3-testdata' // Example projects include 'jme3-examples' -//include 'sdk' - -// Find the directories containing a 'build.gradle' file in the root directory -// of the project. That is, every directory containing a 'build.gradle' will -// be automatically the subproject of this project. -/*def subDirs = rootDir.listFiles(new FileFilter() { - public boolean accept(File file) { - if (!file.isDirectory()) { - return false - } - - return new File(file, 'build.gradle').isFile() - } -}); - -subDirs.each { File dir -> - include dir.name -}*/ \ No newline at end of file +if(buildSdkProject){ + include 'sdk' +} \ No newline at end of file