-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
72 lines (57 loc) · 1.61 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
plugins {
id("java-library")
id("maven-publish")
id("signing")
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}
group = "net.goldenstack.loot"
version = "3.0"
repositories {
mavenCentral()
}
dependencies {
api("org.jetbrains:annotations:24.0.1")
val minestom = "net.minestom:minestom-snapshots:f8b6eb0d0b"
compileOnly(minestom)
testImplementation(minestom)
testImplementation(platform("org.junit:junit-bom:5.10.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
}
tasks.test {
useJUnitPlatform()
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
configure<JavaPluginExtension> {
withJavadocJar()
withSourcesJar()
}
configure<PublishingExtension> {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}
}
}
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
if (System.getenv("SONATYPE_USERNAME") != null) {
username.set(System.getenv("SONATYPE_USERNAME"))
password.set(System.getenv("SONATYPE_PASSWORD"))
println("---\n".repeat(10))
println(System.getenv("SONATYPE_USERNAME").length)
println(System.getenv("SONATYPE_PASSWORD").length)
println("---\n".repeat(10))
}
}
}
}
signing {
sign(publishing.publications["mavenJava"])
}