Gradle Upgrades and Clipboard Refactoring

This commit is contained in:
MattBDev
2020-03-02 17:43:27 -05:00
parent e1b946d0da
commit b7b11cc478
12 changed files with 61 additions and 116 deletions

View File

@ -114,7 +114,7 @@ tasks.named<ShadowJar>("shadowJar") {
val crowdinApiKey = "crowdin_apikey"
if (project.hasProperty(crowdinApiKey)) {
if (project.hasProperty(crowdinApiKey) && !gradle.startParameter.isOffline) {
tasks.named<UploadSourceFileTask>("crowdinUpload") {
apiKey = "${project.property(crowdinApiKey)}"
projectId = "worldedit-core"
@ -126,12 +126,19 @@ if (project.hasProperty(crowdinApiKey)) {
)
}
tasks.named<DownloadTranslationsTask>("crowdinDownload") {
val dlTranslationsTask = tasks.named<DownloadTranslationsTask>("crowdinDownload") {
apiKey = "${project.property(crowdinApiKey)}"
destination = "${file("build/resources/main/lang")}"
destination = "${buildDir.resolve("crowdin-i18n")}"
projectId = "worldedit-core"
}
tasks.named<Copy>("processResources") {
dependsOn(dlTranslationsTask)
from(dlTranslationsTask.get().destination) {
into("lang")
}
}
tasks.named("classes").configure {
dependsOn("crowdinDownload")
}