fix relative path resolution in build script (#2390). Thanks to Fourmisain

This commit is contained in:
Fourmisain 2021-05-06 12:27:24 +02:00 committed by GitHub
parent e20ff0e8b7
commit 30769be822
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -311,7 +311,7 @@ task compileRecipes {
def smeltingPath = recipePath + "/smelting" def smeltingPath = recipePath + "/smelting"
def blastingPath = recipePath + "/blasting" def blastingPath = recipePath + "/blasting"
doLast { doLast {
// Add any recipe filenames that don't match the regex here // Add any recipe filenames that don't match the regex here
String[] whitelist = [] String[] whitelist = []
def pattern = ~'^\\w+_(ingot(_from_dust)?)\\.json$' def pattern = ~'^\\w+_(ingot(_from_dust)?)\\.json$'
@ -325,12 +325,12 @@ task compileRecipes {
recipe.type = "minecraft:blasting" recipe.type = "minecraft:blasting"
recipe.cookingtime = recipe.cookingtime / 2 recipe.cookingtime = recipe.cookingtime / 2
File output = new File(blastingPath, it.name) File output = file(new File(blastingPath, it.name))
output.write(JsonOutput.prettyPrint(JsonOutput.toJson(recipe))) output.write(JsonOutput.prettyPrint(JsonOutput.toJson(recipe)))
} }
} }
} }
} }
} }
// A task to ensure that the version being released has not already been released. // A task to ensure that the version being released has not already been released.