Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
d410e0cb55
18
.travis.yml
18
.travis.yml
@ -1,16 +1,16 @@
|
|||||||
language: java
|
language: java
|
||||||
sudo: false
|
sudo: false
|
||||||
env:
|
|
||||||
- GRADLE_USER_HOME=gradle-cache
|
addons:
|
||||||
|
ssh_known_hosts: updates.jmonkeyengine.org
|
||||||
|
|
||||||
|
before_cache:
|
||||||
|
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- gradle-cache
|
- $HOME/.gradle/caches/
|
||||||
- netbeans
|
- $HOME/.gradle/wrapper/
|
||||||
|
|
||||||
# branches:
|
|
||||||
# only:
|
|
||||||
# - master
|
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
slack:
|
slack:
|
||||||
@ -24,9 +24,9 @@ install:
|
|||||||
|
|
||||||
script:
|
script:
|
||||||
- ./gradlew check
|
- ./gradlew check
|
||||||
- ./gradlew createZipDistribution
|
|
||||||
|
|
||||||
before_deploy:
|
before_deploy:
|
||||||
|
- ./gradlew createZipDistribution
|
||||||
- export RELEASE_DIST=$(ls build/distributions/*.zip)
|
- export RELEASE_DIST=$(ls build/distributions/*.zip)
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
import org.gradle.api.artifacts.*
|
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
@ -12,7 +10,6 @@ buildscript {
|
|||||||
|
|
||||||
apply plugin: 'base'
|
apply plugin: 'base'
|
||||||
apply from: file('version.gradle')
|
apply from: file('version.gradle')
|
||||||
apply from: file('upload.gradle')
|
|
||||||
|
|
||||||
// This is applied to all sub projects
|
// This is applied to all sub projects
|
||||||
subprojects {
|
subprojects {
|
||||||
@ -118,7 +115,7 @@ task mergedSource(type: Copy){
|
|||||||
}
|
}
|
||||||
|
|
||||||
task wrapper(type: Wrapper, description: 'Creates and deploys the Gradle wrapper to the current directory.') {
|
task wrapper(type: Wrapper, description: 'Creates and deploys the Gradle wrapper to the current directory.') {
|
||||||
gradleVersion = '2.2.1'
|
gradleVersion = '2.13'
|
||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
group = 'com.jme3'
|
group = 'org.jmonkeyengine'
|
||||||
version = jmeVersion + '-' + jmeVersionTag
|
version = jmeVersion + '-' + jmeVersionTag
|
||||||
|
|
||||||
sourceCompatibility = '1.6'
|
sourceCompatibility = '1.6'
|
||||||
|
@ -71,7 +71,7 @@ def pomConfig = {
|
|||||||
name POM_NAME
|
name POM_NAME
|
||||||
description POM_DESCRIPTION
|
description POM_DESCRIPTION
|
||||||
url POM_URL
|
url POM_URL
|
||||||
inceptionYear '2016'
|
inceptionYear POM_INCEPTION_YEAR
|
||||||
scm {
|
scm {
|
||||||
url POM_SCM_URL
|
url POM_SCM_URL
|
||||||
connection POM_SCM_CONNECTION
|
connection POM_SCM_CONNECTION
|
||||||
@ -84,7 +84,6 @@ def pomConfig = {
|
|||||||
distribution POM_LICENSE_DISTRIBUTION
|
distribution POM_LICENSE_DISTRIBUTION
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// from http://hub.jmonkeyengine.org/introduction/team/
|
|
||||||
developers {
|
developers {
|
||||||
developer {
|
developer {
|
||||||
name 'jMonkeyEngine Team'
|
name 'jMonkeyEngine Team'
|
||||||
@ -110,7 +109,7 @@ uploadArchives.dependsOn(writeFullPom)
|
|||||||
artifacts {
|
artifacts {
|
||||||
archives jar
|
archives jar
|
||||||
archives sourcesJar
|
archives sourcesJar
|
||||||
if(buildJavaDoc == "true"){
|
if (buildJavaDoc == "true") {
|
||||||
archives javadocJar
|
archives javadocJar
|
||||||
}
|
}
|
||||||
archives writeFullPom.outputs.files[0]
|
archives writeFullPom.outputs.files[0]
|
||||||
@ -130,12 +129,3 @@ uploadArchives {
|
|||||||
pom.project pomConfig
|
pom.project pomConfig
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task createFolders(description: 'Creates the source folders if they do not exist.') doLast {
|
|
||||||
// sourceSets*.allSource*.srcDirs*.each { File srcDir ->
|
|
||||||
// if (!srcDir.isDirectory()) {
|
|
||||||
// println "Creating source folder: ${srcDir}"
|
|
||||||
// srcDir.mkdirs()
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
@ -36,6 +36,7 @@ POM_SCM_DEVELOPER_CONNECTION=scm:git:git@github.com:jMonkeyEngine/jmonkeyengine.
|
|||||||
POM_LICENSE_NAME=New BSD (3-clause) License
|
POM_LICENSE_NAME=New BSD (3-clause) License
|
||||||
POM_LICENSE_URL=http://opensource.org/licenses/BSD-3-Clause
|
POM_LICENSE_URL=http://opensource.org/licenses/BSD-3-Clause
|
||||||
POM_LICENSE_DISTRIBUTION=repo
|
POM_LICENSE_DISTRIBUTION=repo
|
||||||
|
POM_INCEPTION_YEAR=2009
|
||||||
|
|
||||||
# Bintray settings to override in $HOME/.gradle/gradle.properties or ENV or commandline
|
# Bintray settings to override in $HOME/.gradle/gradle.properties or ENV or commandline
|
||||||
bintray_user=
|
bintray_user=
|
||||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
#Mon Dec 01 20:04:11 EST 2014
|
#Sat Apr 30 16:44:31 EDT 2016
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-bin.zip
|
||||||
|
52
gradlew
vendored
52
gradlew
vendored
@ -6,12 +6,30 @@
|
|||||||
##
|
##
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Attempt to set APP_HOME
|
||||||
DEFAULT_JVM_OPTS=""
|
# Resolve links: $0 may be a link
|
||||||
|
PRG="$0"
|
||||||
|
# Need this for relative symlinks.
|
||||||
|
while [ -h "$PRG" ] ; do
|
||||||
|
ls=`ls -ld "$PRG"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
PRG="$link"
|
||||||
|
else
|
||||||
|
PRG=`dirname "$PRG"`"/$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
SAVED="`pwd`"
|
||||||
|
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||||
|
APP_HOME="`pwd -P`"
|
||||||
|
cd "$SAVED" >/dev/null
|
||||||
|
|
||||||
APP_NAME="Gradle"
|
APP_NAME="Gradle"
|
||||||
APP_BASE_NAME=`basename "$0"`
|
APP_BASE_NAME=`basename "$0"`
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS=""
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD="maximum"
|
MAX_FD="maximum"
|
||||||
|
|
||||||
@ -30,6 +48,7 @@ die ( ) {
|
|||||||
cygwin=false
|
cygwin=false
|
||||||
msys=false
|
msys=false
|
||||||
darwin=false
|
darwin=false
|
||||||
|
nonstop=false
|
||||||
case "`uname`" in
|
case "`uname`" in
|
||||||
CYGWIN* )
|
CYGWIN* )
|
||||||
cygwin=true
|
cygwin=true
|
||||||
@ -40,31 +59,11 @@ case "`uname`" in
|
|||||||
MINGW* )
|
MINGW* )
|
||||||
msys=true
|
msys=true
|
||||||
;;
|
;;
|
||||||
|
NONSTOP* )
|
||||||
|
nonstop=true
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# For Cygwin, ensure paths are in UNIX format before anything is touched.
|
|
||||||
if $cygwin ; then
|
|
||||||
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Attempt to set APP_HOME
|
|
||||||
# Resolve links: $0 may be a link
|
|
||||||
PRG="$0"
|
|
||||||
# Need this for relative symlinks.
|
|
||||||
while [ -h "$PRG" ] ; do
|
|
||||||
ls=`ls -ld "$PRG"`
|
|
||||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
|
||||||
if expr "$link" : '/.*' > /dev/null; then
|
|
||||||
PRG="$link"
|
|
||||||
else
|
|
||||||
PRG=`dirname "$PRG"`"/$link"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
SAVED="`pwd`"
|
|
||||||
cd "`dirname \"$PRG\"`/" >&-
|
|
||||||
APP_HOME="`pwd -P`"
|
|
||||||
cd "$SAVED" >&-
|
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
@ -90,7 +89,7 @@ location of your Java installation."
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||||
MAX_FD_LIMIT=`ulimit -H -n`
|
MAX_FD_LIMIT=`ulimit -H -n`
|
||||||
if [ $? -eq 0 ] ; then
|
if [ $? -eq 0 ] ; then
|
||||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||||
@ -114,6 +113,7 @@ fi
|
|||||||
if $cygwin ; then
|
if $cygwin ; then
|
||||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
|
||||||
# We build the pattern for arguments to be converted via cygpath
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||||
|
8
gradlew.bat
vendored
8
gradlew.bat
vendored
@ -8,14 +8,14 @@
|
|||||||
@rem Set local scope for the variables with windows NT shell
|
@rem Set local scope for the variables with windows NT shell
|
||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
|
||||||
set DEFAULT_JVM_OPTS=
|
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS=
|
||||||
|
|
||||||
@rem Find java.exe
|
@rem Find java.exe
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ echo location of your Java installation.
|
|||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:init
|
:init
|
||||||
@rem Get command-line arguments, handling Windowz variants
|
@rem Get command-line arguments, handling Windows variants
|
||||||
|
|
||||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
apply plugin: 'cpp'
|
apply plugin: 'cpp'
|
||||||
|
|
||||||
|
import java.nio.file.Paths
|
||||||
|
|
||||||
String bulletSrcPath = bulletFolder + '/src'
|
String bulletSrcPath = bulletFolder + '/src'
|
||||||
|
|
||||||
if (!hasProperty('mainClass')) {
|
if (!hasProperty('mainClass')) {
|
||||||
@ -10,56 +12,17 @@ dependencies {
|
|||||||
compile project(':jme3-bullet')
|
compile project(':jme3-bullet')
|
||||||
}
|
}
|
||||||
|
|
||||||
// Defines created C++ libraries
|
model {
|
||||||
libraries {
|
components {
|
||||||
bulletjme {
|
bulletjme(NativeLibrarySpec) {
|
||||||
}
|
targetPlatform 'Windows64'
|
||||||
all {
|
targetPlatform 'Windows32'
|
||||||
binaries.all {
|
targetPlatform 'Mac64'
|
||||||
if (toolChain in VisualCpp) {
|
targetPlatform 'Mac32'
|
||||||
cppCompiler.args "/I${org.gradle.internal.jvm.Jvm.current().javaHome}\\include"
|
targetPlatform 'Linux64'
|
||||||
} else{
|
targetPlatform 'Linux32'
|
||||||
cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include"
|
|
||||||
}
|
|
||||||
|
|
||||||
if (targetPlatform.operatingSystem.name == "osx") {
|
sources {
|
||||||
cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include/darwin"
|
|
||||||
} else if (targetPlatform.operatingSystem.name == "linux") {
|
|
||||||
cppCompiler.args "-fvisibility=hidden"
|
|
||||||
cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include/linux"
|
|
||||||
cppCompiler.args "-fPIC"
|
|
||||||
cppCompiler.args "-fpermissive"
|
|
||||||
linker.args "-fvisibility=hidden"
|
|
||||||
|
|
||||||
// cppCompiler.args "-static-libgcc"
|
|
||||||
// cppCompiler.args "-static-libstdc++"
|
|
||||||
// linker.args "-static-libgcc"
|
|
||||||
// linker.args "-static-libstdc++"
|
|
||||||
} else if (targetPlatform.operatingSystem.name == "windows") {
|
|
||||||
if (toolChain in Gcc) {
|
|
||||||
if (toolChain.name.startsWith('mingw')) {
|
|
||||||
cppCompiler.args '-I', "${projectDir}/src/native/cpp/fake_win32"
|
|
||||||
} else {
|
|
||||||
cppCompiler.args '-I', "${org.gradle.internal.jvm.Jvm.current().javaHome}/include/win32"
|
|
||||||
}
|
|
||||||
cppCompiler.args "-fpermissive"
|
|
||||||
cppCompiler.args "-static"
|
|
||||||
linker.args "-static"
|
|
||||||
linker.args "-Wl,--exclude-all-symbols"
|
|
||||||
}
|
|
||||||
else if (toolChain in VisualCpp) {
|
|
||||||
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 {
|
|
||||||
cpp {
|
cpp {
|
||||||
source {
|
source {
|
||||||
srcDir 'src/native/cpp'
|
srcDir 'src/native/cpp'
|
||||||
@ -74,19 +37,125 @@ sources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Java source sets for IDE acces and source jar bundling / mavenization
|
|
||||||
sourceSets {
|
|
||||||
main {
|
|
||||||
java {
|
|
||||||
srcDir 'src/native/cpp'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Set of target platforms, will be available based on build system
|
binaries {
|
||||||
model {
|
withType(SharedLibraryBinarySpec) {
|
||||||
|
def projectPath = project.projectDir.absolutePath
|
||||||
|
def javaHome = org.gradle.internal.jvm.Jvm.current().javaHome
|
||||||
|
def os = targetPlatform.operatingSystem.name
|
||||||
|
def arch = targetPlatform.architecture.name
|
||||||
|
def fileName = sharedLibraryFile.name
|
||||||
|
|
||||||
|
// Gradle decided to change underscores to dashes - fix that.
|
||||||
|
arch = arch.replaceAll('-', '_')
|
||||||
|
|
||||||
|
// For all binaries that can't be built on the current system
|
||||||
|
if (buildNativeProjects != "true") {
|
||||||
|
buildable = false
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!buildable) {
|
||||||
|
if (sharedLibraryFile.exists()) {
|
||||||
|
// Add binary to jar file if the binary exists in the build folder already,
|
||||||
|
// e.g. when the build of jme3-bullet-native has been run on a virtual box
|
||||||
|
// and the project hasn't been cleaned yet.
|
||||||
|
jar.into("native/${os}/${arch}") {
|
||||||
|
from sharedLibraryFile
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Get from libs folder if no fresh build is available in the build folder and add to jar file
|
||||||
|
def precompiledFile = Paths.get(projectPath, 'libs', 'native', os, arch, fileName).toFile()
|
||||||
|
if (precompiledFile.exists()) {
|
||||||
|
jar.into("native/${os}/${arch}") {
|
||||||
|
from precompiledFile
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (toolChain in VisualCpp) {
|
||||||
|
cppCompiler.args "/I$javaHome\\include"
|
||||||
|
} else{
|
||||||
|
cppCompiler.args '-I', "$javaHome/include"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (os == "osx") {
|
||||||
|
cppCompiler.args '-I', "$javaHome/include/darwin"
|
||||||
|
} else if (os == "linux") {
|
||||||
|
cppCompiler.args "-fvisibility=hidden"
|
||||||
|
cppCompiler.args '-I', "$javaHome/include/linux"
|
||||||
|
cppCompiler.args "-fPIC"
|
||||||
|
cppCompiler.args "-fpermissive"
|
||||||
|
linker.args "-fvisibility=hidden"
|
||||||
|
} else if (os == "windows") {
|
||||||
|
if (toolChain in Gcc) {
|
||||||
|
if (toolChain.name.startsWith('mingw')) {
|
||||||
|
cppCompiler.args '-I', "$projectDir/src/native/cpp/fake_win32"
|
||||||
|
} else {
|
||||||
|
cppCompiler.args '-I', "$javaHome/include/win32"
|
||||||
|
}
|
||||||
|
cppCompiler.args "-fpermissive"
|
||||||
|
cppCompiler.args "-static"
|
||||||
|
linker.args "-static"
|
||||||
|
linker.args "-Wl,--exclude-all-symbols"
|
||||||
|
}
|
||||||
|
else if (toolChain in VisualCpp) {
|
||||||
|
cppCompiler.args "/I$javaHome\\include\\win32"
|
||||||
|
}
|
||||||
|
cppCompiler.define('WIN32')
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.all { dependsOn unzipBulletIfNeeded }
|
||||||
|
|
||||||
|
// Add output to jar file
|
||||||
|
jar.into("native/${os}/${arch}") {
|
||||||
|
from sharedLibraryFile
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add depend on build
|
||||||
|
jar.dependsOn tasks
|
||||||
|
// Add output to libs folder
|
||||||
|
task "copyBinaryToLibs${targetPlatform.name}"(type: Copy, dependsOn: tasks) {
|
||||||
|
from sharedLibraryFile
|
||||||
|
into "libs/native/${os}/${arch}"
|
||||||
|
}
|
||||||
|
// Add depend on copy
|
||||||
|
jar.dependsOn("copyBinaryToLibs${targetPlatform.name}")
|
||||||
|
}
|
||||||
|
withType(StaticLibraryBinarySpec) {
|
||||||
|
buildable = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
platforms {
|
||||||
|
Windows32 {
|
||||||
|
architecture "x86"
|
||||||
|
operatingSystem "windows"
|
||||||
|
}
|
||||||
|
Windows64 {
|
||||||
|
architecture "x86_64"
|
||||||
|
operatingSystem "windows"
|
||||||
|
}
|
||||||
|
Mac32 {
|
||||||
|
architecture "x86"
|
||||||
|
operatingSystem "osx"
|
||||||
|
}
|
||||||
|
Mac64 {
|
||||||
|
architecture "x86_64"
|
||||||
|
operatingSystem "osx"
|
||||||
|
}
|
||||||
|
Linux32 {
|
||||||
|
architecture "x86"
|
||||||
|
operatingSystem "linux"
|
||||||
|
}
|
||||||
|
Linux64 {
|
||||||
|
architecture "x86_64"
|
||||||
|
operatingSystem "linux"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
toolChains {
|
toolChains {
|
||||||
gcc(Gcc)
|
gcc(Gcc)
|
||||||
@ -112,112 +181,40 @@ model {
|
|||||||
target("windows_x86_64")
|
target("windows_x86_64")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
platforms{
|
// Java source sets for IDE access and source jar bundling / mavenization
|
||||||
// osx_universal { // TODO: universal binary doesn't work?
|
sourceSets {
|
||||||
// architecture 'x86_64'
|
main {
|
||||||
// architecture 'x86'
|
java {
|
||||||
// operatingSystem 'osx'
|
srcDir 'src/native/cpp'
|
||||||
// }
|
|
||||||
osx_x86 {
|
|
||||||
architecture "x86"
|
|
||||||
operatingSystem "osx"
|
|
||||||
}
|
|
||||||
osx_x86_64 {
|
|
||||||
architecture "x86_64"
|
|
||||||
operatingSystem "osx"
|
|
||||||
}
|
|
||||||
linux_x86 {
|
|
||||||
architecture "x86"
|
|
||||||
operatingSystem "linux"
|
|
||||||
}
|
|
||||||
linux_x86_64 {
|
|
||||||
architecture "x86_64"
|
|
||||||
operatingSystem "linux"
|
|
||||||
}
|
|
||||||
windows_x86 {
|
|
||||||
architecture "x86"
|
|
||||||
operatingSystem "windows"
|
|
||||||
}
|
|
||||||
windows_x86_64 {
|
|
||||||
architecture "x86_64"
|
|
||||||
operatingSystem "windows"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Download bullet if not available
|
|
||||||
task downloadBullet(type: MyDownload) {
|
task downloadBullet(type: MyDownload) {
|
||||||
sourceUrl = bulletUrl
|
sourceUrl = bulletUrl
|
||||||
target = file(bulletZipFile)
|
target = file(bulletZipFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unzip bullet if not available
|
|
||||||
task unzipBullet(type: Copy) {
|
task unzipBullet(type: Copy) {
|
||||||
def zipFile = file(bulletZipFile)
|
from zipTree(bulletZipFile)
|
||||||
def outputDir = file(".")
|
into file('.')
|
||||||
|
|
||||||
from zipTree(zipFile)
|
|
||||||
into outputDir
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unzipBullet.dependsOn {
|
unzipBullet.dependsOn {
|
||||||
def zipFilePath = project.projectDir.absolutePath + File.separator + bulletZipFile
|
if (!file(bulletZipFile).exists()) {
|
||||||
def zipFile = new File(zipFilePath)
|
|
||||||
if (!zipFile.exists()) {
|
|
||||||
downloadBullet
|
downloadBullet
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compileJava.dependsOn {
|
task unzipBulletIfNeeded << {
|
||||||
if(buildNativeProjects=="true"){
|
}
|
||||||
def bulletUnzipDir = new File(project.projectDir.absolutePath + File.separator + bulletFolder)
|
|
||||||
if (!bulletUnzipDir.isDirectory()) {
|
unzipBulletIfNeeded.dependsOn {
|
||||||
|
if (buildNativeProjects == "true" && !file(bulletFolder).isDirectory()) {
|
||||||
unzipBullet
|
unzipBullet
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
binaries.withType(StaticLibraryBinarySpec) {
|
|
||||||
buildable = false
|
|
||||||
}
|
|
||||||
|
|
||||||
// Adds all available binaries to java jar task
|
|
||||||
binaries.withType(SharedLibraryBinary) { binary ->
|
|
||||||
// For all binaries that can't be built on the current system
|
|
||||||
if(buildNativeProjects!="true"){
|
|
||||||
buildable = false;
|
|
||||||
}
|
|
||||||
if (!buildable) {
|
|
||||||
//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()){
|
|
||||||
def fileName = binary.tasks.outputFile.get(0).getName();
|
|
||||||
def precompiledFile = new File(project.projectDir.absolutePath + File.separator + "libs" + File.separator + "native" + File.separator + "${targetPlatform.operatingSystem.name}" + File.separator + "${targetPlatform.architecture.name}" + File.separator + "${fileName}")
|
|
||||||
if(precompiledFile.exists()){
|
|
||||||
jar.into("native/${targetPlatform.operatingSystem.name}/${targetPlatform.architecture.name}") { from precompiledFile }
|
|
||||||
}
|
|
||||||
return
|
|
||||||
} else{
|
|
||||||
// Add binary to jar file if the binary exists in the build folder already,
|
|
||||||
// e.g. when the build of jme3-bullet-native has been run on a virtual box
|
|
||||||
// and the project hasn't been cleaned yet.
|
|
||||||
jar.into("native/${targetPlatform.operatingSystem.name}/${targetPlatform.architecture.name}") { from binary.tasks.outputFile }
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// For all binaries that can be built on the current system
|
|
||||||
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
|
|
||||||
jar.dependsOn builderTask
|
|
||||||
// Add output to libs folder
|
|
||||||
task "copyBinaryToLibs${targetPlatform}"(type: Copy, dependsOn: builderTask) {
|
|
||||||
from builderTask.outputFile
|
|
||||||
into "libs/native/${targetPlatform.operatingSystem.name}/${targetPlatform.architecture.name}"
|
|
||||||
}
|
|
||||||
// Add depend on copy
|
|
||||||
jar.dependsOn("copyBinaryToLibs${targetPlatform}")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper class to wrap ant dowload task
|
// Helper class to wrap ant dowload task
|
||||||
@ -233,4 +230,3 @@ class MyDownload extends DefaultTask {
|
|||||||
ant.get(src: sourceUrl, dest: target)
|
ant.get(src: sourceUrl, dest: target)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,9 +17,9 @@ sourceSets {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task updateVersionPropertiesFile << {
|
task updateVersionPropertiesFile {
|
||||||
def verfile = file('src/main/resources/com/jme3/system/version.properties')
|
def versionFile = file('src/main/resources/com/jme3/system/version.properties')
|
||||||
verfile.text = "# THIS IS AN AUTO-GENERATED FILE..\n" +
|
def versionFileText = "# THIS IS AN AUTO-GENERATED FILE..\n" +
|
||||||
"# DO NOT MODIFY!\n" +
|
"# DO NOT MODIFY!\n" +
|
||||||
"build.date=${jmeBuildDate}\n" +
|
"build.date=${jmeBuildDate}\n" +
|
||||||
"git.revision=${jmeRevision}\n" +
|
"git.revision=${jmeRevision}\n" +
|
||||||
@ -31,9 +31,13 @@ task updateVersionPropertiesFile << {
|
|||||||
"version.full=${jmeFullVersion}\n" +
|
"version.full=${jmeFullVersion}\n" +
|
||||||
"version.number=${jmeVersion}\n" +
|
"version.number=${jmeVersion}\n" +
|
||||||
"version.tag=${jmeVersionTag}"
|
"version.tag=${jmeVersionTag}"
|
||||||
|
|
||||||
|
outputs.upToDateWhen {
|
||||||
|
versionFile.exists() && versionFile.text == versionFileText
|
||||||
|
}
|
||||||
|
doLast {
|
||||||
|
versionFile.text = versionFileText
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compileJava.dependsOn(updateVersionPropertiesFile)
|
processResources.dependsOn updateVersionPropertiesFile
|
||||||
|
|
||||||
dependencies {
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
updates.jmonkeyengine.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAuUaUztifV0v33iMJovEil0RPwx34RvpBXVPgfKJ/nwSvQzxo1VE9SZWzpgmX8QTvGBcRnxtm63iiHhlJe1Cid0m9SH3JSvBiR0CqHs+xRaEzjOM8/3Kp7DBZB3yuf/p3oecyCb48epbvQG7R5LhaW6JPyDkYMYebkpZuulf8d4qlbMCQlU2olWdbIO39BF8pxlcBei3n1C7jXpIgh6LFhCzNDH/kwYP3XLzuVgccy14gpiUfdeQ2JR0U/7yR1VJgTkVTBXiPUsdHfjXdIiShLq8OdtFlltZXe6nrUpFMvsi/hKcIhaZqhRz/5oAx0BPsercSHQQaKaRTqchAfd8ZeQ==
|
|
@ -1,6 +0,0 @@
|
|||||||
task copySshKnownHosts(type: Copy) {
|
|
||||||
from 'private/known_hosts'
|
|
||||||
into System.properties['user.home'] + '/.ssh'
|
|
||||||
}
|
|
||||||
|
|
||||||
uploadArchives.dependsOn copySshKnownHosts
|
|
Loading…
x
Reference in New Issue
Block a user