-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
58 lines (48 loc) · 1.33 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
plugins {
id("java")
id("java-library")
id("maven-publish")
}
subprojects {
plugins.apply("java")
plugins.apply("java-library")
plugins.apply("maven-publish")
repositories {
mavenCentral()
}
dependencies {
testCompileOnly("org.projectlombok:lombok:1.18.34")
testAnnotationProcessor("org.projectlombok:lombok:1.18.34")
testImplementation(platform("org.junit:junit-bom:5.10.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
}
java {
toolchain.languageVersion = JavaLanguageVersion.of(17)
withSourcesJar()
}
tasks {
withType<JavaCompile> {
options.encoding = Charsets.UTF_8.name()
options.release = 17
dependsOn(clean)
}
withType<Test> {
useJUnitPlatform()
}
}
publishing {
repositories {
val repoType = if (version.toString().endsWith("-SNAPSHOT")) "snapshots" else "releases"
maven("https://repo.roxymc.net/${repoType}") {
name = "roxymc"
credentials(PasswordCredentials::class)
}
}
publications {
create<MavenPublication>("maven") {
artifactId = project.name
from(components["java"])
}
}
}
}