Skip to content

Commit 703eaa7

Browse files
committed
Remove main class configuration fallback
Remove fallback code since we now require Gradle 6.8 and can depend on the `getMainClass` method being present. Closes gh-26794
1 parent b7ac1e6 commit 703eaa7

File tree

1 file changed

+1
-8
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin

1 file changed

+1
-8
lines changed

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/JavaPluginAction.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,7 @@ private void configureBootRunTask(Project project) {
151151
}
152152
return Collections.emptyList();
153153
});
154-
try {
155-
run.getMainClass().convention(resolveProvider.flatMap(ResolveMainClassName::readMainClassName));
156-
}
157-
catch (NoSuchMethodError ex) {
158-
run.getInputs().file(resolveProvider.map((task) -> task.getOutputFile()));
159-
run.conventionMapping("main",
160-
() -> resolveProvider.flatMap(ResolveMainClassName::readMainClassName).get());
161-
}
154+
run.getMainClass().convention(resolveProvider.flatMap(ResolveMainClassName::readMainClassName));
162155
configureToolchainConvention(project, run);
163156
});
164157
}

0 commit comments

Comments
 (0)