Merge branch 'main' into origin/renovate/major-jetty-packages

# Conflicts:
#	build.gradle
This commit is contained in:
Tobi Schäfer 2025-01-10 20:09:53 +01:00
commit 11b226b272
Signed by: tobi
GPG key ID: 91FAE6FE2EBAC4C8
9 changed files with 30 additions and 31 deletions

View file

@ -17,8 +17,10 @@ def textFiles = ['**/*.hac', '**/.html', '**/*.js', '**/*.md', '**/*.properties'
allprojects {
apply plugin: 'java'
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
repositories {
mavenCentral()
@ -155,31 +157,26 @@ installDist {
dependsOn build
}
task processSource(type: Sync) {
def date = new Date().format("d MMMM yyyy")
tasks.register('processSource', Sync) {
def gitOutput = new ByteArrayOutputStream()
exec {
commandLine 'git', 'describe'
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = gitOutput
errorOutput = new ByteArrayOutputStream()
ignoreExitValue = true
}
def description = date
def tag = gitOutput.toString().trim()
// TODO: Implement extended description in Java code
if (tag) description = "$tag; $description"
from 'src'
filter {
line -> line.replaceAll('__builddate__', date)
line -> line
.replaceAll('__builddate__', new Date().format("d MMM yyyy"))
.replaceAll('__commithash__', gitOutput.toString().trim())
} into "${project.buildDir}/src"
}
task update {
tasks.register('update') {
dependsOn installDist
def rsyncArgs = ['--archive', '--filter', '- backups']
@ -225,7 +222,7 @@ task update {
}
}
task jsdoc(type: Exec) {
tasks.register('jsdoc', Exec) {
description 'Generates JSDoc API documentation for the included JavaScript modules.'
group 'Documentation'
@ -239,7 +236,7 @@ task jsdoc(type: Exec) {
args = ['jsdoc', '-d', "$destination"].plus(sources)
}
task xgettext(type: JavaExec) {
tasks.register('xgettext', JavaExec) {
description 'Extracts translatable message strings from source code.'
group 'i18n'
@ -256,7 +253,7 @@ task xgettext(type: JavaExec) {
]
}
task po2js(type: JavaExec) {
tasks.register('po2js', JavaExec) {
description 'Converts translated message strings from PO format to JavaScript.'
group 'i18n'
@ -271,7 +268,7 @@ task po2js(type: JavaExec) {
]
}
task rhinoShell(type: JavaExec) {
tasks.register('rhinoShell', JavaExec) {
description 'Runs the interactive Rhino JavaScript shell.'
group 'Application'
@ -283,7 +280,7 @@ task rhinoShell(type: JavaExec) {
// Call this task with a function definition using the `-P` parameter, e.g.
// `./gradlew commandLine -Pfunction=manage.getAllApplications`
task commandLine(type: JavaExec) {
tasks.register('commandLine', JavaExec) {
description 'Runs a function in a Helma application with `-Pfunction=app.functionName`.'
group 'Application'