Set up maven publishing

This commit is contained in:
makamys committed 2024-02-14 19:30:18 +01:00
1 parent 3563c869b5
commit 45d16b96ab
1 file changed
+17 -2
+17 -2
View File
@@ -88,7 +88,7 @@ allprojects {
archives tasks."sourcesJar"
archives tasks."devJar"
}
publishing {
publications {
create("maven", MavenPublication) {
@@ -108,7 +108,22 @@ allprojects {
}
}
}
publishing {
repositories {
if (System.getenv("MAVEN_USER") != null) {
maven {
url = System.getenv("MAVEN_URL")
allowInsecureProtocol = System.getenv("MAVEN_URL").startsWith("http://") // Mostly for the GTNH maven
credentials {
username = System.getenv("MAVEN_USER") ?: "NONE"
password = System.getenv("MAVEN_PASSWORD") ?: "NONE"
}
}
}
}
}
// Put license, credits and readme in jar
delete "$projectDir/build/tmp/license"