mirror of
https://gitee.com/dcren/initializr.git
synced 2025-09-18 17:48:14 +08:00
Merge pull request #852 from jnizet
* pr/852: Add missing spaces in generated Gradle code
This commit is contained in:
@@ -144,7 +144,7 @@ public class GradleBuildWriter {
|
||||
else {
|
||||
writer.println(configurationName + " {");
|
||||
writer.indented(() -> writer.println(String.format("extendsFrom %s",
|
||||
String.join(",", configurationCustomization.getExtendsFrom()))));
|
||||
String.join(", ", configurationCustomization.getExtendsFrom()))));
|
||||
writer.println("}");
|
||||
}
|
||||
}
|
||||
|
@@ -62,7 +62,7 @@ public class GradleSettingsWriter {
|
||||
writer.indented(() -> {
|
||||
writer.println("eachPlugin {");
|
||||
writer.indented(() -> {
|
||||
writer.println("if(requested.id.id == 'org.springframework.boot') {");
|
||||
writer.println("if (requested.id.id == 'org.springframework.boot') {");
|
||||
writer.indented(() -> writer.println(
|
||||
"useModule(\"org.springframework.boot:spring-boot-gradle-plugin:${requested.version}\")"));
|
||||
writer.println("}");
|
||||
|
@@ -257,7 +257,7 @@ class GradleBuildWriterTests {
|
||||
(configuration) -> configuration.extendsFrom("testCompile"));
|
||||
List<String> lines = generateBuild(build);
|
||||
assertThat(lines).containsSequence("configurations {", " developmentOnly {",
|
||||
" extendsFrom compile,testCompile", " }", "}");
|
||||
" extendsFrom compile, testCompile", " }", "}");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -52,7 +52,7 @@ class GradleSettingsWriterTests {
|
||||
" maven { url 'https://repo.spring.io/milestone' }",
|
||||
" gradlePluginPortal()", " }", " resolutionStrategy {",
|
||||
" eachPlugin {",
|
||||
" if(requested.id.id == 'org.springframework.boot') {",
|
||||
" if (requested.id.id == 'org.springframework.boot') {",
|
||||
" useModule(\"org.springframework.boot:spring-boot-gradle-plugin:${requested.version}\")",
|
||||
" }", " }", " }", "}");
|
||||
}
|
||||
@@ -67,7 +67,7 @@ class GradleSettingsWriterTests {
|
||||
" maven { url 'https://repo.spring.io/snapshot' }",
|
||||
" gradlePluginPortal()", " }", " resolutionStrategy {",
|
||||
" eachPlugin {",
|
||||
" if(requested.id.id == 'org.springframework.boot') {",
|
||||
" if (requested.id.id == 'org.springframework.boot') {",
|
||||
" useModule(\"org.springframework.boot:spring-boot-gradle-plugin:${requested.version}\")",
|
||||
" }", " }", " }", "}");
|
||||
}
|
||||
|
Reference in New Issue
Block a user