Skip to content

Commit 6e333ea

Browse files
committed
Add publishing support
1 parent f29b356 commit 6e333ea

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

build.gradle.kts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
plugins {
22
id("java")
3+
id("maven-publish")
34
id("org.taumc.gradle.versioning")
45
id("org.taumc.gradle.publishing")
56
}
@@ -11,6 +12,10 @@ repositories {
1112
mavenCentral()
1213
}
1314

15+
java {
16+
withSourcesJar()
17+
}
18+
1419
dependencies {
1520
val asmVersion = "9.8"
1621
compileOnly("org.ow2.asm:asm:${asmVersion}")
@@ -35,6 +40,24 @@ tasks.jar {
3540
}
3641
}
3742

43+
publishing {
44+
repositories {
45+
maven {
46+
name = "taumcRepository"
47+
url = uri("https://maven.taumc.org/releases")
48+
credentials {
49+
username = System.getenv("MAVEN_USERNAME")
50+
password = System.getenv("MAVEN_SECRET")
51+
}
52+
}
53+
}
54+
publications {
55+
create<MavenPublication>("mavenJava") {
56+
from(components["java"])
57+
}
58+
}
59+
}
60+
3861
val tauGradlePublish = tau.publishing.publish {
3962
dependsOn(tasks.jar)
4063

0 commit comments

Comments
 (0)