-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathbuild.gradle
62 lines (54 loc) · 2.15 KB
/
build.gradle
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
plugins {
id "io.micronaut.build.internal.convention-library"
id "org.jetbrains.kotlin.jvm"
}
dependencies {
annotationProcessor project(":inject-java")
api project(":inject-java")
api libs.managed.groovy
api(libs.spock) {
exclude module:'groovy-all'
}
if (!JavaVersion.current().isJava9Compatible()) {
api files(org.gradle.internal.jvm.Jvm.current().toolsJar)
}
testAnnotationProcessor project(":inject-java")
testCompileOnly project(":inject-groovy")
testImplementation libs.managed.validation
testImplementation libs.javax.persistence
testImplementation project(":runtime")
api libs.blaze.persistence.core
implementation libs.kotlin.compiler.embeddable
implementation libs.kotlin.annotation.processing.embeddable
implementation libs.kotlin.stdlib
}
tasks.named("sourcesJar") {
from "$projectDir/src/main/groovy"
from "$projectDir/src/main/kotlin"
}
tasks.named("compileKotlin") {
kotlinOptions {
jvmTarget = "17"
}
}
tasks.named("compileGroovy") {
// this allows groovy to access kotlin classes.
dependsOn tasks.getByPath('compileKotlin')
classpath += files(compileKotlin.destinationDirectory)
}
tasks.named("test", Test) {
if(JavaVersion.current().majorVersion.toInteger() >= 17) {
jvmArgs(
'--add-opens', 'jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED',
'--add-opens', 'jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED',
'--add-opens', 'jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED',
'--add-opens', 'jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED',
'--add-opens', 'jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED',
'--add-opens', 'jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED',
'--add-opens', 'jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED',
'--add-opens', 'jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED',
'--add-opens', 'jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED',
'--add-opens', 'jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED'
)
}
}