diff --git a/build.gradle b/build.gradle index 8fa287f..476f4c2 100644 --- a/build.gradle +++ b/build.gradle @@ -71,6 +71,26 @@ jar { ) } +// add a source jar +task sourceJar(type: Jar) { + from sourceSets.main.allSource + classifier = 'sources' +} + +// add a javadoc jar +task javadocJar(type: Jar, dependsOn: javadoc) { + from javadoc.destinationDir + classifier = 'javadoc' +} + +// because the normal output has been made to be obfuscated +task deobfJar(type: Jar) { + from sourceSets.main.output + classifier = 'deobf' +} + +tasks.build.dependsOn sourceJar, javadocJar, deobfJar + tasks.withType(JavaCompile) { task -> task.options.encoding = 'UTF-8' } \ No newline at end of file