clean up some naming in SDK build.gradle

experimental
Normen Hansen 11 years ago
parent 7a000bb5fe
commit 70412593ba
  1. 44
      sdk/build.gradle

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

Loading…
Cancel
Save