Skip to content

Commit bf4d7ec

Browse files
committed
fix(publishing): use different plugin for central publishing
1 parent 98d0009 commit bf4d7ec

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

build.gradle

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
alias(libs.plugins.licenser) apply false
3-
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
3+
id("com.gradleup.nmcp") version("0.0.9") apply false
44
}
55

66
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
@@ -16,6 +16,7 @@ subprojects {
1616
apply plugin: 'maven-publish'
1717
apply plugin: 'signing'
1818
apply plugin: 'org.cadixdev.licenser'
19+
apply plugin: 'com.gradleup.nmcp'
1920

2021
group = 'dev.lu15'
2122
version = '5.4-SNAPSHOT'
@@ -37,6 +38,17 @@ subprojects {
3738
}
3839
}
3940

41+
nmcp {
42+
publishAllPublications {
43+
var keyUsername = "SONATYPE_USERNAME"
44+
var keyPassword = "SONATYPE_PASSWORD"
45+
username = findProperty(keyUsername)?.toString() ?: System.getenv(keyUsername)
46+
password = findProperty(keyPassword)?.toString() ?: System.getenv(keyPassword)
47+
48+
publicationType = "USER_MANAGED"
49+
}
50+
}
51+
4052
jar {
4153
from '../LICENSE.txt'
4254
}
@@ -86,14 +98,3 @@ subprojects {
8698
maven { url 'https://libraries.minecraft.net/' }
8799
}
88100
}
89-
90-
nexusPublishing {
91-
useStaging.set(true)
92-
93-
repositories {
94-
sonatype { //only for users registered in Sonatype after 24 Feb 2021
95-
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
96-
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
97-
}
98-
}
99-
}

0 commit comments

Comments
 (0)