From 7d8ddb4d6f5f6bb5cd1e7f8493808e1008932a09 Mon Sep 17 00:00:00 2001 From: Hubry Date: Mon, 15 Oct 2018 16:14:41 +0200 Subject: [PATCH] Try to fix #2536 and add sources jar --- build.gradle | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index 89efa0d12..06e499597 100644 --- a/build.gradle +++ b/build.gradle @@ -78,10 +78,16 @@ configurations { //End of the SCP config jar { - classifier = 'universal' manifest { attributes 'FMLAT': 'botania_at.cfg' } + + //rename the default output, for some better... sanity with scipts + archiveName = "${baseName} ${version}.${extension}" + + exclude "**/*.bat" + exclude "**/*.psd" + exclude "**/*.exe" } dependencies { @@ -125,9 +131,15 @@ task deobfJar(type: Jar) { archiveName = "${baseName} ${version}-deobf.${extension}" } -artifacts { - archives deobfJar +task srcJar(type: Jar) { + from(sourceSets.main.java) + classifier = 'sources' + archiveName = "${baseName} ${version}-sources.${extension}" } +artifacts { + archives srcJar +} + /** * Increments the buildnumber in your config file, and saves it */ @@ -233,15 +245,6 @@ def parseConfig(File config) { } } -jar { - //rename the default output, for some better... sanity with scipts - archiveName = "${baseName} ${version}.${extension}" - - exclude "**/*.bat" - exclude "**/*.psd" - exclude "**/*.exe" -} - curseforge { if(priv == null){ return; @@ -269,5 +272,6 @@ uploadArchives { } } } +tasks.uploadArchives.dependsOn reobfJar defaultTasks 'clean', 'build', 'sort', 'incrementBuildNumber', 'upload'