From e11be3bc33ee9ccda69fc1f22bbcc8fa34b22885 Mon Sep 17 00:00:00 2001 From: Roger Sheen Date: Sun, 2 Nov 2025 22:34:26 +0100 Subject: [PATCH 1/8] Refactor for Gradle 9 compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use Cursor’s `claude-4-sonnet` model to replace deprecated constructs from Gradle 7 and earlier versions with their Gradle 8 and 9 equivalents to quiet deprecation warnings. Co-Authored-By: Claude Signed-off-by: Roger Sheen --- build.gradle | 147 ++++++++++++++++++++++++++++------------------ gradle.properties | 8 +++ 2 files changed, 98 insertions(+), 57 deletions(-) diff --git a/build.gradle b/build.gradle index d9c54a092..720917b1d 100644 --- a/build.gradle +++ b/build.gradle @@ -20,18 +20,22 @@ dependencies { import com.github.eerohele.DitaOtTask import com.github.eerohele.SaxonXsltTask +import org.gradle.process.ExecOperations def getPropertyOrDefault(String name, def defaultValue) { - hasProperty(name) ? findProperty(name) : defaultValue + providers.gradleProperty(name).getOrElse(defaultValue) } -String ditaHome = getPropertyOrDefault('ditaHome', projectDir.getParent()) +// Use layout.projectDirectory for configuration cache compatibility +def projectDirPath = layout.projectDirectory.asFile.path + +String ditaHome = getPropertyOrDefault('ditaHome', layout.projectDirectory.asFile.getParent()) String ditaHomeSrc = getPropertyOrDefault('ditaHomeSrc', ditaHome) String configDir = "${ditaHomeSrc}/config" -String ditavalFile = "${projectDir}/platform.ditaval" -Boolean toolkitBuild = file("${projectDir}/../lib/dost.jar").exists() -String samplesDir = toolkitBuild ? "${ditaHome}/docsrc/samples" : "${projectDir}/samples" -String outputDir = getPropertyOrDefault('outputDir', toolkitBuild ? "${ditaHome}/doc" : "${projectDir}/out") +String ditavalFile = "${projectDirPath}/platform.ditaval" +Boolean toolkitBuild = file("${projectDirPath}/../lib/dost.jar").exists() +String samplesDir = toolkitBuild ? "${ditaHome}/docsrc/samples" : "${projectDirPath}/samples" +String outputDir = getPropertyOrDefault('outputDir', toolkitBuild ? "${ditaHome}/doc" : "${projectDirPath}/out") String toURI(String path) { file(path).toURI().toString() @@ -41,85 +45,87 @@ ditaOt.dir ditaHome task messages(type: SaxonXsltTask) { input "${configDir}/messages.xml" - output "${projectDir}/topics/error-messages.xml" - stylesheet "${projectDir}/resources/messages.xsl" + output "${projectDirPath}/topics/error-messages.xml" + stylesheet "${projectDirPath}/resources/messages.xsl" } task params(type: SaxonXsltTask) { input "${configDir}/plugins.xml" - output "${projectDir}/parameters/all-parameters.dita" - stylesheet "${projectDir}/resources/params.xsl" + output "${projectDirPath}/parameters/all-parameters.dita" + stylesheet "${projectDirPath}/resources/params.xsl" parameters('output-dir.url': toURI('parameters')) - outputs.dir "${projectDir}/parameters" + outputs.dir "${projectDirPath}/parameters" } task extensionPoints(type: SaxonXsltTask) { input "${configDir}/plugins.xml" - output "${projectDir}/extension-points/all-extension-points.dita" - stylesheet "${projectDir}/resources/extension-points.xsl" + output "${projectDirPath}/extension-points/all-extension-points.dita" + stylesheet "${projectDirPath}/resources/extension-points.xsl" parameters('output-dir.url': toURI('extension-points')) - outputs.dir "${projectDir}/extension-points" + outputs.dir "${projectDirPath}/extension-points" } task generatePlatformFilter { - ant.condition(property: 'platform', value: 'windows') { - os(family: 'windows') - } - - ant.condition(property: 'platform', value: 'mac' ) { - os(family: 'mac') - } + def outputFile = layout.projectDirectory.file(ditavalFile) + outputs.file(outputFile) - ant.condition(property: 'platform', value: 'unix' ) { - os(family: 'unix') - } - - ant.echoxml(file: ditavalFile) { - val { - prop(action: 'include', att: 'platform', val: platform) - prop(action: 'exclude', att: 'platform') + doLast { + // Use Gradle's built-in OS detection instead of Ant + def platformName = 'unix' // default + if (org.gradle.internal.os.OperatingSystem.current().isWindows()) { + platformName = 'windows' + } else if (org.gradle.internal.os.OperatingSystem.current().isMacOsX()) { + platformName = 'mac' } + + // Generate the ditaval file using modern Gradle file operations + outputFile.asFile.text = """ + + + + +""" } } task generatePropertiesTemplate(type: SaxonXsltTask) { input "${configDir}/plugins.xml" output "${samplesDir}/properties/template.properties" - stylesheet "${projectDir}/resources/properties-file.xsl" + stylesheet "${projectDirPath}/resources/properties-file.xsl" } task autoGenerate(dependsOn: [messages, params, extensionPoints, generatePlatformFilter, generatePropertiesTemplate]) { - description 'Run tasks that generate content from resource files and the build environment.' + description = 'Run tasks that generate content from resource files and the build environment.' } task pdf(type: DitaOtTask, dependsOn: autoGenerate) { - input "${projectDir}/userguide-book.ditamap" + input "${projectDirPath}/userguide-book.ditamap" output outputDir transtype 'pdf' - filter "${projectDir}/resources/pdf.ditaval" + filter "${projectDirPath}/resources/pdf.ditaval" properties { property(name: 'args.chapter.layout', value: 'BASIC') property(name: 'args.gen.task.lbl', value: 'YES') property(name: 'include.rellinks', value: '#default external') property(name: 'outputFile.base', value: 'userguide') - property(name: 'theme', value: "${projectDir}/samples/themes/dita-ot-docs-theme.yaml") + property(name: 'theme', value: "${projectDirPath}/samples/themes/dita-ot-docs-theme.yaml") } } task html(type: DitaOtTask, dependsOn: autoGenerate) { - input "${projectDir}/userguide.ditamap" + input "${projectDirPath}/userguide.ditamap" output outputDir transtype 'html5' - filter "${projectDir}/resources/html.ditaval" + filter "${projectDirPath}/resources/html.ditaval" properties { property(name: 'args.copycss', value: 'yes') property(name: 'args.css', value: 'dita-ot-doc.css') property(name: 'args.csspath', value: 'css') - property(name: 'args.cssroot', value: "${projectDir}/resources/") + property(name: 'args.cssroot', value: "${projectDirPath}/resources/") property(name: 'args.gen.task.lbl', value: 'YES') - property(name: 'args.hdr', value: "${projectDir}/resources/header.xml") + property(name: 'args.hdr', value: "${projectDirPath}/resources/header.xml") property(name: 'args.rellinks', value: 'noparent') property(name: 'html5.toc.generate', value: 'no') property(name: 'nav-toc', value: 'partial') @@ -127,7 +133,7 @@ task html(type: DitaOtTask, dependsOn: autoGenerate) { } task htmlhelp(type: DitaOtTask, dependsOn: autoGenerate) { - input "${projectDir}/userguide.ditamap" + input "${projectDirPath}/userguide.ditamap" output outputDir transtype 'htmlhelp' filter ditavalFile @@ -136,52 +142,79 @@ task htmlhelp(type: DitaOtTask, dependsOn: autoGenerate) { property(name: 'args.copycss', value: 'yes') property(name: 'args.css', value: 'dita-ot-doc.css') property(name: 'args.csspath', value: 'css') - property(name: 'args.cssroot', value: "${projectDir}/resources/") + property(name: 'args.cssroot', value: "${projectDirPath}/resources/") property(name: 'args.gen.task.lbl', value: 'YES') } doLast { - ant.move(todir: outputDir, failonerror: 'no') { - fileset(dir: "${outputDir}/htmlhelp", includes: '*.chm') + // Move .chm files using modern Gradle file operations + def htmlhelpDir = file("${outputDir}/htmlhelp") + if (htmlhelpDir.exists()) { + copy { + from htmlhelpDir + into outputDir + include '*.chm' + } + // Clean up the htmlhelp directory + delete htmlhelpDir } - - ant.delete(dir: "${outputDir}/htmlhelp") } } task cleanUp { doLast { - ant.delete(dir: outputDir) + delete outputDir + } +} + +// Get git commit hash at configuration time for tasks that need it +def getGitCommitHash() { + try { + def result = new ByteArrayOutputStream() + exec { + workingDir = layout.projectDirectory.asFile + commandLine 'git', 'rev-parse', 'HEAD' + standardOutput = result + ignoreExitValue = true + } + return result.toString().trim() + } catch (Exception e) { + logger.warn("Could not get git commit hash: ${e.message}") + return 'unknown' } } -def commit = new ByteArrayOutputStream() +// Store git commit for use by tasks +def gitCommitHash = getGitCommitHash() task gitMetadata { - doLast { - exec { - workingDir = projectDir - commandLine 'git' - args = ['rev-parse', 'HEAD'] - standardOutput = commit + // This task just logs the git commit for reference + doLast { + logger.info("Git commit: ${gitCommitHash}") } - } + + // Mark outputs to help with up-to-date checking + outputs.upToDateWhen { false } // Always run since git commit changes frequently } task site(type: DitaOtTask) { dependsOn 'messages', 'params', 'extensionPoints', 'gitMetadata' - input file("${projectDir}/site.ditamap") + input file("${projectDirPath}/site.ditamap") output getPropertyOrDefault('outputDir', "${buildDir}/site") - filter "${projectDir}/resources/site.ditaval" + filter "${projectDirPath}/resources/site.ditaval" transtype 'org.dita-ot.html' + // Evaluate the noCommitMeta flag at configuration time + def includeCommitMeta = !providers.gradleProperty('noCommitMeta').map { Boolean.parseBoolean(it) }.getOrElse(false) + properties { property(name: 'args.gen.task.lbl', value: 'YES') property(name: 'args.rellinks', value: 'noparent') - if (!(project.hasProperty('noCommitMeta') && Boolean.parseBoolean(project.property('noCommitMeta')))) { - property(name: 'commit', value: commit) + if (includeCommitMeta) { + // Use the git commit hash obtained at configuration time + property(name: 'commit', value: gitCommitHash) } } } diff --git a/gradle.properties b/gradle.properties index 87bfb2dba..f8f1fc682 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,10 @@ # Fix Java memory errors with Gradle 5.2 org.gradle.jvmargs = -Xmx1024m + +# Gradle 8 features for better performance and caching +# ↓ Not supported by eerohele/dita-ot-gradle ↓ +# org.gradle.configuration-cache=true +# org.gradle.configuration-cache.problems=warn +# ↑ Not supported by eerohele/dita-ot-gradle ↑ +org.gradle.parallel=true +org.gradle.caching=true From ab3d5a6660c0e50b35bec158c999b58a067be79e Mon Sep 17 00:00:00 2001 From: Roger Sheen Date: Sun, 16 Nov 2025 23:38:01 +0100 Subject: [PATCH 2/8] Test jyjeanne/dita-ot-gradle 2.2.0 Per https://github.com/jyjeanne/dita-ot-gradle#quick-migration-tldr Signed-off-by: Roger Sheen --- build.gradle | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 720917b1d..3aac4c4bf 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'com.github.eerohele.dita-ot-gradle' version '0.7.1' + id 'io.github.jyjeanne.dita-ot-gradle' version '2.2.0' id 'com.github.eerohele.saxon-gradle' version '0.9.0-beta4' } @@ -18,7 +18,7 @@ dependencies { saxon 'net.sf.saxon:Saxon-HE:10.6' } -import com.github.eerohele.DitaOtTask +import com.github.jyjeanne.DitaOtTask import com.github.eerohele.SaxonXsltTask import org.gradle.process.ExecOperations @@ -41,7 +41,9 @@ String toURI(String path) { file(path).toURI().toString() } +// Set DITA-OT directory: pass as parameter -PditaHome or fall back to parent when run in core repo. ditaOt.dir ditaHome +// > Could not get unknown property 'ditaOt' for root project 'docs' of type org.gradle.api.Project. task messages(type: SaxonXsltTask) { input "${configDir}/messages.xml" From 567d0a3e625ebfaee0a5281c4acff0f4ca0f9d68 Mon Sep 17 00:00:00 2001 From: Roger Sheen Date: Sun, 7 Dec 2025 22:11:46 +0100 Subject: [PATCH 3/8] Explicitly configure ditaOt directory in each task Per https://github.com/dita-ot/docs/pull/645#discussion_r2541633608 Signed-off-by: Roger Sheen --- build.gradle | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 3aac4c4bf..81a2635f9 100644 --- a/build.gradle +++ b/build.gradle @@ -41,10 +41,6 @@ String toURI(String path) { file(path).toURI().toString() } -// Set DITA-OT directory: pass as parameter -PditaHome or fall back to parent when run in core repo. -ditaOt.dir ditaHome -// > Could not get unknown property 'ditaOt' for root project 'docs' of type org.gradle.api.Project. - task messages(type: SaxonXsltTask) { input "${configDir}/messages.xml" output "${projectDirPath}/topics/error-messages.xml" @@ -101,6 +97,8 @@ task autoGenerate(dependsOn: [messages, params, extensionPoints, generatePlatfor } task pdf(type: DitaOtTask, dependsOn: autoGenerate) { + // Set DITA-OT directory: pass as parameter -PditaHome or fall back to parent when run in core repo. + ditaOt file(findProperty('ditaHome') ?: ditaHome) input "${projectDirPath}/userguide-book.ditamap" output outputDir transtype 'pdf' @@ -116,6 +114,8 @@ task pdf(type: DitaOtTask, dependsOn: autoGenerate) { } task html(type: DitaOtTask, dependsOn: autoGenerate) { + // Set DITA-OT directory: pass as parameter -PditaHome or fall back to parent when run in core repo. + ditaOt file(findProperty('ditaHome') ?: ditaHome) input "${projectDirPath}/userguide.ditamap" output outputDir transtype 'html5' @@ -135,6 +135,8 @@ task html(type: DitaOtTask, dependsOn: autoGenerate) { } task htmlhelp(type: DitaOtTask, dependsOn: autoGenerate) { + // Set DITA-OT directory: pass as parameter -PditaHome or fall back to parent when run in core repo. + ditaOt file(findProperty('ditaHome') ?: ditaHome) input "${projectDirPath}/userguide.ditamap" output outputDir transtype 'htmlhelp' @@ -202,6 +204,8 @@ task gitMetadata { task site(type: DitaOtTask) { dependsOn 'messages', 'params', 'extensionPoints', 'gitMetadata' + // Set DITA-OT directory: pass as parameter -PditaHome or fall back to parent when run in core repo. + ditaOt file(findProperty('ditaHome') ?: ditaHome) input file("${projectDirPath}/site.ditamap") output getPropertyOrDefault('outputDir', "${buildDir}/site") filter "${projectDirPath}/resources/site.ditaval" From 3bbc3315524dc81c63727bb432680473b294922f Mon Sep 17 00:00:00 2001 From: Roger Sheen Date: Sun, 7 Dec 2025 22:40:23 +0100 Subject: [PATCH 4/8] Bump jyjeanne/dita-ot-gradle from 2.2.0 to 2.3.0 https://github.com/jyjeanne/dita-ot-gradle/releases/tag/v2.3.0 Signed-off-by: Roger Sheen --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 81a2635f9..862d8ed14 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'io.github.jyjeanne.dita-ot-gradle' version '2.2.0' + id 'io.github.jyjeanne.dita-ot-gradle' version '2.3.0' id 'com.github.eerohele.saxon-gradle' version '0.9.0-beta4' } From 114bb0b6a0b31b0ff53500bc33727aa7e556d7db Mon Sep 17 00:00:00 2001 From: Roger Sheen Date: Thu, 11 Dec 2025 15:07:01 +0100 Subject: [PATCH 5/8] Pass DITA-OT parameters with ditaProperties.put() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use ditaProperties MapProperty directly for compatibility with jyjeanne/dita-ot-gradle v2.3.0 Per https://github.com/dita-ot/docs/pull/645#issuecomment-3639784884   Signed-off-by: Roger Sheen --- build.gradle | 60 ++++++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 32 deletions(-) diff --git a/build.gradle b/build.gradle index 862d8ed14..502adfbb4 100644 --- a/build.gradle +++ b/build.gradle @@ -104,13 +104,12 @@ task pdf(type: DitaOtTask, dependsOn: autoGenerate) { transtype 'pdf' filter "${projectDirPath}/resources/pdf.ditaval" - properties { - property(name: 'args.chapter.layout', value: 'BASIC') - property(name: 'args.gen.task.lbl', value: 'YES') - property(name: 'include.rellinks', value: '#default external') - property(name: 'outputFile.base', value: 'userguide') - property(name: 'theme', value: "${projectDirPath}/samples/themes/dita-ot-docs-theme.yaml") - } + // Use ditaProperties MapProperty directly for v2.3.0 compatibility + ditaProperties.put('args.chapter.layout', 'BASIC') + ditaProperties.put('args.gen.task.lbl', 'YES') + ditaProperties.put('include.rellinks', '#default external') + ditaProperties.put('outputFile.base', 'userguide') + ditaProperties.put('theme', "${projectDirPath}/samples/themes/dita-ot-docs-theme.yaml") } task html(type: DitaOtTask, dependsOn: autoGenerate) { @@ -121,17 +120,16 @@ task html(type: DitaOtTask, dependsOn: autoGenerate) { transtype 'html5' filter "${projectDirPath}/resources/html.ditaval" - properties { - property(name: 'args.copycss', value: 'yes') - property(name: 'args.css', value: 'dita-ot-doc.css') - property(name: 'args.csspath', value: 'css') - property(name: 'args.cssroot', value: "${projectDirPath}/resources/") - property(name: 'args.gen.task.lbl', value: 'YES') - property(name: 'args.hdr', value: "${projectDirPath}/resources/header.xml") - property(name: 'args.rellinks', value: 'noparent') - property(name: 'html5.toc.generate', value: 'no') - property(name: 'nav-toc', value: 'partial') - } + // Use ditaProperties MapProperty directly for v2.3.0 compatibility + ditaProperties.put('args.copycss', 'yes') + ditaProperties.put('args.css', 'dita-ot-doc.css') + ditaProperties.put('args.csspath', 'css') + ditaProperties.put('args.cssroot', "${projectDirPath}/resources/") + ditaProperties.put('args.gen.task.lbl', 'YES') + ditaProperties.put('args.hdr', "${projectDirPath}/resources/header.xml") + ditaProperties.put('args.rellinks', 'noparent') + ditaProperties.put('html5.toc.generate', 'no') + ditaProperties.put('nav-toc', 'partial') } task htmlhelp(type: DitaOtTask, dependsOn: autoGenerate) { @@ -142,13 +140,12 @@ task htmlhelp(type: DitaOtTask, dependsOn: autoGenerate) { transtype 'htmlhelp' filter ditavalFile - properties { - property(name: 'args.copycss', value: 'yes') - property(name: 'args.css', value: 'dita-ot-doc.css') - property(name: 'args.csspath', value: 'css') - property(name: 'args.cssroot', value: "${projectDirPath}/resources/") - property(name: 'args.gen.task.lbl', value: 'YES') - } + // Use ditaProperties MapProperty directly for v2.3.0 compatibility + ditaProperties.put('args.copycss', 'yes') + ditaProperties.put('args.css', 'dita-ot-doc.css') + ditaProperties.put('args.csspath', 'css') + ditaProperties.put('args.cssroot', "${projectDirPath}/resources/") + ditaProperties.put('args.gen.task.lbl', 'YES') doLast { // Move .chm files using modern Gradle file operations @@ -215,13 +212,12 @@ task site(type: DitaOtTask) { // Evaluate the noCommitMeta flag at configuration time def includeCommitMeta = !providers.gradleProperty('noCommitMeta').map { Boolean.parseBoolean(it) }.getOrElse(false) - properties { - property(name: 'args.gen.task.lbl', value: 'YES') - property(name: 'args.rellinks', value: 'noparent') - if (includeCommitMeta) { - // Use the git commit hash obtained at configuration time - property(name: 'commit', value: gitCommitHash) - } + // Use ditaProperties MapProperty directly for v2.3.0 compatibility + ditaProperties.put('args.gen.task.lbl', 'YES') + ditaProperties.put('args.rellinks', 'noparent') + if (includeCommitMeta) { + // Use the git commit hash obtained at configuration time + ditaProperties.put('commit', gitCommitHash) } } From 4174c84d139bee3307c11287b4e2ead61a2a8cf0 Mon Sep 17 00:00:00 2001 From: Roger Sheen Date: Fri, 2 Jan 2026 00:57:43 +0200 Subject: [PATCH 6/8] Bump jyjeanne/dita-ot-gradle from 2.3.0 to 2.3.1 https://github.com/jyjeanne/dita-ot-gradle/releases/tag/v2.3.1 Signed-off-by: Roger Sheen --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 502adfbb4..43583b7ac 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'io.github.jyjeanne.dita-ot-gradle' version '2.3.0' + id 'io.github.jyjeanne.dita-ot-gradle' version '2.3.1' id 'com.github.eerohele.saxon-gradle' version '0.9.0-beta4' } From e2a34cea630020f671a69d7e7293eba666cc32d7 Mon Sep 17 00:00:00 2001 From: Roger Sheen Date: Fri, 2 Jan 2026 01:03:33 +0200 Subject: [PATCH 7/8] Revert "Pass DITA-OT parameters with ditaProperties.put()" This reverts commit 114bb0b6a0b31b0ff53500bc33727aa7e556d7db. Signed-off-by: Roger Sheen --- build.gradle | 60 ++++++++++++++++++++++++++++------------------------ 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/build.gradle b/build.gradle index 43583b7ac..28aa0e79e 100644 --- a/build.gradle +++ b/build.gradle @@ -104,12 +104,13 @@ task pdf(type: DitaOtTask, dependsOn: autoGenerate) { transtype 'pdf' filter "${projectDirPath}/resources/pdf.ditaval" - // Use ditaProperties MapProperty directly for v2.3.0 compatibility - ditaProperties.put('args.chapter.layout', 'BASIC') - ditaProperties.put('args.gen.task.lbl', 'YES') - ditaProperties.put('include.rellinks', '#default external') - ditaProperties.put('outputFile.base', 'userguide') - ditaProperties.put('theme', "${projectDirPath}/samples/themes/dita-ot-docs-theme.yaml") + properties { + property(name: 'args.chapter.layout', value: 'BASIC') + property(name: 'args.gen.task.lbl', value: 'YES') + property(name: 'include.rellinks', value: '#default external') + property(name: 'outputFile.base', value: 'userguide') + property(name: 'theme', value: "${projectDirPath}/samples/themes/dita-ot-docs-theme.yaml") + } } task html(type: DitaOtTask, dependsOn: autoGenerate) { @@ -120,16 +121,17 @@ task html(type: DitaOtTask, dependsOn: autoGenerate) { transtype 'html5' filter "${projectDirPath}/resources/html.ditaval" - // Use ditaProperties MapProperty directly for v2.3.0 compatibility - ditaProperties.put('args.copycss', 'yes') - ditaProperties.put('args.css', 'dita-ot-doc.css') - ditaProperties.put('args.csspath', 'css') - ditaProperties.put('args.cssroot', "${projectDirPath}/resources/") - ditaProperties.put('args.gen.task.lbl', 'YES') - ditaProperties.put('args.hdr', "${projectDirPath}/resources/header.xml") - ditaProperties.put('args.rellinks', 'noparent') - ditaProperties.put('html5.toc.generate', 'no') - ditaProperties.put('nav-toc', 'partial') + properties { + property(name: 'args.copycss', value: 'yes') + property(name: 'args.css', value: 'dita-ot-doc.css') + property(name: 'args.csspath', value: 'css') + property(name: 'args.cssroot', value: "${projectDirPath}/resources/") + property(name: 'args.gen.task.lbl', value: 'YES') + property(name: 'args.hdr', value: "${projectDirPath}/resources/header.xml") + property(name: 'args.rellinks', value: 'noparent') + property(name: 'html5.toc.generate', value: 'no') + property(name: 'nav-toc', value: 'partial') + } } task htmlhelp(type: DitaOtTask, dependsOn: autoGenerate) { @@ -140,12 +142,13 @@ task htmlhelp(type: DitaOtTask, dependsOn: autoGenerate) { transtype 'htmlhelp' filter ditavalFile - // Use ditaProperties MapProperty directly for v2.3.0 compatibility - ditaProperties.put('args.copycss', 'yes') - ditaProperties.put('args.css', 'dita-ot-doc.css') - ditaProperties.put('args.csspath', 'css') - ditaProperties.put('args.cssroot', "${projectDirPath}/resources/") - ditaProperties.put('args.gen.task.lbl', 'YES') + properties { + property(name: 'args.copycss', value: 'yes') + property(name: 'args.css', value: 'dita-ot-doc.css') + property(name: 'args.csspath', value: 'css') + property(name: 'args.cssroot', value: "${projectDirPath}/resources/") + property(name: 'args.gen.task.lbl', value: 'YES') + } doLast { // Move .chm files using modern Gradle file operations @@ -212,12 +215,13 @@ task site(type: DitaOtTask) { // Evaluate the noCommitMeta flag at configuration time def includeCommitMeta = !providers.gradleProperty('noCommitMeta').map { Boolean.parseBoolean(it) }.getOrElse(false) - // Use ditaProperties MapProperty directly for v2.3.0 compatibility - ditaProperties.put('args.gen.task.lbl', 'YES') - ditaProperties.put('args.rellinks', 'noparent') - if (includeCommitMeta) { - // Use the git commit hash obtained at configuration time - ditaProperties.put('commit', gitCommitHash) + properties { + property(name: 'args.gen.task.lbl', value: 'YES') + property(name: 'args.rellinks', value: 'noparent') + if (includeCommitMeta) { + // Use the git commit hash obtained at configuration time + property(name: 'commit', value: gitCommitHash) + } } } From 3e0fce216d51a108740e2cf45c2d6bad7efe3435 Mon Sep 17 00:00:00 2001 From: Roger Sheen Date: Mon, 5 Jan 2026 23:12:12 +0100 Subject: [PATCH 8/8] Bump jyjeanne/dita-ot-gradle from 2.3.1 to 2.3.2 https://github.com/jyjeanne/dita-ot-gradle/releases/tag/v2.3.2 Signed-off-by: Roger Sheen --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 28aa0e79e..bc7f60ee7 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'io.github.jyjeanne.dita-ot-gradle' version '2.3.1' + id 'io.github.jyjeanne.dita-ot-gradle' version '2.3.2' id 'com.github.eerohele.saxon-gradle' version '0.9.0-beta4' }