- Renamed :packageWindows to :packageNsis - ImageMagick now required for :packageNsis - Packaging output is now in build/packages - Rewrote build script - Packaging logic and LWJGL dependencies now in separate files - Packaging logic now implemented with Gradle, not Bash scripts - Cross-platform? - Added :packageZip - Universal ZIP with start scripts - Changed version detection logic - Tags of ancestor commits are now considered - Only tags with format vMAJOR.MINOR.PATCH[-SUFFIX] are considered - If the tag's commit isn't HEAD, PATCH is incremented - When version detection fails, dummy version is 999.0.0-<buildID or date> - LWJGL target platforms can be overridden with forceTargets project property
42 lines
971 B
Groovy
42 lines
971 B
Groovy
task packageZip_processResources(type: Copy) {
|
|
dependsOn preparePackaging
|
|
|
|
from ('src/packaging/zip') {
|
|
filesMatching('start.*') {
|
|
filter(
|
|
org.apache.tools.ant.filters.ReplaceTokens,
|
|
tokens: [mainJarFile: project.tasks.jar.archiveFileName.get()]
|
|
)
|
|
}
|
|
}
|
|
from ('src/main/resource/assets/icons/logo256.original.png') {
|
|
rename 'logo256.original.png', 'logo.png'
|
|
}
|
|
from('LICENSE') {
|
|
rename 'LICENSE', 'LICENSE.txt'
|
|
}
|
|
into 'build/tmp/packaging/workingDir'
|
|
}
|
|
|
|
task packageZip(type: Zip) {
|
|
description 'Builds the project and creates a cross-platform ZIP package.'
|
|
group 'Progressia'
|
|
|
|
dependsOn resolveVersion
|
|
dependsOn requestCrossPlatformDependencies
|
|
dependsOn build
|
|
dependsOn preparePackaging
|
|
|
|
dependsOn packageZip_processResources
|
|
|
|
archiveBaseName = project.name
|
|
archiveAppendix = 'universal'
|
|
|
|
doFirst {
|
|
archiveVersion = project.version
|
|
}
|
|
|
|
from 'build/tmp/packaging/workingDir'
|
|
destinationDirectory = file('build/packages')
|
|
}
|