-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
build.gradle
78 lines (66 loc) · 2.29 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
plugins {
id "java"
id "application"
id "jacoco"
id "com.github.johnrengelman.shadow" version "8.1.1"
}
group = "org.exercism"
version = "1.0-SNAPSHOT"
mainClassName = "representer.RepresenterCli"
repositories {
mavenCentral()
}
dependencies {
implementation "fr.inria.gforge.spoon:spoon-core:11.0.0"
implementation "com.google.code.gson:gson:2.11.0"
implementation "com.google.googlejavaformat:google-java-format:1.22.0"
implementation "org.slf4j:slf4j-api:2.0.13"
implementation "ch.qos.logback:logback-core:1.5.6"
implementation "ch.qos.logback:logback-classic:1.5.6"
testImplementation platform("org.junit:junit-bom:5.10.2")
testImplementation "org.junit.jupiter:junit-jupiter"
testImplementation "org.assertj:assertj-core:3.25.3"
testImplementation "com.approvaltests:approvaltests:24.9.0"
}
jar {
manifest {
// Required for google-java-format
// https://github.com/google/google-java-format/blob/c20a02715cf8be569515857d96fd558eb71cfa72/README.md#as-a-library
attributes "Add-Exports": "jdk.compiler/com.sun.tools.javac.api " +
"jdk.compiler/com.sun.tools.javac.code " +
"jdk.compiler/com.sun.tools.javac.file " +
"jdk.compiler/com.sun.tools.javac.parser " +
"jdk.compiler/com.sun.tools.javac.tree " +
"jdk.compiler/com.sun.tools.javac.util"
}
}
shadowJar {
mergeServiceFiles()
archiveFileName.set("java-representer.jar")
}
artifacts {
archives shadowJar
}
test {
useJUnitPlatform()
testLogging {
exceptionFormat = "full"
showStandardStreams = true
events = ["passed", "failed", "skipped"]
}
jvmArgs = [
"--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
"--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
"--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
"--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
"--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
"--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"
]
finalizedBy jacocoTestReport
}
jacocoTestReport {
dependsOn test
reports {
xml.required = true
}
}