-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
100 lines (81 loc) · 2.11 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
plugins {
id("java-library")
id("net.auoeke.gronk").version("4.+")
id("me.champeau.jmh").version("latest.release")
}
group("net.auoeke")
version("6.3.0")
description("succinct and unrestricted reflection")
javaVersion(17)
gronk {
publish {
scm = "https://github.com/nnym/reflect"
license = ""
email = "[email protected]"
}
}
sourceSets {
jmh {
java.srcDirs = ["benchmark"]
}
}
configurations {
configure([jmhAnnotationProcessor, testAnnotationProcessor]) {
extendsFrom(annotationProcessor)
}
}
repositories {
mavenCentral()
}
dependencies {
annotationProcessor("net.auoeke:dycon-javac-all", "net.auoeke:uncheck-all")
compileOnly("net.auoeke:dycon")
api("net.auoeke:result", "net.auoeke:unsafe")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testImplementation(
"org.junit.jupiter:junit-jupiter-api",
"org.ow2.asm:asm-tree",
"org.openjdk.jol:jol-core"
)
}
compileJava {
options.release = java.targetCompatibility.majorVersion as int
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(19)
}
}
compileTestJava {
mustRunAfter(jar)
options.release = JavaVersion.current().majorVersion as int
options.compilerArgs << "--enable-preview"
}
jmh {
fork = 1
warmup = "500ms"
timeOnIteration = "300ms"
includes = ["Address"]
}
test {
dependsOn(cleanTest)
useJUnitPlatform()
systemProperty("junit.jupiter.testclass.order.default", 'org.junit.jupiter.api.ClassOrderer$OrderAnnotation')
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions", "-Xdump:none", "-XX:ErrorFile=${systemProperty("java.io.tmpdir")}/java_err_%p.log")
}
jar {
manifest.from("resources/META-INF/MANIFEST.MF")
}
jmhJar {
manifest.from(jar.manifest)
}
javadoc {
options {
addBooleanOption("Xdoclint:none", true)
}
}
// For Reflect::instrumentation.
task testRelease(type: Test, group: LifecycleBasePlugin.VERIFICATION_GROUP, dependsOn: ["cleanTestRelease", jar]) {
check.dependsOn(it)
useJUnitPlatform()
systemProperty("junit.jupiter.testclass.order.default", 'org.junit.jupiter.api.ClassOrderer$OrderAnnotation')
classpath = classpath - sourceSets.main.output + files(jar.archiveFile)
}