Hey,
I was playing around with configuration cache and it complained about this part in my `build.gradle.kts`:
val openTelemetryJarFileName = "opentelemetry-javaagent-1.25.1.jar"
val copyOpenTelemetryJavaAgent by tasks.registering(Copy::class) {
from(layout.projectDirectory.dir("resources/opentelemetry"))
into(jibAppRoot)
doLast {
// Required for reproducible builds.
jibAppRoot.file(openTelemetryJarFileName).asFile.setLastModified(0)
}
}
cannot serialize Gradle script object references as these are not supported with the configuration cache.
I guess it does not like, that I am using a variable inside the task.
How do I solve this?
I am thinking about a task, that generates
opentelemetry-javaagent-1.25.1.jar
as output, which I can then (hopefully) use as input for the
copyOpenTelemetryJavaAgent
task