Fix crowdinExport task
This commit is contained in:
parent
d4e08ba976
commit
cee083eb88
1 changed files with 4 additions and 4 deletions
|
@ -197,14 +197,14 @@ build.dependsOn deobfJar, apiJar
|
||||||
//Triggers crowdin to export the latest translations
|
//Triggers crowdin to export the latest translations
|
||||||
task crowdinExport() {
|
task crowdinExport() {
|
||||||
onlyIf {
|
onlyIf {
|
||||||
hasProperty('crowdinKey')
|
project.hasProperty('crowdinKey')
|
||||||
}
|
}
|
||||||
doLast{
|
doLast{
|
||||||
def apiKey = project.crowdinKey
|
def apiKey = project.crowdinKey
|
||||||
def projectId = 'techreborn'
|
def projectId = 'techreborn'
|
||||||
def response = new URL(sprintf('https://api.crowdin.com/api/project/$s/export?key=$s', [projectId, apiKey])).text
|
def response = new URL(sprintf('https://api.crowdin.com/api/project/%1$s/export?key=%2$s', [projectId, apiKey])).text
|
||||||
def metadata = new XmlSlurper().parseText(response)
|
def metadata = new XmlParser().parseText(response)
|
||||||
project.logger.lifecycle("crowdin export status: " + metadata.@success)
|
project.logger.lifecycle("crowdin export status: " + metadata.@status)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue