- add iOS to build

- add optional libraries to SDK
experimental
Normen Hansen 11 years ago
parent 0682044cb5
commit 9e9b08afa2
  1. 6
      .gitignore
  2. 8
      jme3-ios/build.gradle
  3. 127
      sdk/build.gradle
  4. 1
      settings.gradle

6
.gitignore vendored

@ -63,4 +63,8 @@
/sdk/jme3-glsl-support/build/ /sdk/jme3-glsl-support/build/
/netbeans/ /netbeans/
/sdk/jme3-tests-template/src/com/jme3/gde/templates/tests/JmeTestsProject.zip /sdk/jme3-tests-template/src/com/jme3/gde/templates/tests/JmeTestsProject.zip
/sdk/jme3-tests-template/src/com/jme3/gde/templates/tests/JME3TestsAndroidProject.zip /sdk/jme3-tests-template/src/com/jme3/gde/templates/tests/JME3TestsAndroidProject.zip
/sdk/jme3-project-testdata/release/
/sdk/JME3TestsTemplateAndroid/src/jme3test/
/sdk/JME3TestsTemplate/src/jme3test/
/jme3-ios/build/

@ -0,0 +1,8 @@
if (!hasProperty('mainClass')) {
ext.mainClass = ''
}
dependencies {
compile project(':jme3-core')
compile project(':jme3-plugins')
}

@ -26,13 +26,18 @@ dependencies {
corelibs project(':jme3-plugins') corelibs project(':jme3-plugins')
corelibs project(':jme3-terrain') corelibs project(':jme3-terrain')
optlibs project(':jme3-bullet')
optlibs project(':jme3-jogl')
optlibs project(':jme3-android')
optlibs project(':jme3-ios')
if(buildNativeProjects == "true"){
optlibs project(':jme3-android-native')
optlibs project(':jme3-bullet-native')
}
testdatalibs project(':jme3-testdata') testdatalibs project(':jme3-testdata')
examplelibs project(':jme3-examples') examplelibs project(':jme3-examples')
optlibs project(':jme3-bullet')
optlibs project(':jme3-jogl')
} }
artifacts { artifacts {
@ -215,6 +220,63 @@ createBaseXml.inputs.files configurations.corelibs.resolve()
createBaseXml.outputs.file "jme3-core-baselibs/nbproject/project.xml" createBaseXml.outputs.file "jme3-core-baselibs/nbproject/project.xml"
createBaseXml.outputs.file "jme3-core-libraries/nbproject/project.xml" createBaseXml.outputs.file "jme3-core-libraries/nbproject/project.xml"
task copyProjectLibs(dependsOn: [configurations.corelibs, configurations.testdatalibs]) <<{
description "Copies the jar files needed to supply the J2SE Libraries in the "+
"SDK to jme3-project-baselibs and jme3-project-libraries"
// for each dependency in corelibs and optlibs..
def deps = []
deps.addAll(project.configurations.corelibs.dependencies)
deps.addAll(project.configurations.optlibs.dependencies)
deps.each {dep ->
// copy jme3 jar files, sources and javadocs to jme3-project-baselibs
dep.dependencyProject.configurations.archives.allArtifacts.each{ artifact->
if(artifact.classifier == "sources"){
copy {
from artifact.file
into "jme3-project-baselibs/release/libs/"
}
} else if(artifact.classifier == "javadoc"){
copy {
from artifact.file
into "jme3-project-baselibs/release/libs/"
}
} else{
copy {
from artifact.file
into "jme3-project-baselibs/release/libs/"
}
}
}
// copy external jar files to jme3-project-libraries
copy {
from dep.dependencyProject.configurations.compile.copyRecursive({ !(it instanceof ProjectDependency); }).resolve()
into "jme3-project-libraries/release/libs/"
}
}
project.configurations.testdatalibs.dependencies.each {dep ->
// copy jme3 test data to jme3-project-testdata
dep.dependencyProject.configurations.archives.allArtifacts.each{ artifact->
if(artifact.classifier == "sources"){
} else if(artifact.classifier == "javadoc"){
} else{
copy {
from artifact.file
into "jme3-project-testdata/release/libs/"
rename ("jme3-testdata(.*)", "jme3-testdata.jar")
}
}
}
}
}
copyProjectLibs.inputs.files configurations.corelibs.resolve()
copyProjectLibs.inputs.files configurations.optlibs.resolve()
copyProjectLibs.inputs.files configurations.testdatalibs.resolve()
copyProjectLibs.outputs.dir "jme3-project-baselibs/release/libs/"
copyProjectLibs.outputs.dir "jme3-project-libraries/release/libs/"
copyProjectLibs.outputs.dir "jme3-project-testdata/release/libs/"
// workaround method to add a tag with the name "name" and "file" to an XML MarkupBuilder // workaround method to add a tag with the name "name" and "file" to an XML MarkupBuilder
def makeName(builder, nameR) { builder.name nameR } def makeName(builder, nameR) { builder.name nameR }
def makeFile(builder, nameR) { builder.file(name:nameR, url:nameR) } def makeFile(builder, nameR) { builder.file(name:nameR, url:nameR) }
@ -226,7 +288,10 @@ task createProjectXml(dependsOn: configurations.corelibs) <<{
def j2seLibraries = [] // created J2SE library descriptors def j2seLibraries = [] // created J2SE library descriptors
// for each dependency in corelibs.. // for each dependency in corelibs..
project.configurations.corelibs.dependencies.each {dep -> def deps = []
deps.addAll(project.configurations.corelibs.dependencies)
deps.addAll(project.configurations.optlibs.dependencies)
deps.each {dep ->
def depJars = [] // jme3 jar files def depJars = [] // jme3 jar files
def depSources = [] // jme3 sources def depSources = [] // jme3 sources
def depJavadocs = [] // jme3 javadoc def depJavadocs = [] // jme3 javadoc
@ -307,60 +372,6 @@ createProjectXml.inputs.files configurations.corelibs.resolve()
createProjectXml.inputs.files configurations.optlibs.resolve() createProjectXml.inputs.files configurations.optlibs.resolve()
createProjectXml.outputs.dir "jme3-project-baselibs/src/com/jme3/gde/project/baselibs/" createProjectXml.outputs.dir "jme3-project-baselibs/src/com/jme3/gde/project/baselibs/"
task copyProjectLibs(dependsOn: [configurations.corelibs, configurations.testdatalibs]) <<{
description "Copies the jar files needed to supply the J2SE Libraries in the "+
"SDK to jme3-project-baselibs and jme3-project-libraries"
// for each dependency in corelibs..
project.configurations.corelibs.dependencies.each {dep ->
// copy jme3 jar files, sources and javadocs to jme3-project-baselibs
dep.dependencyProject.configurations.archives.allArtifacts.each{ artifact->
if(artifact.classifier == "sources"){
copy {
from artifact.file
into "jme3-project-baselibs/release/libs/"
}
} else if(artifact.classifier == "javadoc"){
copy {
from artifact.file
into "jme3-project-baselibs/release/libs/"
}
} else{
copy {
from artifact.file
into "jme3-project-baselibs/release/libs/"
}
}
}
// copy external jar files to jme3-project-libraries
copy {
from dep.dependencyProject.configurations.compile.copyRecursive({ !(it instanceof ProjectDependency); }).resolve()
into "jme3-project-libraries/release/libs/"
}
}
project.configurations.testdatalibs.dependencies.each {dep ->
// copy jme3 test data to jme3-project-testdata
dep.dependencyProject.configurations.archives.allArtifacts.each{ artifact->
if(artifact.classifier == "sources"){
} else if(artifact.classifier == "javadoc"){
} else{
copy {
from artifact.file
into "jme3-project-testdata/release/libs/"
rename ("jme3-testdata(.*)", "jme3-testdata.jar")
}
}
}
}
}
copyProjectLibs.inputs.files configurations.corelibs.resolve()
copyProjectLibs.inputs.files configurations.optlibs.resolve()
copyProjectLibs.inputs.files configurations.testdatalibs.resolve()
copyProjectLibs.outputs.dir "jme3-project-baselibs/release/libs/"
copyProjectLibs.outputs.dir "jme3-project-libraries/release/libs/"
copyProjectLibs.outputs.dir "jme3-project-testdata/release/libs/"
task copyTestSources <<{ task copyTestSources <<{
project.configurations.examplelibs.dependencies.each{dep -> project.configurations.examplelibs.dependencies.each{dep ->
copy{ copy{

@ -21,6 +21,7 @@ include 'jme3-jbullet'
include 'jme3-niftygui' include 'jme3-niftygui'
include 'jme3-jogg' include 'jme3-jogg'
include 'jme3-android' include 'jme3-android'
include 'jme3-ios'
//native builds //native builds
include 'jme3-bullet' //java include 'jme3-bullet' //java

Loading…
Cancel
Save