Avoid compiling latest deps test in regular builds (#7385)

Resolves
https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/7255
This commit is contained in:
Lauri Tulmin 2022-12-10 02:23:58 +02:00 committed by GitHub
parent 81c3575fef
commit 0786371ec9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 0 deletions

View File

@ -118,6 +118,22 @@ if (testLatestDeps) {
}
}
}
} else {
afterEvaluate {
// Disable compiling latest dep tests for non latest dep builds in CI. This is needed to avoid
// breaking build because of a new library version which could force backporting latest dep
// fixes to release branches.
// This is only needed for modules where base version and latest dep tests use a different
// source directory.
var latestDepCompileTaskNames = arrayOf("compileLatestDepTestJava", "compileLatestDepTestGroovy", "compileLatestDepTestScala")
for (compileTaskName in latestDepCompileTaskNames) {
if (tasks.names.contains(compileTaskName)) {
tasks.named(compileTaskName).configure {
enabled = false
}
}
}
}
}
tasks {