Fixed gradle setup

This commit is contained in:
Matthew Miller 2019-10-13 22:06:54 +10:00
parent 96e56bdd0c
commit 1cca2182a9

View File

@ -90,13 +90,10 @@ sourceSets {
val crowdinApiKey = "crowdin_apikey"
fun Project.applyPlatformCrowdInConfig() {
if (!project.hasProperty(crowdinApiKey)) ext[crowdinApiKey] = ""
if (!project.hasProperty(crowdinApiKey)) ext[crowdinApiKey] = ""
apply(plugin = "com.mendhak.gradlecrowdin")
tasks.named<UploadSourceFileTask>("crowdinUpload") {
apiKey = crowdinApiKey
tasks.named<UploadSourceFileTask>("crowdinUpload") {
apiKey = "${project.property(crowdinApiKey)}"
projectId = "worldedit-core"
files = arrayOf(
object {
@ -104,15 +101,14 @@ fun Project.applyPlatformCrowdInConfig() {
var source = "$projectDir/src/main/resources/lang/strings.json"
}
)
}
}
tasks.named<DownloadTranslationsTask>("crowdinDownload") {
apiKey = crowdinApiKey
tasks.named<DownloadTranslationsTask>("crowdinDownload") {
apiKey = "${project.property(crowdinApiKey)}"
destination = "$projectDir/src/main/resources/lang"
projectId = "worldedit-core"
}
tasks.named("processResources").configure {
dependsOn("crowdinDownload")
}
}
tasks.named("processResources").configure {
dependsOn("crowdinDownload")
}