|
|
|
@ -51,7 +51,7 @@ public class BootRunIntegrationTests {
|
|
|
|
|
new File(this.gradleBuild.getProjectDir(), "src/main/resources").mkdirs();
|
|
|
|
|
BuildResult result = this.gradleBuild.build("bootRun");
|
|
|
|
|
assertThat(result.task(":bootRun").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
|
|
|
|
assertThat(result.getOutput()).contains("1. " + urlOf(mainJavaOutput()));
|
|
|
|
|
assertThat(result.getOutput()).contains("1. " + urlOf("build/classes/java/main"));
|
|
|
|
|
assertThat(result.getOutput()).contains("2. " + urlOf("build/resources/main"));
|
|
|
|
|
assertThat(result.getOutput()).doesNotContain(urlOf("src/main/resources"));
|
|
|
|
|
}
|
|
|
|
@ -65,7 +65,7 @@ public class BootRunIntegrationTests {
|
|
|
|
|
BuildResult result = this.gradleBuild.build("bootRun");
|
|
|
|
|
assertThat(result.task(":bootRun").getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
|
|
|
|
assertThat(result.getOutput()).contains("1. " + urlOf("src/main/resources"));
|
|
|
|
|
assertThat(result.getOutput()).contains("2. " + urlOf(mainJavaOutput()));
|
|
|
|
|
assertThat(result.getOutput()).contains("2. " + urlOf("build/classes/java/main"));
|
|
|
|
|
assertThat(result.getOutput()).doesNotContain(urlOf("build/resources/main"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -87,13 +87,6 @@ public class BootRunIntegrationTests {
|
|
|
|
|
.contains("JVM arguments = [-Dcom.foo=bar, -Dcom.bar=baz]");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String mainJavaOutput() {
|
|
|
|
|
String gradleVersion = this.gradleBuild.getGradleVersion();
|
|
|
|
|
return "build/classes/"
|
|
|
|
|
+ (gradleVersion != null && gradleVersion.startsWith("4.") ? "java/" : "")
|
|
|
|
|
+ "main";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String urlOf(String path) throws IOException {
|
|
|
|
|
return new File(this.gradleBuild.getProjectDir().getCanonicalFile(), path).toURI()
|
|
|
|
|
.toURL().toString();
|
|
|
|
|