-
Notifications
You must be signed in to change notification settings - Fork 333
Expand file tree
/
Copy pathbuild.gradle
More file actions
62 lines (54 loc) · 2.13 KB
/
build.gradle
File metadata and controls
62 lines (54 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
apply from: "$rootDir/gradle/java.gradle"
apply plugin: 'idea'
tracerJava {
addSourceSetFor(JavaVersion.VERSION_11) {
// By default tests with be compiled for `minJavaVersion` version,
// but in this case we would like to avoid this since we would like to run with ZULU8
applyForTestSources = false
}
}
testJvmConstraints {
minJavaVersion = JavaVersion.VERSION_11
// Zulu has backported profiling support
forceJdk = ['ZULU8']
excludeJdk = ['SEMERU11', 'SEMERU17']
}
dependencies {
api libs.slf4j
api project(':internal-api')
api project(':utils:version-utils')
api(project(':dd-java-agent:agent-bootstrap')) {
exclude group: 'com.datadoghq', module: 'agent-logging'
}
api project(':dd-java-agent:agent-profiling:profiling-controller')
api project(':dd-java-agent:agent-profiling:profiling-controller-jfr')
// Antithesis SDK for assertions and property testing - bundled in tracer JAR
implementation group: 'com.antithesis', name: 'sdk', version: '1.4.5'
testImplementation libs.bundles.junit5
testImplementation libs.bundles.mockito
testImplementation files(project(':dd-java-agent:agent-profiling:profiling-controller-jfr').sourceSets.test.output)
testImplementation project(':dd-java-agent:agent-profiling')
}
/*
Setup here is as following:
* We compile with Java11 compiler to get JFR definitions.
* We specify source/target as Java8 to get code that is loadable on Java8 - JFR defs are Java8 compatible.
* We force IDEA to treat this as Java11 project with 'idea' plugin below.
*/
[JavaCompile, GroovyCompile].each {
tasks.withType(it).configureEach {
configureCompiler(it, 11, JavaVersion.VERSION_1_8, "Need access to jdk.jfr package")
// Disable '-processing' because some annotations are not claimed.
// Disable '-options' because we are compiling for java8 without specifying bootstrap - intentionally.
// Disable '-path' because we do not have some of the paths seem to be missing.
options.compilerArgs.addAll(['-Xlint:all,-processing,-options,-path'/*, '-Werror'*/])
}
}
tasks.named("forbiddenApisMain") {
failOnMissingClasses = false
}
idea {
module {
jdkName = '11'
}
}