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

76 lines
2.1 KiB
Groovy

// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_1_8
maxJavaVersionForTests = JavaVersion.VERSION_1_8
}
apply plugin: 'version-scan'
versionScan {
group = "io.ratpack"
module = 'ratpack-core'
versions = "[1.4.0,)"
scanMethods = true
verifyPresent = [
"ratpack.path.PathBinding": "getDescription",
]
}
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 {
dirName = 'test'
}
}
dependencies {
main_java8CompileOnly group: 'io.ratpack', name: 'ratpack-core', version: '1.4.0'
main_java8Compile project(':dd-trace-ot')
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 group: 'io.ratpack', name: 'ratpack-groovy-test', version: '1.4.0'
}
configurations.latestDepTestCompile {
resolutionStrategy {
force group: 'io.ratpack', name: 'ratpack-groovy-test', version: '+'
}
}