-
Notifications
You must be signed in to change notification settings - Fork 344
Expand file tree
/
Copy pathbuild.gradle
More file actions
59 lines (53 loc) · 2.06 KB
/
Copy pathbuild.gradle
File metadata and controls
59 lines (53 loc) · 2.06 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
// Set properties before any plugins get loaded
ext {
minJavaVersionForTests = JavaVersion.VERSION_11
// Zulu has backported profiling support
forceJdk = ['ZULU8']
excludeJdk = ['SEMERU11', 'SEMERU17']
// By default tests with be compiled for `minJavaVersionForTests` version,
// but in this case we would like to avoid this since we would like to run with ZULU8
skipSettingTestJavaVersion = true
// need access to jdk.jfr package
skipSettingCompilerRelease = true
}
apply from: "$rootDir/gradle/java.gradle"
apply plugin: 'idea'
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')
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 {
setJavaVersion(it, 11)
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
// 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'*/])
}
}
forbiddenApisMain {
failOnMissingClasses = false
}
idea {
module {
jdkName = '11'
}
}