Reorder the tasks

This commit is contained in:
Tobi Schäfer 2024-06-15 12:38:04 +02:00
parent ed56cf72f7
commit 196794cd93
Signed by: tobi
GPG key ID: 91FAE6FE2EBAC4C8

View file

@ -76,29 +76,9 @@ def rhinoJar = configurations.library.files.find { jar ->
jar.name.startsWith('rhino')
}
startScripts {
applicationName = 'helma'
classpath = files('../launcher.jar')
mainClass = 'helma.main.launcher.Main'
defaultJvmOpts = [jettyLogLevel, suppressMacosDockIcon]
doLast {
// Work-around to make the classpath above work (launcher.jar is located outside of `lib` dir)
// See https://discuss.gradle.org/t/classpath-in-application-plugin-is-building-always-relative-to-app-home-lib-directory/2012
def unixScriptFile = file getUnixScript()
def windowsScriptFile = file getWindowsScript()
unixScriptFile.text = unixScriptFile.text.replace('$APP_HOME/lib', '$APP_HOME')
windowsScriptFile.text = windowsScriptFile.text.replace('%APP_HOME%\\lib', '%APP_HOME%')
}
}
distributions {
main {
contents {
from project(':launcher').jar
}
}
run {
jvmArgs jettyLogLevel, suppressMacosDockIcon
classpath += fileTree(dir: 'lib/ext', include: '*.jar')
}
application {
@ -127,6 +107,31 @@ application {
}
}
startScripts {
applicationName = 'helma'
classpath = files('../launcher.jar')
mainClass = 'helma.main.launcher.Main'
defaultJvmOpts = [jettyLogLevel, suppressMacosDockIcon]
doLast {
// Work-around to make the classpath above work (launcher.jar is located outside of `lib` dir)
// See https://discuss.gradle.org/t/classpath-in-application-plugin-is-building-always-relative-to-app-home-lib-directory/2012
def unixScriptFile = file getUnixScript()
def windowsScriptFile = file getWindowsScript()
unixScriptFile.text = unixScriptFile.text.replace('$APP_HOME/lib', '$APP_HOME')
windowsScriptFile.text = windowsScriptFile.text.replace('%APP_HOME%\\lib', '%APP_HOME%')
}
}
distributions {
main {
contents {
from project(':launcher').jar
}
}
}
distTar {
dependsOn ':generateLicenseReport', ':javadoc', ':jsdoc'
@ -153,11 +158,6 @@ installDist {
}
}
run {
jvmArgs jettyLogLevel, suppressMacosDockIcon
classpath += fileTree(dir: 'lib/ext', include: '*.jar')
}
task processSource(type: Sync) {
def date = new Date().format("d MMM yyyy")
def gitOutput = new ByteArrayOutputStream()