Skip to content

Commit 0faced6

Browse files
doc: fix Java API site generation
Signed-off-by: Andreas Reichel <[email protected]>
1 parent 8bd86bc commit 0faced6

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
#run: pip install furo myst_parser sphinx-prompt sphinx_substitution_extensions sphinx_issues sphinx_inline_tabs pygments
5353
run: pip install furo myst_parser sphinx_substitution_extensions sphinx_issues sphinx_inline_tabs pygments
5454
- name: Build Sphinx documentation with Gradle
55-
run: FLOATING_TOC=false ./gradlew -DFLOATING_TOC=false gitChangelogTask renderRR xslt xmldoc sphinx
55+
run: ./gradlew -DFLOATING_TOC=false gitChangelogTask renderRR xslt xmldoc sphinx
5656
- name: Deploy Sphinx documentation
5757
uses: actions/configure-pages@main
5858
- name: Upload artifact

build.gradle

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,15 +206,17 @@ tasks.register('xmldoc', Javadoc) {
206206
title = "API $version"
207207

208208
options.addBooleanOption("rst", true)
209-
if (Boolean.parseBoolean(System.getenv().getOrDefault("FLOATING_TOC", "false"))) {
210-
options.addBooleanOption("withFloatingToc","true")
209+
if (Boolean.parseBoolean(System.getProperty("FLOATING_TOC", "true"))) {
210+
options.addBooleanOption("withFloatingToc", true)
211211
}
212212
options.addStringOption("basePackage", "net.sf.jsqlparser")
213213
options.addStringOption("filename", outFile.getName())
214214

215-
copy {
216-
from rstFile
217-
into layout.projectDirectory.dir("src/site/sphinx/").asFile
215+
doLast {
216+
copy {
217+
from rstFile
218+
into layout.projectDirectory.dir("src/site/sphinx/").asFile
219+
}
218220
}
219221
}
220222

@@ -481,7 +483,7 @@ tasks.register('xslt', SaxonXsltTask) {
481483
stylesheet file('src/main/resources/rr/xhtml2rst.xsl')
482484

483485
parameters(
484-
"withFloatingToc": System.getenv().getOrDefault("FLOATING_TOC", "true"),
486+
"withFloatingToc": System.getProperty("FLOATING_TOC", "true"),
485487
"isSnapshot": Boolean.toString(version.endsWith("-SNAPSHOT"))
486488
)
487489

0 commit comments

Comments
 (0)