diff --git a/fabric-1.14.4/build.gradle b/fabric-1.14.4/build.gradle index 7551ab23..4f2628ce 100644 --- a/fabric-1.14.4/build.gradle +++ b/fabric-1.14.4/build.gradle @@ -52,12 +52,11 @@ tasks.withType(JavaCompile) { options.encoding = "UTF-8" } -// 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 +java { + // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task + // if it is present. + // If you remove this line, sources will not be generated. + withSourcesJar() } jar { diff --git a/fabric-1.15.2/build.gradle b/fabric-1.15.2/build.gradle index 7551ab23..4f2628ce 100644 --- a/fabric-1.15.2/build.gradle +++ b/fabric-1.15.2/build.gradle @@ -52,12 +52,11 @@ tasks.withType(JavaCompile) { options.encoding = "UTF-8" } -// 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 +java { + // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task + // if it is present. + // If you remove this line, sources will not be generated. + withSourcesJar() } jar { diff --git a/fabric-1.16.4/build.gradle b/fabric-1.16.4/build.gradle index 7551ab23..4f2628ce 100644 --- a/fabric-1.16.4/build.gradle +++ b/fabric-1.16.4/build.gradle @@ -52,12 +52,11 @@ tasks.withType(JavaCompile) { options.encoding = "UTF-8" } -// 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 +java { + // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task + // if it is present. + // If you remove this line, sources will not be generated. + withSourcesJar() } jar { diff --git a/fabric-1.17.1/build.gradle b/fabric-1.17.1/build.gradle index 2ad1772e..08cbedac 100644 --- a/fabric-1.17.1/build.gradle +++ b/fabric-1.17.1/build.gradle @@ -52,12 +52,11 @@ tasks.withType(JavaCompile) { options.encoding = "UTF-8" } -// 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 +java { + // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task + // if it is present. + // If you remove this line, sources will not be generated. + withSourcesJar() } jar { diff --git a/fabric-1.18/build.gradle b/fabric-1.18/build.gradle index 96cacd74..4e59ae9b 100644 --- a/fabric-1.18/build.gradle +++ b/fabric-1.18/build.gradle @@ -57,12 +57,11 @@ tasks.withType(JavaCompile) { options.encoding = "UTF-8" } -// 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 +java { + // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task + // if it is present. + // If you remove this line, sources will not be generated. + withSourcesJar() } jar {