- change behavior of "buildNativeProjects" setting to not exclude native subprojects from build but instead copy precompiled binaries

- disable unnecessary build of static bullet libraries
experimental
Normen Hansen 10 years ago
parent 1977efd3cf
commit 00f12cfec7
  1. 19
      jme3-bullet-native/build.gradle
  2. 2
      jme3-examples/build.gradle
  3. 2
      sdk/build.gradle
  4. 2
      settings.gradle

@ -86,7 +86,7 @@ model {
architecture "x86" architecture "x86"
operatingSystem "osx" operatingSystem "osx"
} }
osx_x64 { osx_x86_64 {
architecture "x86_64" architecture "x86_64"
operatingSystem "osx" operatingSystem "osx"
} }
@ -141,7 +141,7 @@ compileJava.dependsOn {
// Adds all available binaries to java jar task // Adds all available binaries to java jar task
binaries.withType(SharedLibraryBinary) { binary -> binaries.withType(SharedLibraryBinary) { binary ->
// For all binaries that can't be built on the current system // For all binaries that can't be built on the current system
if (!buildable) { if (!buildable || buildNativeProjects!="true") {
//Get from libs folder if no fresh build is available in the build folder and add to jar file //Get from libs folder if no fresh build is available in the build folder and add to jar file
if(!binary.tasks.outputFile.get(0).exists()){ if(!binary.tasks.outputFile.get(0).exists()){
def fileName = binary.tasks.outputFile.get(0).getName(); def fileName = binary.tasks.outputFile.get(0).getName();
@ -174,6 +174,21 @@ binaries.withType(SharedLibraryBinary) { binary ->
jar.dependsOn("copyBinaryToLibs${targetPlatform}") jar.dependsOn("copyBinaryToLibs${targetPlatform}")
} }
// Remove all native build tasks, will be added as needed above
gradle.startParameter.excludedTaskNames += "windows_x86BulletjmeStaticLibrary"
gradle.startParameter.excludedTaskNames += "windows_x86_64BulletjmeStaticLibrary"
gradle.startParameter.excludedTaskNames += "linux_x86BulletjmeStaticLibrary"
gradle.startParameter.excludedTaskNames += "linux_x86_64BulletjmeStaticLibrary"
gradle.startParameter.excludedTaskNames += "osx_x86BulletjmeStaticLibrary"
gradle.startParameter.excludedTaskNames += "osx_x86_64BulletjmeStaticLibrary"
gradle.startParameter.excludedTaskNames += "windows_x86BulletjmeSharedLibrary"
gradle.startParameter.excludedTaskNames += "windows_x86_64BulletjmeSharedLibrary"
gradle.startParameter.excludedTaskNames += "linux_x86BulletjmeSharedLibrary"
gradle.startParameter.excludedTaskNames += "linux_x86_64BulletjmeSharedLibrary"
gradle.startParameter.excludedTaskNames += "osx_x86BulletjmeSharedLibrary"
gradle.startParameter.excludedTaskNames += "osx_x86_64BulletjmeSharedLibrary"
// Helper class to wrap ant dowload task // Helper class to wrap ant dowload task
class MyDownload extends DefaultTask { class MyDownload extends DefaultTask {
@Input @Input

@ -91,11 +91,9 @@ task dist (dependsOn: ['build', ':jme3-jogl:jar', ':jme3-bullet:jar']) << {
into '../dist/opt/native-bullet' into '../dist/opt/native-bullet'
rename {project(':jme3-bullet').name+".jar"} rename {project(':jme3-bullet').name+".jar"}
} }
if(buildNativeProjects == "true"){
copy { copy {
from project(':jme3-bullet-native').jar.archivePath from project(':jme3-bullet-native').jar.archivePath
into '../dist/opt/native-bullet' into '../dist/opt/native-bullet'
rename {"jme3-bullet-natives.jar"} rename {"jme3-bullet-natives.jar"}
} }
} }
}

@ -30,10 +30,8 @@ dependencies {
optlibs project(':jme3-jogl') optlibs project(':jme3-jogl')
optlibs project(':jme3-android') optlibs project(':jme3-android')
optlibs project(':jme3-ios') optlibs project(':jme3-ios')
if(buildNativeProjects == "true"){
optlibs project(':jme3-android-native') optlibs project(':jme3-android-native')
optlibs project(':jme3-bullet-native') optlibs project(':jme3-bullet-native')
}
testdatalibs project(':jme3-testdata') testdatalibs project(':jme3-testdata')
examplelibs project(':jme3-examples') examplelibs project(':jme3-examples')

@ -25,10 +25,8 @@ include 'jme3-ios'
//native builds //native builds
include 'jme3-bullet' //java include 'jme3-bullet' //java
if(buildNativeProjects == "true"){
include 'jme3-bullet-native' //cpp include 'jme3-bullet-native' //cpp
include 'jme3-bullet-native-android' //cpp include 'jme3-bullet-native-android' //cpp
}
include 'jme3-android-native' //cpp include 'jme3-android-native' //cpp
// Test Data project // Test Data project

Loading…
Cancel
Save