From 7e1b68e49bcbeb151fd77e9193377e9a360bb7f0 Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Sat, 27 Feb 2021 15:42:55 +0200 Subject: Update Loom and use Maven Publish instead of the Artifactory plugin --- GuiTest/build.gradle | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'GuiTest/build.gradle') diff --git a/GuiTest/build.gradle b/GuiTest/build.gradle index c1423b2..bbb0f0f 100644 --- a/GuiTest/build.gradle +++ b/GuiTest/build.gradle @@ -14,7 +14,9 @@ version = rootProject.version group = rootProject.group loom { - autoGenIDERuns = true + runConfigs.configureEach { + ideConfigGenerated = true + } } //configurations.modApi { @@ -40,29 +42,24 @@ dependencies { processResources { inputs.property "version", project.version - from(sourceSets.main.resources.srcDirs) { - include "fabric.mod.json" + filesMatching("fabric.mod.json") { expand "version": project.version } - - from(sourceSets.main.resources.srcDirs) { - exclude "fabric.mod.json" - } } -// ensure that the encoding is set to UTF-8, no matter what the system default is -// this fixes some edge cases with special characters not displaying correctly -// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html tasks.withType(JavaCompile) { + // ensure that the encoding is set to UTF-8, no matter what the system default is + // this fixes some edge cases with special characters not displaying correctly + // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html options.encoding = "UTF-8" + + if (JavaVersion.current().isJava9Compatible()) { + options.release.set 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 { + withSourcesJar() } jar { -- cgit