Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions dd-java-agent/instrumentation/gradle/gradle-3.0/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,14 @@ repositories {
dependencies {
compileOnly gradleApi()
}

// This module's Groovy classes are loaded into the user's Gradle daemon, which might bundle Groovy <3.0 (Gradle <7.x).
// Groovy 4 (bundled by the build's Gradle 9+) compiles invokedynamic by default, binding dynamic calls to
// org.codehaus.groovy.vmplugin.v8.IndyInterface — a class that only exists from Groovy
// 3.0 onwards. Under Groovy <3.0 that bootstrap target is missing, so the classes fail
// to link and CI Visibility never instruments the build. Force classic call-site
// dispatch so the emitted bytecode links on older daemons regardless of the build's
// bundled Groovy version.
tasks.withType(GroovyCompile).configureEach {
groovyOptions.optimizationOptions.indy = false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: TIL

}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void stopGradleTestKitDaemons() {

@TableTest({
"scenario | gradleVersion | projectName | successExpected | expectedTraces | expectedCoverages",
"succeed-old-gradle-3.5 | 3.5 | test-succeed-old-gradle | true | 5 | 1 ",
"succeed-old-gradle-4.10 | 4.10 | test-succeed-old-gradle | true | 5 | 1 ",
"succeed-legacy | 7.6.4 | test-succeed-legacy-instrumentation | true | 5 | 1 ",
"succeed-multi-module-legacy | 7.6.4 | test-succeed-multi-module-legacy-instrumentation | true | 7 | 2 ",
"succeed-multi-forks-legacy | 7.6.4 | test-succeed-multi-forks-legacy-instrumentation | true | 6 | 2 ",
Expand Down