From ff08210162bf736fb3048c74fc601d18ea4f524a Mon Sep 17 00:00:00 2001 From: Kosma Moczek Date: Fri, 31 Dec 2021 03:54:44 +0100 Subject: [PATCH] fabric-*: use modern, performant sourcesJar declaration --- fabric-1.14.4/build.gradle | 11 +++++------ fabric-1.15.2/build.gradle | 11 +++++------ fabric-1.16.4/build.gradle | 11 +++++------ fabric-1.17.1/build.gradle | 11 +++++------ fabric-1.18/build.gradle | 11 +++++------ 5 files changed, 25 insertions(+), 30 deletions(-) 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 {