diff --git a/appForgeArchive/1.7.10/build.gradle.kts b/appForgeArchive/1.7.10/build.gradle.kts index 534133f9..f2e21c7b 100644 --- a/appForgeArchive/1.7.10/build.gradle.kts +++ b/appForgeArchive/1.7.10/build.gradle.kts @@ -24,6 +24,26 @@ minecraft { } tasks { + register("copyForgeUnpacked") { + doLast { + val userHome = System.getProperty("user.home") + val gradleUserHome = System.getenv("GRADLE_USER_HOME") + + if (gradleUserHome != null) { + val path1 = "$gradleUserHome/caches/minecraft/net/minecraftforge/forge/1.7.10-10.13.4.1614-1.7.10" + val path2 = "$userHome/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.10-10.13.4.1614-1.7.10" + if (path1 != path2) { + val sourceDir = File(path1) + val targetDir = File(path2) + targetDir.mkdirs() + sourceDir.copyRecursively(targetDir, overwrite = true) + } + } + } + } + runClient { + dependsOn("copyForgeUnpacked") + } withType().configureEach { options.encoding = "UTF-8" }