fix more bugs
All checks were successful
Publish to snapshot maven / build (push) Successful in 20s

This commit is contained in:
moehreag 2024-06-11 02:36:38 +02:00
parent 47effc79f2
commit 9360e2e4d6
3 changed files with 8 additions and 4 deletions

View file

@ -40,7 +40,7 @@ class PhytotelmaPlugin : Plugin<Project> {
println("> Applying FrogMC Gradle Plugin") println("> Applying FrogMC Gradle Plugin")
globalCacheDir = project.gradle.gradleUserHomeDir.resolve("caches/phytotelma/").toPath() globalCacheDir = project.gradle.gradleUserHomeDir.resolve("caches/phytotelma/").toPath()
globalCacheDir.createDirectories() globalCacheDir.createDirectories()
localCacheDir = project.rootDir.resolve(".gradle/phytotelma/cache/").toPath() localCacheDir = project.projectDir.resolve(".gradle/phytotelma/cache/").toPath()
localCacheDir.createDirectories() localCacheDir.createDirectories()
project.plugins.let { project.plugins.let {

View file

@ -71,9 +71,11 @@ abstract class PhytotelmaGradleExtensionImpl: PhytotelmaGradleExtension {
RunConfigGenerator.generate(getProject()) RunConfigGenerator.generate(getProject())
if (applyAW) { if (applyAW) {
getProject().afterEvaluate {
println("Applying AccessWideners..") println("Applying AccessWideners..")
AccessWidener.apply(getProject(), remappedJar) AccessWidener.apply(getProject(), remappedJar)
} }
}
println("Done!") println("Done!")
} else { } else {

View file

@ -34,6 +34,8 @@ object RunConfigGenerator {
} }
val indexId = VersionChecker.downloadAssetIndex(PhytotelmaPlugin.minecraftVersion, assetIndexPath) val indexId = VersionChecker.downloadAssetIndex(PhytotelmaPlugin.minecraftVersion, assetIndexPath)
val projectName = if (project.rootDir == project.projectDir) "" else " (${project.name})"
for (adapter in ADAPTERS) { for (adapter in ADAPTERS) {
if (!adapter.shouldGenerate()) if (!adapter.shouldGenerate())
continue continue
@ -41,7 +43,7 @@ object RunConfigGenerator {
for (env in Env.entries) { for (env in Env.entries) {
adapter.generate( adapter.generate(
project, project,
"Minecraft ${env.pascalName}", "Minecraft ${env.pascalName}$projectName",
"dev.frogmc.frogloader.impl.launch.${env.id}.Frog${env.pascalName}", "dev.frogmc.frogloader.impl.launch.${env.id}.Frog${env.pascalName}",
mutableListOf( mutableListOf(
"-Xmx${project.properties.getOrDefault("frogmc.gameHeap", "2048M")}", "-Xmx${project.properties.getOrDefault("frogmc.gameHeap", "2048M")}",