From 742816b75989417938d63a7070e5694e9e2430b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A4in=C3=B6=20M=C3=A4kel=C3=A4?= Date: Fri, 24 Jul 2020 09:30:00 +0300 Subject: [PATCH] Fix Gradle deprecation warnings (#2879) Gradle 7 will remove some features and they need to be replaced --- desktop/build.gradle.kts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/desktop/build.gradle.kts b/desktop/build.gradle.kts index 476d5514..78d63db0 100644 --- a/desktop/build.gradle.kts +++ b/desktop/build.gradle.kts @@ -49,6 +49,9 @@ tasks.register("debug") { tasks.register("dist") { // Compiles the jar file dependsOn(tasks.getByName("classes")) + // META-INF/INDEX.LIST and META-INF/io.netty.versions.properties are duplicated, but I don't know why + duplicatesStrategy = DuplicatesStrategy.EXCLUDE + from(files(sourceSets.main.get().output.resourcesDir)) from(files(sourceSets.main.get().output.classesDirs)) // see Laurent1967's comment on https://github.com/libgdx/libgdx/issues/5491 @@ -56,7 +59,7 @@ tasks.register("dist") { // Compiles the jar file from(files(assetsDir)) // This is for the .dll and .so files to make the Discord RPC work on all desktops from(files(discordDir)) - archiveName = "${BuildConfig.appName}.jar" + archiveFileName.set("${BuildConfig.appName}.jar") manifest { attributes(mapOf("Main-Class" to mainClassName, "Specification-Version" to BuildConfig.appVersion)) @@ -105,9 +108,9 @@ for(platform in PackrConfig.Platform.values()) { } tasks.register("zip${platformName}") { - archiveName = "${BuildConfig.appName}-${platformName}.zip" + archiveFileName.set("${BuildConfig.appName}-${platformName}.zip") from(config.outDir) - destinationDir = deployFolder + destinationDirectory.set(deployFolder) } finalizedBy("zip${platformName}") @@ -115,9 +118,9 @@ for(platform in PackrConfig.Platform.values()) { } tasks.register("zipLinuxFilesForJar") { - archiveName = "linuxFilesForJar.zip" + archiveFileName.set("linuxFilesForJar.zip") from(file("linuxFilesForJar")) - destinationDir = deployFolder + destinationDirectory.set(deployFolder) } tasks.register("packr") {