Update buildscript

- Generate sources jar
 - Include build number
This commit is contained in:
JozsefA 2021-06-20 16:20:18 -07:00
parent 9565a679be
commit 1c5efa6e50

View File

@ -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 {