Gradle: add the option to publish maven artifacts/poms to the G… (#1763)

This commit is contained in:
ST0NEWALL
2019-10-13 01:21:55 -04:00
committed by James
parent ea30a23a53
commit e10f95dc40

View File

@@ -91,7 +91,7 @@ allprojects {
apply plugin: 'maven' apply plugin: 'maven'
if (this.name != 'rs-client') apply plugin: 'checkstyle' if (this.name != 'rs-client') apply plugin: 'checkstyle'
group = 'us.runelitepl' group = 'com.openosrs'
version = '1.5.35-SNAPSHOT' version = '1.5.35-SNAPSHOT'
ext { ext {
@@ -114,6 +114,7 @@ subprojects {
apply plugin: 'java-library' apply plugin: 'java-library'
apply plugin: 'maven' apply plugin: 'maven'
apply plugin: 'fernflower' apply plugin: 'fernflower'
apply plugin: 'maven-publish'
sourceCompatibility = 1.8 sourceCompatibility = 1.8
targetCompatibility = 1.8 targetCompatibility = 1.8
@@ -126,6 +127,24 @@ subprojects {
options.incremental = true options.incremental = true
} }
publishing {
repositories {
maven {
name = "runelite"
url = uri("https://maven.pkg.github.com/open-osrs/runelite")
credentials {
username = System.getProperty("gpr_user")
password = System.getProperty("gpr_key")
}
}
}
publications {
gpr(MavenPublication) {
from(components.java)
}
}
}
repositories { repositories {
mavenLocal() mavenLocal()
@@ -149,17 +168,9 @@ subprojects {
maxWarnings = 0 maxWarnings = 0
} }
uploadArchives {
repositories {
mavenDeployer {
repository(url: System.getenv("NEXUS_URL")) {
authentication(userName: System.getenv("NEXUS_USER"), password: System.getenv("NEXUS_PASSWORD"))
}
}
}
}
} }
wrapper { wrapper {
gradleVersion = '5.6.2' gradleVersion = '5.6.2'