for example,
read the json file in build.gradle
and use the json values as strings in the file
{
\"type\":\"xyz\",
\"properties\": {
\"foo\"
From Gradle you can execute any Groovy code and Groovy already has build-in JSON parsers.
E.g. you can use a task that will print your value into stdout:
task parseJson {
doLast {
def jsonFile = file('path/to/json')
def parsedJson = new groovy.json.JsonSlurper().parseText(jsonFile.text)
println parsedJson.properties.bar.type
}
}