save remapped/aw'd jar in project-specific location
All checks were successful
Publish to snapshot maven / build (push) Successful in 18s

This commit is contained in:
moehreag 2024-06-10 11:50:58 +02:00
parent a862a16e80
commit e8d5b61ab8
2 changed files with 4 additions and 2 deletions

View file

@ -40,6 +40,7 @@ class PhytotelmaPlugin : Plugin<Project> {
println("> Applying FrogMC Gradle Plugin")
globalCacheDir = project.gradle.gradleUserHomeDir.resolve("caches/phytotelma/").toPath()
globalCacheDir.createDirectories()
localCacheDir = project.projectDir.resolve(".gradle/phytotelma/cache/").toPath()
project.plugins.let {
it.apply("java-library")
@ -50,7 +51,7 @@ class PhytotelmaPlugin : Plugin<Project> {
project.repositories.apply {
maven {
it.name = "Minecraft/Local"
it.url = globalCacheDir.toUri()
it.url = localCacheDir.toUri()
}
maven {
it.name = "FrogMC Releases"
@ -195,6 +196,7 @@ class PhytotelmaPlugin : Plugin<Project> {
}
companion object {
lateinit var localCacheDir: Path
lateinit var globalCacheDir: Path
lateinit var minecraftVersion: String
lateinit var remappedGameJarPath: Path

View file

@ -26,7 +26,7 @@ abstract class PhytotelmaGradleExtensionImpl: PhytotelmaGradleExtension {
PhytotelmaPlugin.parchmentVersion = parchment
println("Valid version! $version")
val clientJar = VersionChecker.downloadClient(version)
val remappedJar = clientJar.resolveSibling("client-$version-remapped.jar")
val remappedJar = PhytotelmaPlugin.localCacheDir.resolve("net/minecraft/client/client-$version-remapped.jar")
PhytotelmaPlugin.remappedGameJarPath = remappedJar
println("Time to setup Minecraft!")
val applyAW = AccessWidener.needsUpdate(getProject())