Switch from gradle 1.12 to 2.2.1

experimental
shadowislord 10 years ago
parent 308e88fd21
commit e3497dcf50
  1. 2
      build.gradle
  2. BIN
      gradle/wrapper/gradle-wrapper.jar
  3. 4
      gradle/wrapper/gradle-wrapper.properties
  4. 55
      jme3-bullet-native/build.gradle

@ -110,7 +110,7 @@ task mergedSource(type: Copy){
}
task wrapper(type: Wrapper, description: 'Creates and deploys the Gradle wrapper to the current directory.') {
gradleVersion = '1.12'
gradleVersion = '2.2.1'
}
String findNDK() {

Binary file not shown.

@ -1,6 +1,6 @@
#Sun Sep 07 18:47:04 EDT 2014
#Mon Dec 01 20:04:11 EST 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-bin.zip

@ -10,6 +10,32 @@ dependencies {
compile project(':jme3-bullet')
}
// Defines created C++ libraries
libraries {
bulletjme {
}
all {
binaries.all {
cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include"
if (targetPlatform.operatingSystem.name == "osx") {
cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include/darwin"
} else if (targetPlatform.operatingSystem.name == "linux") {
cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include/linux"
cppCompiler.args "-fPIC"
cppCompiler.args "-fpermissive"
cppCompiler.args "-static-libgcc"
cppCompiler.args "-static-libstdc++"
linker.args "-static-libgcc"
linker.args "-static-libstdc++"
} else if (targetPlatform.operatingSystem.name == "windows") {
cppCompiler.args "-I${org.gradle.internal.jvm.Jvm.current().javaHome}/include/win32"
// cppCompiler.define('WIN32')
// linker.args 'Shlwapi.lib', 'Advapi32.lib'
}
}
}
}
// C++ sources for binary compilation
sources {
bulletjme {
@ -73,32 +99,6 @@ model {
}
}
// Defines created C++ libraries
libraries {
bulletjme {
}
all {
binaries.all {
cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include"
if (targetPlatform.operatingSystem.name == "osx") {
cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include/darwin"
} else if (targetPlatform.operatingSystem.name == "linux") {
cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include/linux"
cppCompiler.args "-fPIC"
cppCompiler.args "-fpermissive"
cppCompiler.args "-static-libgcc"
cppCompiler.args "-static-libstdc++"
linker.args "-static-libgcc"
linker.args "-static-libstdc++"
} else if (targetPlatform.operatingSystem.name == "windows") {
cppCompiler.args "-I${org.gradle.internal.jvm.Jvm.current().javaHome}/include/win32"
// cppCompiler.define('WIN32')
// linker.args 'Shlwapi.lib', 'Advapi32.lib'
}
}
}
}
// Download bullet if not available
task downloadBullet(type: MyDownload) {
sourceUrl = bulletUrl
@ -145,7 +145,8 @@ binaries.withType(SharedLibraryBinary) { binary ->
return
}
// Get builder of this binary
def builderTask = binary.tasks.builder
def builderTask = binary.tasks
// Add output to jar file
jar.into("native/${targetPlatform.operatingSystem.name}/${targetPlatform.architecture.name}") { from builderTask.outputFile }
// Add depend on build

Loading…
Cancel
Save