diff --git a/build.gradle b/build.gradle index 9f5f64a..db31133 100644 --- a/build.gradle +++ b/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 {