|
|
|
@ -97,22 +97,22 @@ copyBaseLibs.outputs.dir "jme3-core-libraries/release/modules/ext/" |
|
|
|
|
task createBaseXml(dependsOn: configurations.corelibs) <<{ |
|
|
|
|
description "Creates the project.xml files for "+ |
|
|
|
|
"jme3-core-baselibs and jme3-core-libraries" |
|
|
|
|
def depJars = [] // jme3 jar files |
|
|
|
|
def depExtJars = [] // external jar files |
|
|
|
|
def jmeJarFiles = [] // jme3 jar files |
|
|
|
|
def externalJarFiles = [] // external jar files |
|
|
|
|
|
|
|
|
|
// collect jar files |
|
|
|
|
project.configurations.corelibs.dependencies.each {dep -> |
|
|
|
|
// collect external jar files |
|
|
|
|
dep.dependencyProject.configurations.compile.copyRecursive({ !(it instanceof ProjectDependency); }).resolve().each{ file-> |
|
|
|
|
depExtJars.add(file) |
|
|
|
|
externalJarFiles.add(file) |
|
|
|
|
} |
|
|
|
|
// collect internal jar files (classes, sources and javadoc) |
|
|
|
|
dep.dependencyProject.configurations.archives.allArtifacts.each{ artifact-> |
|
|
|
|
if(artifact.classifier == "sources"){ |
|
|
|
|
} else if(artifact.classifier == "javadoc"){ |
|
|
|
|
} else{ |
|
|
|
|
if(!depJars.contains(artifact.file)){ |
|
|
|
|
depJars.add(artifact.file) |
|
|
|
|
if(!jmeJarFiles.contains(artifact.file)){ |
|
|
|
|
jmeJarFiles.add(artifact.file) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -120,7 +120,7 @@ task createBaseXml(dependsOn: configurations.corelibs) <<{ |
|
|
|
|
|
|
|
|
|
// collect base packages |
|
|
|
|
def packages = [] |
|
|
|
|
depJars.each{jarFile -> |
|
|
|
|
jmeJarFiles.each{jarFile -> |
|
|
|
|
ZipFile file = new ZipFile(jarFile) |
|
|
|
|
file.entries().each { entry -> |
|
|
|
|
if(entry.name.endsWith('.class')){ |
|
|
|
@ -136,7 +136,7 @@ task createBaseXml(dependsOn: configurations.corelibs) <<{ |
|
|
|
|
|
|
|
|
|
// collect library packages |
|
|
|
|
def extPackages = [] |
|
|
|
|
depExtJars.each{jarFile -> |
|
|
|
|
externalJarFiles.each{jarFile -> |
|
|
|
|
ZipFile file = new ZipFile(jarFile) |
|
|
|
|
file.entries().each { entry -> |
|
|
|
|
if(entry.name.endsWith('.class')){ |
|
|
|
@ -175,7 +175,7 @@ task createBaseXml(dependsOn: configurations.corelibs) <<{ |
|
|
|
|
"package" it |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
depJars.each{jarFile -> |
|
|
|
|
jmeJarFiles.each{jarFile -> |
|
|
|
|
"class-path-extension"{ |
|
|
|
|
"runtime-relative-path" "ext/${jarFile.name}" |
|
|
|
|
"binary-origin" "release/modules/ext/${jarFile.name}" |
|
|
|
@ -203,7 +203,7 @@ task createBaseXml(dependsOn: configurations.corelibs) <<{ |
|
|
|
|
"package" it |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
depExtJars.each{jarFile -> |
|
|
|
|
externalJarFiles.each{jarFile -> |
|
|
|
|
"class-path-extension"{ |
|
|
|
|
"runtime-relative-path" "ext/${jarFile.name}" |
|
|
|
|
"binary-origin" "release/modules/ext/${jarFile.name}" |
|
|
|
@ -292,24 +292,24 @@ task createProjectXml(dependsOn: configurations.corelibs) <<{ |
|
|
|
|
deps.addAll(project.configurations.corelibs.dependencies) |
|
|
|
|
deps.addAll(project.configurations.optlibs.dependencies) |
|
|
|
|
deps.each {dep -> |
|
|
|
|
def depJars = [] // jme3 jar files |
|
|
|
|
def depSources = [] // jme3 sources |
|
|
|
|
def depJavadocs = [] // jme3 javadoc |
|
|
|
|
def depExtJars = [] // external jar files |
|
|
|
|
def jmeJarFiles = [] // jme3 jar files |
|
|
|
|
def jmeSourceFiles = [] // jme3 sources |
|
|
|
|
def jmeJavadocFiles = [] // jme3 javadoc |
|
|
|
|
def externalJarFiles = [] // external jar files |
|
|
|
|
j2seLibraries.add(dep.dependencyProject.name+".xml") |
|
|
|
|
// collect external jar files |
|
|
|
|
dep.dependencyProject.configurations.compile.copyRecursive({ !(it instanceof ProjectDependency); }).resolve().each{ file-> |
|
|
|
|
depExtJars.add(file.name) |
|
|
|
|
externalJarFiles.add(file.name) |
|
|
|
|
} |
|
|
|
|
// collect internal jar files (classes, sources and javadoc) |
|
|
|
|
dep.dependencyProject.configurations.archives.allArtifacts.each{ artifact-> |
|
|
|
|
if(artifact.classifier == "sources"){ |
|
|
|
|
depSources.add(artifact.file.name) |
|
|
|
|
jmeSourceFiles.add(artifact.file.name) |
|
|
|
|
} else if(artifact.classifier == "javadoc"){ |
|
|
|
|
depJavadocs.add(artifact.file.name) |
|
|
|
|
jmeJavadocFiles.add(artifact.file.name) |
|
|
|
|
} else{ |
|
|
|
|
if(!depJars.contains(artifact.file.name)){ |
|
|
|
|
depJars.add(artifact.file.name) |
|
|
|
|
if(!jmeJarFiles.contains(artifact.file.name)){ |
|
|
|
|
jmeJarFiles.add(artifact.file.name) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -325,22 +325,22 @@ task createProjectXml(dependsOn: configurations.corelibs) <<{ |
|
|
|
|
"localizing-bundle" "com.jme3.gde.project.baselibs.Bundle" |
|
|
|
|
volume{ |
|
|
|
|
type "classpath" |
|
|
|
|
depJars.each{jar -> |
|
|
|
|
jmeJarFiles.each{jar -> |
|
|
|
|
resource "jar:nbinst://com.jme3.gde.project.baselibs/libs/${jar}!/" |
|
|
|
|
} |
|
|
|
|
depExtJars.each{jar -> |
|
|
|
|
externalJarFiles.each{jar -> |
|
|
|
|
resource "jar:nbinst://com.jme3.gde.project.libraries/libs/${jar}!/" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
volume{ |
|
|
|
|
type "src" |
|
|
|
|
depSources.each{jar -> |
|
|
|
|
jmeSourceFiles.each{jar -> |
|
|
|
|
resource "jar:nbinst://com.jme3.gde.project.baselibs/libs/${jar}!/" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
volume{ |
|
|
|
|
type "javadoc" |
|
|
|
|
depJavadocs.each{jar -> |
|
|
|
|
jmeJavadocFiles.each{jar -> |
|
|
|
|
resource "jar:nbinst://com.jme3.gde.project.baselibs/libs/${jar}!/" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|