[FIX] Последние варны о несовместимости с Gradle 7.0/

This commit is contained in:
Zaxar163 2020-02-22 05:46:01 +01:00
parent 3da2951cac
commit 0f9fd46d29
No known key found for this signature in database
GPG key ID: 1FE4F2E1F053831B
5 changed files with 16 additions and 3 deletions

View file

@ -32,6 +32,7 @@
dependsOn parent.childProjects.Launcher.tasks.build
from { configurations.pack.collect { it.isDirectory() ? it : zipTree(it) } }
from(parent.childProjects.Launcher.tasks.shadowJar.archivePath)
from(parent.childProjects.Launcher.tasks.genRuntimeJS.archivePath)
manifest.attributes("Main-Class": mainClassName,
"Premain-Class": mainAgentName,
"Can-Redefine-Classes": "true",

View file

@ -45,8 +45,8 @@ public boolean allowDelete() {
public void tryUnpack() throws IOException {
LogHelper.info("Unpacking launcher native guard list and runtime");
UnpackHelper.unpackZipNoCheck("guard.zip", server.launcherBinary.guardDir);
UnpackHelper.unpackZipNoCheck("runtime.zip", server.launcherBinary.runtimeDir);
IOHelper.keepDir(server.launcherBinary.guardDir);
}
private static final class ListFileVisitor extends SimpleFileVisitor<Path> {

View file

@ -62,8 +62,13 @@ task dumpLibs(type: Copy) {
from configurations.bundle
}
task genRuntimeJS(type: Zip) {
archiveFileName = "runtime.zip"
destinationDirectory = file("${buildDir}/tmp")
from "runtime/"
}
assemble.dependsOn tasks.dumpLibs, tasks.shadowJar
assemble.dependsOn tasks.genRuntimeJS, tasks.dumpLibs, tasks.shadowJar
publishing {
publications {

View file

@ -733,4 +733,11 @@ public static void write(Path file, byte[] bytes) throws IOException {
private IOHelper() {
}
public static void keepDir(Path dir) throws IOException {
if (Files.isDirectory(dir))
return;
Files.deleteIfExists(dir);
Files.createDirectory(dir);
}
}

@ -1 +1 @@
Subproject commit d430430a83080312a420ee6b91d335b23d75c693
Subproject commit 6df9e7b0fb74623336baaf8a1c53c2073dce4ffd