Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Use -notimestamp option for javadoc for reproducibility #5245

Merged
merged 1 commit into from May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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