Skip to content

Commit 89936ba

Browse files
Tests: always use UTF-8 encoding when compiling.
1 parent 2b9ed7b commit 89936ba

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/objectbox-java-test/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ apply plugin: 'kotlin'
33

44
uploadArchives.enabled = false
55

6-
// Note: use release flag instead of sourceCompatibility and targetCompatibility to ensure only JDK 8 API is used.
7-
// https://docs.gradle.org/current/userguide/building_java_projects.html#sec:java_cross_compilation
86
tasks.withType(JavaCompile) {
7+
// Note: use release flag instead of sourceCompatibility and targetCompatibility to ensure only JDK 8 API is used.
8+
// https://docs.gradle.org/current/userguide/building_java_projects.html#sec:java_cross_compilation
99
options.release.set(8)
10+
// Note: Gradle defaults to the platform default encoding, make sure to always use UTF-8 for UTF-8 tests.
11+
options.encoding = "UTF-8"
1012
}
1113

1214
// Produce Java 8 byte code, would default to Java 6.

0 commit comments

Comments
 (0)