From 895ec9982672b89160d8fe66a8d230b793d6b016 Mon Sep 17 00:00:00 2001 From: Alexey Andreev Date: Thu, 2 Feb 2023 10:42:45 +0100 Subject: [PATCH] gradle build: setup compiler charset --- build-logic/build.gradle.kts | 5 ++++- samples/settings.gradle.kts | 4 ++++ settings.gradle.kts | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 6a8bb3297..447c701e3 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -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) } \ No newline at end of file diff --git a/samples/settings.gradle.kts b/samples/settings.gradle.kts index 086c1f47b..fffa70ed9 100644 --- a/samples/settings.gradle.kts +++ b/samples/settings.gradle.kts @@ -73,6 +73,10 @@ gradle.allprojects { mavenLocal() mavenCentral() } + + tasks.withType().configureEach { + options.encoding = "UTF-8" + } } gradle.afterProject { diff --git a/settings.gradle.kts b/settings.gradle.kts index 8b9bafb69..12efef90d 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -61,6 +61,10 @@ gradle.allprojects { gradle.allprojects { apply(plugin = "javaVersion") + + tasks.withType().configureEach { + options.encoding = "UTF-8" + } } gradle.afterProject {