fix: add extension namespaces
All checks were successful
Publish to snapshot maven / build (push) Successful in 1m0s

This commit is contained in:
moehreag 2024-10-01 11:00:47 +02:00
parent 15987c805b
commit e25e598057
5 changed files with 7 additions and 7 deletions

View file

@ -7,7 +7,7 @@ plugins {
} }
group = "dev.frogmc" group = "dev.frogmc"
version = "0.0.1-alpha.26" + ("+local".takeUnless { project.hasProperty("FrogMCSnapshotsMavenPassword") } ?: "") version = "0.0.1-alpha.27" + ("+local".takeUnless { project.hasProperty("FrogMCSnapshotsMavenPassword") } ?: "")
repositories { repositories {
maven { maven {

View file

@ -233,7 +233,7 @@ class PhytotelmaPlugin : Plugin<Project> {
manifest.writeLines(lines, StandardCharsets.UTF_8) manifest.writeLines(lines, StandardCharsets.UTF_8)
val metadata = fs.getPath(Constants.MOD_METADATA_FILE) val metadata = fs.getPath(Constants.MOD_METADATA_FILE)
tomlParser.parse(metadata, FileNotFoundAction.READ_NOTHING) tomlParser.parse(metadata, FileNotFoundAction.READ_NOTHING)
.get<String>("frog.extensions.accesswidener")?.let { name -> .get<String>("frog.extensions.frogloader.accesswidener")?.let { name ->
val aw = metadata.resolveSibling(name) val aw = metadata.resolveSibling(name)
AccessWidener.checkAW(aw, ProjectStorage.get(project).remappedGameJarPath!!) AccessWidener.checkAW(aw, ProjectStorage.get(project).remappedGameJarPath!!)
remapAccesswidener(mappings, aw) remapAccesswidener(mappings, aw)
@ -390,7 +390,7 @@ class PhytotelmaPlugin : Plugin<Project> {
FileSystems.newFileSystem(remappedPath).use { fs -> FileSystems.newFileSystem(remappedPath).use { fs ->
val metadata = fs.getPath(Constants.MOD_METADATA_FILE) val metadata = fs.getPath(Constants.MOD_METADATA_FILE)
tomlParser.parse(metadata, FileNotFoundAction.READ_NOTHING) tomlParser.parse(metadata, FileNotFoundAction.READ_NOTHING)
.get<String>("frog.extensions.accesswidener")?.let { name -> .get<String>("frog.extensions.frogloader.accesswidener")?.let { name ->
val aw = metadata.resolveSibling(name) val aw = metadata.resolveSibling(name)
remapAccesswidener(mojOfficial, aw) remapAccesswidener(mojOfficial, aw)
remapAccesswidener(officialStore, aw) remapAccesswidener(officialStore, aw)

View file

@ -35,7 +35,7 @@ object AccessWidener {
return null return null
} }
return PARSER.parse(it, FileNotFoundAction.READ_NOTHING) return PARSER.parse(it, FileNotFoundAction.READ_NOTHING)
.get<String>("frog.extensions.accesswidener")?.let { name -> .get<String>("frog.extensions.frogloader.accesswidener")?.let { name ->
return it.resolveSibling(name).toPath() return it.resolveSibling(name).toPath()
} }
} }
@ -54,7 +54,7 @@ object AccessWidener {
FileSystems.newFileSystem(it).use { fs -> FileSystems.newFileSystem(it).use { fs ->
val metadata = fs.getPath(Constants.MOD_METADATA_FILE) val metadata = fs.getPath(Constants.MOD_METADATA_FILE)
PARSER.parse(metadata, FileNotFoundAction.READ_NOTHING) PARSER.parse(metadata, FileNotFoundAction.READ_NOTHING)
.get<String>("frog.extensions.accesswidener")?.let { name -> .get<String>("frog.extensions.frogloader.accesswidener")?.let { name ->
return@flatMap readTransitiveAW(metadata.resolveSibling(name)).stream() return@flatMap readTransitiveAW(metadata.resolveSibling(name)).stream()
} }
} }

View file

@ -52,7 +52,7 @@ abstract class PhytotelmaBuildTask : DefaultTask() {
val metadata = fs.getPath(Constants.MOD_METADATA_FILE) val metadata = fs.getPath(Constants.MOD_METADATA_FILE)
val config: CommentedConfig = val config: CommentedConfig =
tomlParser.parse(metadata, FileNotFoundAction.THROW_ERROR) tomlParser.parse(metadata, FileNotFoundAction.THROW_ERROR)
if (!config.add("frog.extensions.included_jars", files)) { if (!config.add("frog.extensions.frogloader.included_jars", files)) {
println("Failed to add included jars to mod manifest, make sure it doesn't include a key at 'frog.extensions.included_jars'!") println("Failed to add included jars to mod manifest, make sure it doesn't include a key at 'frog.extensions.included_jars'!")
} }
tomlWriter.write(config, metadata, WritingMode.REPLACE) tomlWriter.write(config, metadata, WritingMode.REPLACE)

View file

@ -124,7 +124,7 @@ object Nester {
version = "$semver" version = "$semver"
license = "" license = ""
[frog.extensions] [frog.extensions.frogloader]
phytotelma.generated = true phytotelma.generated = true
""".trimIndent() """.trimIndent()
) )