@@ -4,56 +4,44 @@ plugins {
44 id(" maven-publish" )
55}
66
7- repositories {
8- mavenCentral()
9- }
10-
11- dependencies {
12- api(" com.google.guava:guava:33.3.1-jre" )
13- api(" com.google.code.gson:gson:2.11.0" )
14- api(" org.jspecify:jspecify:1.0.0" )
15- api(" net.kyori:adventure-nbt:4.17.0" )
16- api(" com.github.luben:zstd-jni:1.5.6-6" )
17-
18- testCompileOnly(" org.projectlombok:lombok:1.18.34" )
19- testAnnotationProcessor(" org.projectlombok:lombok:1.18.34" )
20- testImplementation(platform(" org.junit:junit-bom:5.10.0" ))
21- testImplementation(" org.junit.jupiter:junit-jupiter" )
22- }
7+ subprojects {
8+ plugins.apply (" java" )
9+ plugins.apply (" java-library" )
10+ plugins.apply (" maven-publish" )
2311
24- java {
25- toolchain.languageVersion = JavaLanguageVersion .of(17 )
12+ repositories {
13+ mavenCentral()
14+ }
2615
27- withSourcesJar()
28- }
16+ java {
17+ toolchain.languageVersion = JavaLanguageVersion .of( 17 )
2918
30- tasks {
31- withType<JavaCompile > {
32- options.encoding = Charsets .UTF_8 .name()
33- options.release = 17
34- dependsOn(clean)
19+ withSourcesJar()
3520 }
3621
37- test {
38- useJUnitPlatform()
22+ tasks {
23+ withType<JavaCompile > {
24+ options.encoding = Charsets .UTF_8 .name()
25+ options.release = 17
26+ dependsOn(clean)
27+ }
3928 }
40- }
41-
4229
43- publishing {
44- repositories {
45- val repoType = if (version.toString().endsWith(" -SNAPSHOT" )) " snapshots" else " releases"
46- maven(" https://repo.roxymc.net/${repoType} " ) {
47- name = " roxymc"
48- credentials(PasswordCredentials ::class )
30+ publishing {
31+ repositories {
32+ val repoType = if (version.toString().endsWith(" -SNAPSHOT" )) " snapshots" else " releases"
33+ maven(" https://repo.roxymc.net/${repoType} " ) {
34+ name = " roxymc"
35+ credentials(PasswordCredentials ::class )
36+ }
4937 }
50- }
5138
52- publications {
53- create<MavenPublication >(" maven" ) {
54- artifactId = rootProject .name.lowercase()
39+ publications {
40+ create<MavenPublication >(" maven" ) {
41+ artifactId = project .name
5542
56- from(components[" java" ])
43+ from(components[" java" ])
44+ }
5745 }
5846 }
59- }
47+ }
0 commit comments