diff --git a/build.gradle b/build.gradle index d773b2b29..3c1edbc41 100644 --- a/build.gradle +++ b/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() { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 3c7abdf12..c97a8bdb9 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5477808a3..a0f68906b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/jme3-bullet-native/build.gradle b/jme3-bullet-native/build.gradle index 9c1ee4c3e..e796849df 100644 --- a/jme3-bullet-native/build.gradle +++ b/jme3-bullet-native/build.gradle @@ -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