Move play2.6 tests out of subproject and into sourceSet
MODIFY
dd-java-agent/instrumentation/play-2.4/play-2.4.gradle
dd-java-agent/instrumentation/play-2.4/play-2.4.gradle
+plugins {
+ id 'org.unbroken-dome.test-sets' version '1.4.4'
+}
apply from: "${rootDir}/gradle/java.gradle"
apply from: "${rootDir}/gradle/test-with-scala.gradle"
+testSets {
+ play26Test
+}
+
+compilePlay26TestGroovy {
+ classpath = classpath.plus(files(compilePlay26TestScala.destinationDir))
+ dependsOn compilePlay26TestScala
+}
+
+if (JavaVersion.current().isJava9Compatible()) {
+ // required to allow reflection into java9 for testing
+ play26Test {
+ jvmArgs '--add-opens'
+ jvmArgs 'java.base/jdk.internal.loader=ALL-UNNAMED'
+ }
+}
+
+test.dependsOn play26Test
+
dependencies {
compileOnly group: 'com.typesafe.play', name: 'play_2.11', version: '2.4.0'
@@ -17,6 +39,16 @@ dependencies {
testCompile project(':dd-java-agent:instrumentation:java-concurrent')
testCompile project(':dd-java-agent:instrumentation:trace-annotation')
testCompile group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.6.0'
+
+
+ play26TestCompile group: 'org.scala-lang', name: 'scala-library', version: '2.11.12'
+ play26TestCompile project(':dd-java-agent:instrumentation:play-2.4')
+ play26TestCompile group: 'com.typesafe.play', name: 'play_2.11', version: '2.6.0'
+ play26TestCompile group: 'com.typesafe.play', name: 'play-test_2.11', version: '2.6.0'
+ play26TestCompile project(':dd-java-agent:testing')
+ play26TestCompile project(':dd-java-agent:instrumentation:java-concurrent')
+ play26TestCompile project(':dd-java-agent:instrumentation:trace-annotation')
+ play26TestCompile group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.6.0'
}
test {

DELETE
dd-java-agent/instrumentation/play-2.4/play-2.6-testing/play-2.6-testing.gradle
-apply from: "${rootDir}/gradle/java.gradle"
-apply from: "${rootDir}/gradle/test-with-scala.gradle"
-
-dependencies {
- compileOnly group: 'com.typesafe.play', name: 'play_2.11', version: '2.6.0'
-
- compile project(':dd-trace-api')
- compile project(':dd-java-agent:agent-tooling')
- compile deps.bytebuddy
- compile deps.opentracing
- compile deps.autoservice
-
- testCompile group: 'org.scala-lang', name: 'scala-library', version: '2.11.12'
- testCompile project(':dd-java-agent:instrumentation:play-2.4')
- testCompile group: 'com.typesafe.play', name: 'play_2.11', version: '2.6.0'
- testCompile group: 'com.typesafe.play', name: 'play-test_2.11', version: '2.6.0'
- testCompile project(':dd-java-agent:testing')
- testCompile project(':dd-java-agent:instrumentation:java-concurrent')
- testCompile project(':dd-java-agent:instrumentation:trace-annotation')
- testCompile group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.6.0'
-}
-
-test {
- if (!JavaVersion.current().isJava8Compatible()) {
- exclude '*Play*Test*'
- }
-}

RENAME
dd-java-agent/instrumentation/play-2.4/play-2.6-testing/src/test/groovy/Play26Test.groovy
dd-java-agent/instrumentation/play-2.4/src/play26Test/groovy/Play26Test.groovy
RENAME
dd-java-agent/instrumentation/play-2.4/play-2.6-testing/src/test/scala/Play26TestUtils.scala
dd-java-agent/instrumentation/play-2.4/src/play26Test/scala/Play26TestUtils.scala
MODIFY
settings.gradle
settings.gradle
@@ -39,7 +39,6 @@ include ':dd-java-agent:instrumentation:trace-annotation'
if (JavaVersion.current().isJava8Compatible()) {
// java 8 only instrumentation
include ':dd-java-agent:instrumentation:play-2.4'
- include ':dd-java-agent:instrumentation:play-2.4:play-2.6-testing'
// benchmark
include ':dd-java-agent:benchmark'

Move play2.6 tests out of subproject and into sourceSet