gradle build: setup compiler charset

This commit is contained in:
Alexey Andreev 2023-02-02 10:42:45 +01:00
parent f09a427827
commit 895ec99826
3 changed files with 12 additions and 1 deletions

View File

@ -87,6 +87,9 @@ val generateConfig by tasks.registering {
""".trimIndent())
}
}
tasks.compileJava.configure { dependsOn(generateConfig) }
tasks.compileJava.configure {
dependsOn(generateConfig)
options.encoding = "UTF-8"
}
sourceSets.main.configure { java.srcDir(generatedConfigDir) }

View File

@ -73,6 +73,10 @@ gradle.allprojects {
mavenLocal()
mavenCentral()
}
tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
}
}
gradle.afterProject {

View File

@ -61,6 +61,10 @@ gradle.allprojects {
gradle.allprojects {
apply(plugin = "javaVersion")
tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
}
}
gradle.afterProject {