Also publish a -SNAPSHOT version along side the specific versions as it was useful.

dev/0.11
modmuss50 2020-05-13 20:03:26 +01:00
parent 11e24e57b4
commit 58fe59491a
1 changed files with 15 additions and 3 deletions

View File

@ -13,15 +13,15 @@ targetCompatibility = 1.8
group = 'net.fabricmc' group = 'net.fabricmc'
archivesBaseName = project.name archivesBaseName = project.name
version = '0.4' def baseVersion = '0.4'
def build = "local" def build = "local"
def ENV = System.getenv() def ENV = System.getenv()
if (ENV.BUILD_NUMBER) { if (ENV.BUILD_NUMBER) {
build = "jenkins #${ENV.BUILD_NUMBER}" build = "jenkins #${ENV.BUILD_NUMBER}"
version = version + "." + ENV.BUILD_NUMBER version = baseVersion + "." + ENV.BUILD_NUMBER
} else { } else {
version = version + ".local" version = baseVersion + ".local"
} }
repositories { repositories {
@ -125,6 +125,18 @@ publishing {
artifact sourcesJar artifact sourcesJar
artifact javadocJar artifact javadocJar
} }
//Also publish a snapshot so people can use the latest version if they wish
snapshot(MavenPublication) { publication ->
groupId project.group
artifactId project.archivesBaseName
version baseVersion + "-SNAPSHOT"
from components["java"]
artifact sourcesJar
artifact javadocJar
}
} }
repositories { repositories {
maven { maven {