-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
101 lines (83 loc) · 2.59 KB
/
build.gradle.kts
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
101
plugins {
`java-library`
`maven-publish`
}
group = "com.japplis"
version = "0.1"
tasks.jar {
manifest {
attributes(mapOf("Implementation-Title" to project.name,
"Implementation-Version" to project.version))
}
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
withJavadocJar()
withSourcesJar()
}
tasks.withType<JavaCompile>().configureEach {
options.compilerArgs.add("--enable-preview")
options.encoding = "UTF-8"
}
tasks.withType<Javadoc> {
val javadocOptions = options as CoreJavadocOptions
javadocOptions.addStringOption("source", "21")
javadocOptions.addBooleanOption("-enable-preview", true)
}
tasks.withType<Test>().configureEach {
jvmArgs("--enable-preview")
}
tasks.withType<JavaExec>().configureEach {
jvmArgs("--enable-preview")
}
plugins.withId("maven-publish") {
configure<PublishingExtension> {
publications {
register("mavenJava", MavenPublication::class) {
from(components["java"])
pom {
artifactId = "virtually"
name.set("Virtually")
description.set("Virtual threads friendly tools")
url.set("https://www.github.com/japplis/Virtually")
scm {
connection.set("scm:git:https://www.github.com/japplis/Virtually/")
developerConnection.set("scm:git:https://github.com/japplis/")
url.set("https://www.github.com/japplis/Virtually/")
}
licenses {
license {
name.set("The Apache 2.0 License")
url.set("https://opensource.org/licenses/Apache-2.0")
}
}
developers {
developer {
id.set("japplis")
name.set("Japplis")
email.set("[email protected]")
url.set("https://www.japplis.com")
}
}
}
}
}
}
}
dependencies {
val aspectjVersion = "1.9.20.1"
compileOnly("org.aspectj:aspectjrt:$aspectjVersion")
testImplementation("org.junit.jupiter:junit-jupiter:5.9.3")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testRuntimeOnly("org.aspectj:aspectjrt:$aspectjVersion")
testRuntimeOnly("org.aspectj:aspectjweaver:$aspectjVersion")
// testRuntimeAgent("org.aspectj:aspectjweaver")
}
tasks.named<Test>("test") {
useJUnitPlatform()
}
repositories {
mavenCentral()
}