Also publish a -SNAPSHOT version along side the specific versions as it was useful.
This commit is contained in:
parent
11e24e57b4
commit
58fe59491a
1 changed files with 15 additions and 3 deletions
18
build.gradle
18
build.gradle
|
@ -13,15 +13,15 @@ targetCompatibility = 1.8
|
|||
|
||||
group = 'net.fabricmc'
|
||||
archivesBaseName = project.name
|
||||
version = '0.4'
|
||||
def baseVersion = '0.4'
|
||||
|
||||
def build = "local"
|
||||
def ENV = System.getenv()
|
||||
if (ENV.BUILD_NUMBER) {
|
||||
build = "jenkins #${ENV.BUILD_NUMBER}"
|
||||
version = version + "." + ENV.BUILD_NUMBER
|
||||
version = baseVersion + "." + ENV.BUILD_NUMBER
|
||||
} else {
|
||||
version = version + ".local"
|
||||
version = baseVersion + ".local"
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
@ -125,6 +125,18 @@ publishing {
|
|||
artifact sourcesJar
|
||||
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 {
|
||||
maven {
|
||||
|
|
Loading…
Reference in a new issue