Skip to content

Commit 0a272f9

Browse files
committed
chore(gradle): Convert :internal-api:internal-api-9 to kotlin dsl
chore(build): Migrate :internal-api:internal-api-9 to Kotlin DSL
1 parent d8b503a commit 0a272f9

File tree

2 files changed

+60
-55
lines changed

2 files changed

+60
-55
lines changed

internal-api/internal-api-9/build.gradle

Lines changed: 0 additions & 55 deletions
This file was deleted.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import groovy.lang.Closure
2+
3+
plugins {
4+
`java-library`
5+
id("de.thetaphi.forbiddenapis") version "3.8"
6+
id("me.champeau.jmh")
7+
idea
8+
}
9+
10+
val minJavaVersionForTests by extra(JavaVersion.VERSION_11)
11+
12+
apply(from = "$rootDir/gradle/java.gradle")
13+
14+
java {
15+
toolchain {
16+
languageVersion = JavaLanguageVersion.of(11)
17+
}
18+
}
19+
20+
tasks.withType<Javadoc> {
21+
javadocTool = javaToolchains.javadocToolFor(java.toolchain)
22+
}
23+
24+
fun AbstractCompile.setJavaVersion(javaVersionInteger: Int) {
25+
(project.extra.get("setJavaVersion") as Closure<*>).call(this, javaVersionInteger)
26+
}
27+
28+
listOf(JavaCompile::class.java, GroovyCompile::class.java).forEach { compileTaskType ->
29+
tasks.withType(compileTaskType) {
30+
setJavaVersion(11)
31+
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
32+
targetCompatibility = JavaVersion.VERSION_1_8.toString()
33+
}
34+
}
35+
36+
val minimumBranchCoverage by extra(0.8)
37+
val minimumInstructionCoverage by extra(0.8)
38+
39+
dependencies {
40+
api(project(":internal-api"))
41+
42+
testImplementation(project(":dd-java-agent:testing"))
43+
testImplementation(libs.slf4j)
44+
}
45+
46+
tasks.forbiddenApisMain {
47+
failOnMissingClasses = false
48+
}
49+
50+
idea {
51+
module {
52+
jdkName = "11"
53+
}
54+
}
55+
56+
jmh {
57+
jmhVersion = "1.28"
58+
duplicateClassesStrategy = DuplicatesStrategy.EXCLUDE
59+
jvm = System.getenv("JAVA_11_HOME") + "/bin/java"
60+
}

0 commit comments

Comments
 (0)