diff --git a/dd-java-agent/instrumentation/instrumentation.gradle b/dd-java-agent/instrumentation/instrumentation.gradle index ffe29eb393..0470338402 100644 --- a/dd-java-agent/instrumentation/instrumentation.gradle +++ b/dd-java-agent/instrumentation/instrumentation.gradle @@ -1,5 +1,10 @@ // this project will run in isolation under the agent's classloader buildscript { + + repositories { + mavenCentral() + } + dependencies { classpath "net.bytebuddy:byte-buddy-gradle-plugin:${versions.bytebuddy}" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}" diff --git a/gradle/test-with-kotlin.gradle b/gradle/test-with-kotlin.gradle index bd2f8ad295..9407600f38 100644 --- a/gradle/test-with-kotlin.gradle +++ b/gradle/test-with-kotlin.gradle @@ -1,6 +1,12 @@ // Enable testing kotlin code in groovy spock tests. apply plugin: 'kotlin' +kotlin { + //This option prevents compilation issues when switching branches while refactoring java code to kotlin. + //After we are done refactoring java -> kotlin when can disable this and use gradle build cache features. + copyClassesToJavaOutput = true +} + compileTestGroovy { classpath = classpath.plus(files(compileTestKotlin.destinationDir)) dependsOn compileTestKotlin