File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
buildSrc/src/test/java/org/springframework/build/multirelease Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -43,10 +43,13 @@ public class MultiReleaseJarPluginTests {
4343
4444 private File buildFile ;
4545
46+ private File propertiesFile ;
47+
4648 @ BeforeEach
4749 void setup (@ TempDir File projectDir ) {
4850 this .projectDir = projectDir ;
4951 this .buildFile = new File (this .projectDir , "build.gradle" );
52+ this .propertiesFile = new File (this .projectDir , "gradle.properties" );
5053 }
5154
5255 @ Test
@@ -131,6 +134,9 @@ void validateJar() throws IOException {
131134 }
132135 multiRelease { releaseVersions 17 }
133136 """ );
137+ writeGradleProperties ("""
138+ org.gradle.jvmargs=-Duser.language=en
139+ """ );
134140 writeClass ("src/main/java17" , "Main.java" , """
135141 public class Main {
136142
@@ -152,6 +158,12 @@ private void writeBuildFile(String buildContent) throws IOException {
152158 }
153159 }
154160
161+ private void writeGradleProperties (String properties ) throws IOException {
162+ try (PrintWriter out = new PrintWriter (new FileWriter (this .propertiesFile ))) {
163+ out .print (properties );
164+ }
165+ }
166+
155167 private void writeClass (String path , String fileName , String fileContent ) throws IOException {
156168 Path folder = this .projectDir .toPath ().resolve (path );
157169 Files .createDirectories (folder );
You can’t perform that action at this time.
0 commit comments