Skip to content

Commit fb45cbe

Browse files
committed
Enable reproducible builds for documentation
1 parent 205cc22 commit fb45cbe

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

docs/build.gradle.kts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ dependencies {
1616
}
1717

1818
tasks.withType(org.asciidoctor.gradle.jvm.AbstractAsciidoctorTask::class) {
19+
notCompatibleWithConfigurationCache("Filters configurations at execution time")
20+
attributes(
21+
mapOf(
22+
// set revNumber to the current project version
23+
"revnumber" to projectVersion,
24+
// build reproducible byte-by-byte identical documentation
25+
"reproducible" to "",
26+
)
27+
)
1928
// set source directory to docs/ instead of docs/src/docs/asciidoc/
2029
sourceDir(sourceDir.parentFile.parentFile.parentFile)
2130
// suppress the warning 'Native subprocess control requires open access to the JDK IO subsystem'
@@ -68,10 +77,6 @@ tasks.register<Zip>("all", Zip::class) {
6877
description = "Builds all documentation"
6978
archiveFileName.set("tai-e-docs.zip")
7079
destinationDirectory.set(layout.buildDirectory)
71-
// The generated documentation contains timestamps, which prevents
72-
// Gradle 9.0.0's default reproducible archive feature from working.
73-
// We preserve these timestamps to maintain clarity about generation time.
74-
isPreserveFileTimestamps = true
7580
dependsOn(":docs:asciidoctor", ":javadoc")
7681
from(layout.buildDirectory.dir("docs/asciidoc")) {
7782
into("$projectVersion/reference")

0 commit comments

Comments
 (0)