Skip to content

Commit

Permalink
Update build.gradle.kts
Browse files Browse the repository at this point in the history
  • Loading branch information
Hummel009 committed Nov 2, 2024
1 parent f44353f commit d25ce7f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions appForgeArchive/1.7.10/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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<JavaCompile>().configureEach {
options.encoding = "UTF-8"
}
Expand Down

0 comments on commit d25ce7f

Please sign in to comment.