add genRunConfigs task, add property for easier game jar discovery in dev
All checks were successful
Publish to snapshot maven / build (push) Successful in 18s

This commit is contained in:
moehreag 2024-05-18 18:55:56 +02:00
parent 5840712e5e
commit e76e6f263d
2 changed files with 13 additions and 1 deletions

View file

@ -1,6 +1,7 @@
package org.ecorous.esnesnon.gradle package org.ecorous.esnesnon.gradle
import net.fabricmc.fernflower.api.IFabricJavadocProvider import net.fabricmc.fernflower.api.IFabricJavadocProvider
import org.ecorous.esnesnon.gradle.run.RunConfigGenerator
import org.ecorous.esnesnon.gradle.vineflower.ParchmentJavadocProvider import org.ecorous.esnesnon.gradle.vineflower.ParchmentJavadocProvider
import org.ecorous.esnesnon.nonsense_remapper.provider.ParchmentProvider import org.ecorous.esnesnon.nonsense_remapper.provider.ParchmentProvider
import org.gradle.api.Plugin import org.gradle.api.Plugin
@ -90,6 +91,13 @@ class NonsenseGradlePlugin : Plugin<Project> {
} }
} }
project.task("genRunConfigs").apply {
doFirst {
group = "nonsense"
RunConfigGenerator.generate(project)
}
}
// TODO mod relocation/renaming: decide on mod file extension // TODO mod relocation/renaming: decide on mod file extension
/*project.tasks.getByName("jar").actions.addLast { /*project.tasks.getByName("jar").actions.addLast {
it.outputs.files.forEach {file -> it.outputs.files.forEach {file ->

View file

@ -44,7 +44,11 @@ object RunConfigGenerator {
project, project,
"Minecraft ${env.pascalName}", "Minecraft ${env.pascalName}",
"org.ecorous.esnesnon.nonsense.loader.impl.launch.client.Nonsense${env.pascalName}", "org.ecorous.esnesnon.nonsense.loader.impl.launch.client.Nonsense${env.pascalName}",
arrayOf("-Dnonsense.development=true", "-Dlog4j.configurationFile=$assetPath"), arrayOf(
"-Dnonsense.development=true",
"-Dnonsense.plugin.minecraft.gameJar=${NonsenseGradlePlugin.remappedGameJarPath}",
"-Dlog4j.configurationFile=$assetPath"
),
arrayOf( arrayOf(
"--assetDir", assetPath.toString(), "--assetDir", assetPath.toString(),
"--version", "Nonsense", "--version", "Nonsense",