fucking crowdin

This commit is contained in:
Maciej Pawłowski 2024-10-21 22:09:43 +02:00
parent 2211b35513
commit 1dca64f916

View file

@ -253,7 +253,7 @@ tasks.sourcesJar.dependsOn runDatagen
jar {
exclude "**/*.psd"
from file('src/main/generated')
from { crowdin.getDidWork() ? fileTree('build/translations').matching{exclude "**/en_US.json"} : null}
from { fileTree('build/translations').matching{exclude "**/en_US.json"} }
// A bit of a hack to allow the generated sources when they already exist
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
@ -279,15 +279,15 @@ tasks.register('crowdinExport') {
def translationsUrl = "https://crowdin.com/backend/download/project/techreborn.zip"
def translationsZip = file("build/translations.zip")
tasks.register('crowdin') {
dependsOn crowdinExport
description "Downloads translations from CrowdIn"
outputs.file translationsZip
// tasks.register('crowdin') {
// dependsOn crowdinExport
// description "Downloads translations from CrowdIn"
// outputs.file translationsZip
doLast {
translationsZip.bytes = new URL(translationsUrl).bytes
}
}
// doLast {
// translationsZip.bytes = new URL(translationsUrl).bytes
// }
// }
tasks.register('cleanCrowdin', Delete) {
description "Delete old translations"
@ -296,7 +296,7 @@ tasks.register('cleanCrowdin', Delete) {
clean.dependsOn cleanCrowdin
tasks.register('renameCrowdin', Copy) {
dependsOn crowdin
// dependsOn crowdin
description "Renames the translation files to be all lower case"
from zipTree(translationsZip)
into file('build/translations')