-
Notifications
You must be signed in to change notification settings - Fork 331
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
80 lines (66 loc) · 2.06 KB
/
build.gradle.kts
File metadata and controls
80 lines (66 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import datadog.gradle.plugin.testJvmConstraints.TestJvmConstraintsExtension
import groovy.lang.Closure
plugins {
`java-library`
idea
`maven-publish`
}
apply(from = "$rootDir/gradle/java.gradle")
apply(from = "$rootDir/gradle/publish.gradle")
configure<TestJvmConstraintsExtension> {
minJavaVersion.set(JavaVersion.VERSION_11)
}
description = "Implementation of the OpenFeature Provider interface."
// Set both JAR and Maven artifact name
val openFeatureArtifactId = "dd-openfeature"
base {
archivesName.set(openFeatureArtifactId)
}
publishing {
publications.withType<MavenPublication>().configureEach {
artifactId = openFeatureArtifactId
}
}
idea {
module {
jdkName = "11"
}
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(11)
}
}
dependencies {
api("dev.openfeature:sdk:1.20.1")
compileOnly(project(":products:feature-flagging:feature-flagging-bootstrap"))
compileOnly("io.opentelemetry:opentelemetry-api:1.47.0")
compileOnly("io.opentelemetry:opentelemetry-sdk-metrics:1.47.0")
compileOnly("io.opentelemetry:opentelemetry-exporter-otlp:1.47.0")
testImplementation(project(":products:feature-flagging:feature-flagging-bootstrap"))
testImplementation("io.opentelemetry:opentelemetry-api:1.47.0")
testImplementation("io.opentelemetry:opentelemetry-sdk-metrics:1.47.0")
testImplementation("io.opentelemetry:opentelemetry-exporter-otlp:1.47.0")
testImplementation(libs.bundles.junit5)
testImplementation(libs.bundles.mockito)
testImplementation(libs.moshi)
testImplementation("org.awaitility:awaitility:4.3.0")
}
fun AbstractCompile.configureCompiler(
javaVersionInteger: Int,
compatibilityVersion: JavaVersion? = null,
unsetReleaseFlagReason: String? = null
) {
(project.extra["configureCompiler"] as Closure<*>).call(
this,
javaVersionInteger,
compatibilityVersion,
unsetReleaseFlagReason
)
}
tasks.withType<JavaCompile>().configureEach {
configureCompiler(11, JavaVersion.VERSION_11)
}
tasks.withType<Javadoc>().configureEach {
javadocTool = javaToolchains.javadocToolFor(java.toolchain)
}