-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
82 lines (66 loc) · 1.82 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
plugins {
java
`java-library`
`maven-publish`
}
group = "io.github.prcraftmc"
version = "1.0-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_17
java.targetCompatibility = JavaVersion.VERSION_17
repositories {
mavenCentral()
}
dependencies {
api("org.ow2.asm:asm:9.5")
api("org.ow2.asm:asm-tree:9.5")
compileOnly("org.jetbrains:annotations:24.0.1")
api("com.nothome:javaxdelta:2.0.1")
api("io.github.java-diff-utils:java-diff-utils:4.12")
// implementation("net.lenni0451:Reflect:1.2.4")
testImplementation(platform("org.junit:junit-bom:5.9.1"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.ow2.asm:asm-util:9.5")
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
tasks.compileJava {
options.encoding = "UTF-8"
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
if (JavaVersion.current().isJava9Compatible) {
options.release.set(8)
}
}
tasks.compileTestJava {
options.encoding = "UTF-8"
sourceCompatibility = "17"
targetCompatibility = "17"
if (JavaVersion.current().isJava9Compatible) {
options.release.set(17)
}
options.compilerArgs.add("-parameters")
}
tasks.test {
useJUnitPlatform()
}
publishing {
repositories {
maven {
name = "gaming32"
credentials(PasswordCredentials::class)
val baseUri = "https://maven.jemnetworks.com"
url = uri(baseUri + if (version.toString().endsWith("-SNAPSHOT")) "/snapshots" else "/releases")
}
}
publications {
create<MavenPublication>("maven") {
groupId = project.group.toString()
artifactId = project.name
version = project.version.toString()
from(components["java"])
}
}
}