Some tweaks to improve gradle cacheability
MODIFY
auto-exporters/auto-exporters.gradle
auto-exporters/auto-exporters.gradle
@@ -40,7 +40,7 @@ dependencies {
shadowInclude project(path: ':auto-exporters:opentelemetry-auto-exporter-zipkin', configuration: 'shadow')
}
-
+jar.enabled = false
shadowJar {
configurations = [project.configurations.shadowInclude]

MODIFY
auto-exporters/jaeger/jaeger.gradle
auto-exporters/jaeger/jaeger.gradle
@@ -14,6 +14,7 @@ dependencies {
implementation group: 'io.grpc', name: 'grpc-netty-shaded', version: '1.24.0'
}
+jar.enabled = false
shadowJar {
archiveClassifier = ''
}

MODIFY
auto-exporters/logging/logging.gradle
auto-exporters/logging/logging.gradle
@@ -11,6 +11,7 @@ dependencies {
compileOnly deps.opentelemetrySdkAutoConfig
}
+jar.enabled = false
shadowJar {
archiveClassifier = ''
}

MODIFY
auto-exporters/otlp/otlp.gradle
auto-exporters/otlp/otlp.gradle
@@ -14,6 +14,7 @@ dependencies {
implementation group: 'io.grpc', name: 'grpc-netty-shaded', version: '1.24.0'
}
+jar.enabled = false
shadowJar {
archiveClassifier = ''
}

MODIFY
auto-exporters/zipkin/zipkin.gradle
auto-exporters/zipkin/zipkin.gradle
@@ -12,6 +12,7 @@ dependencies {
compileOnly deps.opentelemetrySdkAutoConfig
}
+jar.enabled = false
shadowJar {
archiveClassifier = ''
}

MODIFY
gradle/java.gradle
gradle/java.gradle
@@ -36,14 +36,6 @@ java {
withSourcesJar()
}
-sourceSets {
- main {
- java {
- srcDir 'src/main/java'
- }
- }
-}
-
tasks.withType(JavaCompile) {
options.compilerArgs.addAll(['--release', project.ext.release.majorVersion])
}
@@ -289,3 +281,8 @@ tasks.withType(Test).configureEach {
junitXml.outputPerTestCase = true
}
}
+
+tasks.withType(AbstractArchiveTask) {
+ preserveFileTimestamps = false
+ reproducibleFileOrder = true
+}
\ No newline at end of file

Some tweaks to improve gradle cacheability (#1030)