aboutsummaryrefslogtreecommitdiff
path: root/example/build.gradle.kts
blob: 99b62f983a6b269f989b2a269749c863bedb6db4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import moe.nea.mcautotranslations.gradle.CollectTranslations

plugins {
	kotlin("jvm") version "2.0.20"
	id("moe.nea.mc-auto-translations")
}

repositories {
	mavenCentral()
}

dependencies {
	implementation("com.google.code.gson:gson:2.11.0")
}

mcAutoTranslations {
	translationFunction.set("moe.nea.mcautotranslations.example.tr")
	translationFunctionResolved.set("moe.nea.mcautotranslations.example.trResolved")
}

val collectTranslations by tasks.registering(CollectTranslations::class) {
	this.baseTranslations.from(file("en_us.json"))
	this.classes.from(sourceSets.main.map { it.kotlin.classesDirectory })
	this.outputFile.set(layout.buildDirectory.file("en_us.json"))
}

tasks.processResources { from(collectTranslations) }