From 9812a6e7a85fce73a8c77a8b41fc5cbab66a127e Mon Sep 17 00:00:00 2001 From: RX14 Date: Mon, 24 Nov 2014 21:46:54 +0000 Subject: [PATCH] Standardise artifacts format - You should almost never use an appendix on your atifacts, this becomes clear when you start using maven. - APIs, even the source are normally distributed in jar files, like it is here. I can change this back if you think it is important. - If you include a jar named "sources" with the full source of a project, IDEs can pick this up and make the source available if you are using maven. --- build.gradle | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/build.gradle b/build.gradle index 7e3e94a..bf23fbe 100644 --- a/build.gradle +++ b/build.gradle @@ -45,25 +45,25 @@ processResources // Create deobf dev jars task deobfJar(type: Jar) { - from(sourceSets.main.output) { - appendix = 'deobf' - } -} + from sourceSets.main.output + classifier = 'deobf' +} // Create API library zip -task apiZip(type: Zip) { - from(sourceSets.main.java) { - include "baubles/api/**" - } - classifier = 'api' +task apiJar(type: Jar) { + from(sourceSets.main.java) { + include "baubles/api/**" + } + classifier = 'api' } -apiZip.mustRunAfter deobfJar - - -artifacts { - archives deobfJar - archives apiZip +task sourcesJar(type: Jar) { + from sourceSets.main.allSource + classifier = 'sources' } - +artifacts { + archives deobfJar + archives apiJar + archives sourcesJar +}