From 1c5efa6e505614562dec6675c717d3e968e1b136 Mon Sep 17 00:00:00 2001 From: JozsefA Date: Sun, 20 Jun 2021 16:20:18 -0700 Subject: [PATCH] Update buildscript - Generate sources jar - Include build number --- build.gradle | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 7298901b2..9d47c0c26 100644 --- a/build.gradle +++ b/build.gradle @@ -18,10 +18,13 @@ plugins { apply plugin: 'net.minecraftforge.gradle' apply plugin: 'org.spongepowered.mixin' -boolean dev = System.getenv('RELEASE') == null || System.getenv('RELEASE').equals('false'); +boolean dev = System.getenv('RELEASE') == null || System.getenv('RELEASE').equalsIgnoreCase('false'); +ext.buildnumber = 0 +project.buildnumber = System.getenv('BUILD_NUMBER') != null ? System.getenv('BUILD_NUMBER') : "custom" + +version = "${mc_update_version}-${mod_version}" + (dev ? ".${buildnumber}" : '') group = 'jozufozu' -version = "${mc_update_version}-${mod_version}" archivesBaseName = 'flywheel' sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' @@ -127,6 +130,10 @@ task sourcesJar(type: Jar) { archiveClassifier.set('sources') } +artifacts { + archives jar, sourcesJar +} + tasks.curseforge.enabled = !dev && project.hasProperty('jozu_curseforge_key') curseforge {