mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-04 12:06:41 +00:00
Rebase translation work for easier rebasing
This commit is contained in:
@ -1,11 +1,14 @@
|
||||
import net.minecrell.gradle.licenser.LicenseExtension
|
||||
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")
|
||||
}
|
||||
|
||||
applyPlatformAndCoreConfiguration()
|
||||
@ -84,3 +87,32 @@ sourceSets {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val crowdinApiKey = "crowdin_apikey"
|
||||
|
||||
fun Project.applyPlatformCrowdInConfig() {
|
||||
if (!project.hasProperty(crowdinApiKey)) ext[crowdinApiKey] = ""
|
||||
|
||||
apply(plugin = "com.mendhak.gradlecrowdin")
|
||||
|
||||
tasks.named<UploadSourceFileTask>("crowdinUpload") {
|
||||
apiKey = crowdinApiKey
|
||||
projectId = "worldedit-core"
|
||||
files = arrayOf(
|
||||
object {
|
||||
var name = "strings.json"
|
||||
var source = "$projectDir/src/main/resources/lang/strings.json"
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
tasks.named<DownloadTranslationsTask>("crowdinDownload") {
|
||||
apiKey = crowdinApiKey
|
||||
destination = "$projectDir/src/main/resources/lang"
|
||||
projectId = "worldedit-core"
|
||||
}
|
||||
|
||||
tasks.named("processResources").configure {
|
||||
dependsOn("crowdinDownload")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user