-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathbuild.gradle.kts
84 lines (72 loc) · 2.71 KB
/
build.gradle.kts
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import org.hypertrace.gradle.publishing.License.APACHE_2_0;
plugins {
id("com.diffplug.spotless") version "5.2.0" apply false
id("org.hypertrace.publish-maven-central-plugin") version "1.0.6"
id("org.hypertrace.ci-utils-plugin") version "0.3.0"
id("org.gradle.test-retry") version "1.2.0" apply false
id("org.owasp.dependencycheck") version "7.1.1"
}
subprojects {
group = "org.hypertrace.agent"
description = "Hypertrace OpenTelemetry Javaagent"
apply(plugin = "java-library")
apply(plugin = "com.diffplug.spotless")
apply(from = "$rootDir/gradle/spotless.gradle")
pluginManager.withPlugin("java-library") {
configure<JavaPluginExtension> {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
repositories {
mavenCentral()
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
}
}
tasks.named<JavaCompile>("compileJava") {
options.compilerArgs.add("-Werror")
}
tasks.withType<JavaCompile> {
options.compilerArgs.add("-Xlint:unchecked")
options.isDeprecation = true
options.release.set(8)
}
dependencies {
add(JavaPlugin.TEST_IMPLEMENTATION_CONFIGURATION_NAME, "org.junit.jupiter:junit-jupiter-api:5.7.0")
add(JavaPlugin.TEST_RUNTIME_ONLY_CONFIGURATION_NAME, "org.junit.jupiter:junit-jupiter-engine:5.7.0")
add(JavaPlugin.TEST_IMPLEMENTATION_CONFIGURATION_NAME, "org.junit-pioneer:junit-pioneer:1.0.0")
}
tasks.named<Test>("test") {
useJUnitPlatform()
reports {
junitXml.isOutputPerTestCase = true
}
}
extra.set("versions", mapOf(
// when updating these values, some values must also be updated in buildSrc as this map
// cannot be accessed there
"opentelemetry" to "1.33.0",
"opentelemetry_semconv" to "1.21.0-alpha",
"opentelemetry_api_semconv" to "1.33.0-alpha",
"opentelemetry_proto" to "0.20.0-alpha",
"opentelemetry_java_agent" to "1.33.0-alpha",
"opentelemetry_java_agent_all" to "1.33.0",
"opentelemetry_java_agent-tooling" to "1.33.0-alpha",
"opentelemetry_gradle_plugin" to "1.33.0-alpha",
"byte_buddy" to "1.12.10",
"slf4j" to "2.0.7"
))
}
pluginManager.withPlugin("org.hypertrace.publish-maven-central-plugin") {
configure<org.hypertrace.gradle.publishing.HypertracePublishMavenCentralExtension> {
repoName.set("javaagent")
license.set(APACHE_2_0)
}
}
}
dependencyCheck {
format = org.owasp.dependencycheck.reporting.ReportGenerator.Format.valueOf("ALL")
// suppressionFile = "owasp-suppressions.xml"
scanConfigurations.add("runtimeClasspath")
failBuildOnCVSS = 7.0F
}