opentelemetry-java-instrume.../dd-java-agent/instrumentation/ratpack-1.4/ratpack-1.4.gradle

72 lines
2.2 KiB
Groovy

// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
maxJavaVersionForTests = JavaVersion.VERSION_1_8
}
muzzle {
pass {
group = "io.ratpack"
module = 'ratpack-core'
versions = "[1.4.0,)"
}
// Some maven dependencies are missing for pre 1.0 ratpack, so we can't assertInverse.
fail {
group = "io.ratpack"
module = 'ratpack-core'
versions = "[1.0,1.4.0)"
}
}
apply from: "${rootDir}/gradle/java.gradle"
/*
Here we introduce a sourceSet for the java 8 code which needs to be compiled with a source and target of 1.8
The instrumentation classes must be compiled with java 7 and do nothing when ratpack is not on the classpath. The
java 8 classes are used lazily so there is no direct linking between the 1.7 and 1.8 bytecode.
*/
sourceSets {
main_java8 {
java.srcDirs "${project.projectDir}/src/main/java8"
}
}
compileMain_java8Java {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
// Note: ideally lombok plugin would do this for us, but currently it doesn't support custom
// source sets. See https://github.com/franzbecker/gradle-lombok/issues/17.
dependencies {
main_java8CompileOnly "org.projectlombok:lombok:${project.lombok.version}" transitive false
main_java8AnnotationProcessor "org.projectlombok:lombok:${project.lombok.version}" transitive false
}
apply plugin: 'org.unbroken-dome.test-sets'
testSets {
latestDepTest
}
dependencies {
main_java8CompileOnly group: 'io.ratpack', name: 'ratpack-core', version: '1.4.0'
main_java8Compile project(':dd-java-agent:agent-tooling')
main_java8Compile deps.bytebuddy
main_java8Compile deps.opentracing
annotationProcessor deps.autoservice
implementation deps.autoservice
compileOnly sourceSets.main_java8.compileClasspath
compile sourceSets.main_java8.output
testCompile project(':dd-java-agent:testing')
testCompile project(':dd-java-agent:instrumentation:java-concurrent')
testCompile project(':dd-java-agent:instrumentation:netty-4.1')
testCompile group: 'io.ratpack', name: 'ratpack-groovy-test', version: '1.4.0'
latestDepTestCompile group: 'io.ratpack', name: 'ratpack-groovy-test', version: '+'
}