mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-04 12:06:41 +00:00
Merge remote-tracking branch 'upstream/feature/translatable-text' into i18n-merge
This commit is contained in:
@ -1,11 +1,14 @@
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import org.gradle.plugins.ide.idea.model.IdeaModel
|
||||
import com.mendhak.gradlecrowdin.DownloadTranslationsTask
|
||||
import com.mendhak.gradlecrowdin.UploadSourceFileTask
|
||||
|
||||
plugins {
|
||||
id("java-library")
|
||||
id("net.ltgt.apt-eclipse")
|
||||
id("net.ltgt.apt-idea")
|
||||
id("antlr")
|
||||
id("com.mendhak.gradlecrowdin")
|
||||
}
|
||||
|
||||
repositories {
|
||||
@ -101,3 +104,28 @@ tasks.named<ShadowJar>("shadowJar") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
val crowdinApiKey = "crowdin_apikey"
|
||||
|
||||
if (project.hasProperty(crowdinApiKey)) {
|
||||
tasks.named<UploadSourceFileTask>("crowdinUpload") {
|
||||
apiKey = "${project.property(crowdinApiKey)}"
|
||||
projectId = "worldedit-core"
|
||||
files = arrayOf(
|
||||
object {
|
||||
var name = "strings.json"
|
||||
var source = "${file("src/main/resources/lang/strings.json")}"
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
tasks.named<DownloadTranslationsTask>("crowdinDownload") {
|
||||
apiKey = "${project.property(crowdinApiKey)}"
|
||||
destination = "${file("build/resources/main/lang")}"
|
||||
projectId = "worldedit-core"
|
||||
}
|
||||
|
||||
tasks.named("classes").configure {
|
||||
dependsOn("crowdinDownload")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user