-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
54 lines (45 loc) · 1.32 KB
/
build.gradle.kts
File metadata and controls
54 lines (45 loc) · 1.32 KB
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
subprojects {
plugins.apply("java")
plugins.apply("java-library")
plugins.apply("maven-publish")
repositories {
mavenCentral()
}
afterEvaluate {
dependencies {
"testCompileOnly"(libs.lombok)
"testAnnotationProcessor"(libs.lombok)
"testImplementation"(platform(libs.junit5.bom))
"testImplementation"(libs.junit5.jupiter)
}
}
extensions.configure<JavaPluginExtension> {
toolchain.languageVersion = JavaLanguageVersion.of(17)
withSourcesJar()
}
tasks {
withType<JavaCompile> {
options.encoding = Charsets.UTF_8.name()
options.release = 17
dependsOn("clean")
}
withType<Test> {
useJUnitPlatform()
}
}
extensions.configure<PublishingExtension> {
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"])
}
}
}
}