Skip to content

Commit

Permalink
Merge pull request #5245 from bjhargrave/javadoc-notimestamp
Browse files Browse the repository at this point in the history
build: Use -notimestamp option for javadoc for reproducibility
  • Loading branch information
bjhargrave committed May 10, 2022
2 parents 4f96bc4 + 0b4f6ad commit dc001b1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
Expand Up @@ -86,6 +86,7 @@ public Jar doJavadoc(Map<String, String> options, boolean exportsOnly) throws Ex

try (PrintWriter writer = IO.writer(javadocOptions)) {
writer.println("-quiet");
writer.println("-notimestamp"); // reproducibility
writer.println("-protected");
writer.printf("%s '%s'%n", "-d", fileName(javadoc));
writer.println("-charset 'UTF-8'");
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Expand Up @@ -42,6 +42,7 @@ subprojects {
"NotThreadSafe:t:",
"GuardedBy:mf:\"Guarded By:\""
]
options.noTimestamp = true
}
tasks.named("test") {
useJUnitPlatform()
Expand Down
8 changes: 8 additions & 0 deletions gradle-plugins/biz.aQute.bnd.gradle/build.gradle.kts
Expand Up @@ -192,6 +192,14 @@ tasks.withType<AbstractArchiveTask> {
isReproducibleFileOrder = true
}

// Reproducible javadoc
tasks.withType<Javadoc> {
options {
this as StandardJavadocDocletOptions // unsafe cast
isNoTimestamp = true
}
}

tasks.pluginUnderTestMetadata {
// Include dsl SourceSet
pluginClasspath.from(sourceSets["dsl"].output)
Expand Down
1 change: 1 addition & 0 deletions maven/bnd-plugin-parent/pom.xml
Expand Up @@ -294,6 +294,7 @@
<configuration>
<detectJavaApiLink>false</detectJavaApiLink>
<doclint>none</doclint>
<notimestamp>true</notimestamp>
</configuration>
</plugin>
<plugin>
Expand Down

0 comments on commit dc001b1

Please sign in to comment.