|
@@ -47,14 +47,22 @@ bintray {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
|
|
+// if it is present.
|
|
|
+// If you remove this task, sources will not be generated.
|
|
|
+task sourcesJar(type: Jar, dependsOn: classes) {
|
|
|
+ classifier = 'sources'
|
|
|
+ from sourceSets.main.allSource
|
|
|
+}
|
|
|
+
|
|
|
publishing {
|
|
|
publications {
|
|
|
MyPublication(MavenPublication) {
|
|
|
artifact(file("${project.buildDir}/libs/${project.archivesBaseName}-${project.version}.jar")) {
|
|
|
builtBy remapJar
|
|
|
}
|
|
|
- artifact(jar) {
|
|
|
- builtBy jar
|
|
|
+ artifact(sourcesJar) {
|
|
|
+ builtBy remapSourcesJar
|
|
|
}
|
|
|
}
|
|
|
}
|