Skip processAot and processTestAot if there is no main or test code
Closes gh-32424
This commit is contained in:
@@ -21,6 +21,7 @@ import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.util.List;
|
||||
|
||||
import org.gradle.testkit.runner.TaskOutcome;
|
||||
import org.junit.jupiter.api.TestTemplate;
|
||||
|
||||
import org.springframework.boot.gradle.junit.GradleCompatibility;
|
||||
@@ -94,4 +95,16 @@ class SpringBootAotPluginIntegrationTests {
|
||||
assertThat(output).contains("org.jboss.logging" + File.separatorChar + "jboss-logging");
|
||||
}
|
||||
|
||||
@TestTemplate
|
||||
void processAotIsSkippedWhenProjectHasNoMainSource() {
|
||||
assertThat(this.gradleBuild.build("processAot").task(":processAot").getOutcome())
|
||||
.isEqualTo(TaskOutcome.NO_SOURCE);
|
||||
}
|
||||
|
||||
@TestTemplate
|
||||
void processTestAotIsSkippedWhenProjectHasNoTestSource() {
|
||||
assertThat(this.gradleBuild.build("processTestAot").task(":processTestAot").getOutcome())
|
||||
.isEqualTo(TaskOutcome.NO_SOURCE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user