Skip to content

Commit a04fd14

Browse files
committed
Fix buildSrc:test failing on JDKs before JDK 25 with Non-English locale
See #35777 (comment) Signed-off-by: Yanming Zhou <[email protected]>
1 parent f80b79b commit a04fd14

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

buildSrc/src/test/java/org/springframework/build/multirelease/MultiReleaseJarPluginTests.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ void validateJar() throws IOException {
131131
}
132132
multiRelease { releaseVersions 17 }
133133
""");
134+
writeGradleProperties("""
135+
org.gradle.jvmargs=-Duser.language=en
136+
""");
134137
writeClass("src/main/java17", "Main.java", """
135138
public class Main {
136139
@@ -152,6 +155,12 @@ private void writeBuildFile(String buildContent) throws IOException {
152155
}
153156
}
154157

158+
private void writeGradleProperties(String properties) throws IOException {
159+
try (PrintWriter out = new PrintWriter(new FileWriter(new File(this.projectDir, "gradle.properties")))) {
160+
out.print(properties);
161+
}
162+
}
163+
155164
private void writeClass(String path, String fileName, String fileContent) throws IOException {
156165
Path folder = this.projectDir.toPath().resolve(path);
157166
Files.createDirectories(folder);

0 commit comments

Comments
 (0)