diff --git a/buildSrc/src/main/kotlin/otel.java-conventions.gradle.kts b/buildSrc/src/main/kotlin/otel.java-conventions.gradle.kts index a1445ef80a3..5b011273ff4 100644 --- a/buildSrc/src/main/kotlin/otel.java-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/otel.java-conventions.gradle.kts @@ -24,6 +24,13 @@ base { } } +// normalize timestamps and file ordering in jars, making the outputs reproducible +// see open-telemetry/opentelemetry-java#4488 +tasks.withType().configureEach { + isPreserveFileTimestamps = false + isReproducibleFileOrder = true +} + java { toolchain { languageVersion.set(JavaLanguageVersion.of(17))