gradle-restructure:
- extend jme3-examples "dist" target (WIP) git-svn-id: https://jmonkeyengine.googlecode.com/svn/branches/gradle-restructure@10984 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
d7189e6aa4
commit
a845665cca
@ -28,20 +28,68 @@ jar.doFirst{
|
|||||||
attributes('Manifest-Version' : '1.0',
|
attributes('Manifest-Version' : '1.0',
|
||||||
// 'Created-By' : vendor,
|
// 'Created-By' : vendor,
|
||||||
// 'Specification-Title' : appName,
|
// 'Specification-Title' : appName,
|
||||||
// 'Specification-Version' : version,
|
// 'Specification-Version' : jmeVersion,
|
||||||
// 'Specification-Vendor' : vendor,
|
// 'Specification-Vendor' : "jMonkeyEngine",
|
||||||
// 'Implementation-Title' : appName,
|
// 'Implementation-Title' : appName,
|
||||||
// 'Implementation-Version' : version,
|
// 'Implementation-Version' : version,
|
||||||
// 'Implementation-Vendor' : vendor,
|
// 'Implementation-Vendor' : vendor,
|
||||||
'Main-Class' : getProperty('mainClass'),
|
'Main-Class' : getProperty('mainClass'),
|
||||||
'Class-Path' : configurations.compile.collect { 'lib/' + it.getName() }.join(' ')
|
// Add dependencies to manifest, remove version
|
||||||
|
'Class-Path' : configurations.compile.resolvedConfiguration.resolvedArtifacts.collect {
|
||||||
|
'lib/' +
|
||||||
|
it.name +
|
||||||
|
it.classifier != null ? '-' + it.classifier : '' +
|
||||||
|
'.' + it.extension }.join(' ')
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
jar.dependsOn('copyLibs')
|
task dist (dependsOn: ['build', ':jme3-jogl:jar', ':jme3-bullet:jar']){
|
||||||
|
// Copy all dependencies to ../dist/lib, remove versions from jar files
|
||||||
task copyLibs(type: Copy){
|
configurations.compile.resolvedConfiguration.resolvedArtifacts.each { artifact ->
|
||||||
from configurations.compile
|
copy {
|
||||||
into buildDir.path + '/' + libsDirName + '/lib'
|
from artifact.file
|
||||||
|
into '../dist/lib'
|
||||||
|
if(artifact.classifier != null){
|
||||||
|
rename { "${artifact.name}-${artifact.classifier}.${artifact.extension}" }
|
||||||
|
} else{
|
||||||
|
rename { "${artifact.name}.${artifact.extension}" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
copy {
|
||||||
|
from jar.archivePath
|
||||||
|
into '../dist'
|
||||||
|
rename { "jMonkeyEngine3.jar" }
|
||||||
|
}
|
||||||
|
// Copy JOGL packages, remove version
|
||||||
|
def config = project(':jme3-jogl').configurations.runtime.copyRecursive({ !(it instanceof ProjectDependency); })
|
||||||
|
config.resolvedConfiguration.resolvedArtifacts.each {artifact ->
|
||||||
|
copy{
|
||||||
|
from artifact.file
|
||||||
|
into '../dist/opt/jogl/lib'
|
||||||
|
if(artifact.classifier != null){
|
||||||
|
rename { "${artifact.name}-${artifact.classifier}.${artifact.extension}" }
|
||||||
|
} else{
|
||||||
|
rename { "${artifact.name}.${artifact.extension}" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
copy {
|
||||||
|
from project(':jme3-jogl').jar.archivePath
|
||||||
|
into '../dist/opt/jogl'
|
||||||
|
rename {project(':jme3-jogl').name+".jar"}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Copy bullet packages, remove version
|
||||||
|
copy {
|
||||||
|
from project(':jme3-bullet').jar.archivePath
|
||||||
|
into '../dist/opt/native-bullet'
|
||||||
|
rename {project(':jme3-bullet').name+".jar"}
|
||||||
|
}
|
||||||
|
copy {
|
||||||
|
from project(':jme3-bullet-native').jar.archivePath
|
||||||
|
into '../dist/opt/native-bullet'
|
||||||
|
rename {"jme3-bullet-natives.jar"}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user