Skip to content

Commit

Permalink
Disable AddRefmapName if refmap is not present
Browse files Browse the repository at this point in the history
  • Loading branch information
shedaniel committed Feb 29, 2024
1 parent 2e37fec commit 1909d7b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import java.io.ByteArrayInputStream
class AddRefmapName : AssetEditTransformer {
val gson = GsonBuilder().setPrettyPrinting().create()
override fun doEdit(context: TransformerContext, output: FileAccess) {
val refmap = System.getProperty(BuiltinProperties.REFMAP_NAME) ?: return
val mixins = mutableSetOf<String>()
output.handle { path, bytes ->
// Check JSON file in root directory
Expand All @@ -39,7 +40,6 @@ class AddRefmapName : AssetEditTransformer {
if (mixins.isNotEmpty()) {
Logger.debug("Found mixin config(s): " + java.lang.String.join(",", mixins))
}
val refmap = System.getProperty(BuiltinProperties.REFMAP_NAME)
mixins.forEach { path ->
output.modifyFile(path) {
val json: JsonObject = gson.fromJson<JsonObject>(
Expand Down

0 comments on commit 1909d7b

Please sign in to comment.