forked from DataDog/dd-trace-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
52 lines (42 loc) · 1.48 KB
/
build.gradle
File metadata and controls
52 lines (42 loc) · 1.48 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
apply from: "$rootDir/gradle/java.gradle"
description = 'dd-smoke-tests'
dependencies {
api libs.okhttp
api project(':dd-java-agent:testing')
api project(':utils:test-agent-utils:decoder')
compileOnly(libs.junit.jupiter)
compileOnly(libs.bundles.groovy)
compileOnly(libs.bundles.spock)
}
tasks.withType(GroovyCompile).configureEach {
configureCompiler(
it,
8,
JavaVersion.VERSION_1_8,
"CharBuffer#flip() signature needs to be ()Ljava.nio.Buffer (to run on JDK8)."
)
}
// Disable forbiddenApis for all smoke-test modules
allprojects {
tasks.matching { it.name.startsWith('forbiddenApis') }.configureEach {
enabled = false
}
}
subprojects { Project subProj ->
// Don't need javadoc task run for internal projects.
subProj.tasks.withType(Javadoc).configureEach { enabled = false }
subProj.evaluationDependsOn ':dd-java-agent'
subProj.tasks.withType(Test).configureEach { subTask ->
def agentTaskRef = project(':dd-java-agent').tasks.named('shadowJar', ShadowJar)
dependsOn agentTaskRef
// Tests depend on this to know where to run things and what agent jar to use
jvmArgs "-Ddatadog.smoketest.builddir=${buildDir}"
jvmArgumentProviders.add(new CommandLineArgumentProvider() {
@Override
Iterable<String> asArguments() {
return agentTaskRef.map { ["-Ddatadog.smoketest.agent.shadowJar.path=${it.archiveFile.get()}"] }.get()
}
})
}
}