Skip to content

Commit a1c72d1

Browse files
authored
Normalize timestamps and file ordering in jars, making the outputs reproducible (#6471)
1 parent dab1a6c commit a1c72d1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

buildSrc/src/main/kotlin/otel.java-conventions.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@ base {
2424
}
2525
}
2626

27+
// normalize timestamps and file ordering in jars, making the outputs reproducible
28+
// see open-telemetry/opentelemetry-java#4488
29+
tasks.withType<AbstractArchiveTask>().configureEach {
30+
isPreserveFileTimestamps = false
31+
isReproducibleFileOrder = true
32+
}
33+
2734
java {
2835
toolchain {
2936
languageVersion.set(JavaLanguageVersion.of(17))

0 commit comments

Comments
 (0)