Commit 703eaa71 authored by Phillip Webb's avatar Phillip Webb

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
parent b7ac1e6c
...@@ -151,14 +151,7 @@ final class JavaPluginAction implements PluginApplicationAction { ...@@ -151,14 +151,7 @@ final class JavaPluginAction implements PluginApplicationAction {
} }
return Collections.emptyList(); return Collections.emptyList();
}); });
try { run.getMainClass().convention(resolveProvider.flatMap(ResolveMainClassName::readMainClassName));
run.getMainClass().convention(resolveProvider.flatMap(ResolveMainClassName::readMainClassName));
}
catch (NoSuchMethodError ex) {
run.getInputs().file(resolveProvider.map((task) -> task.getOutputFile()));
run.conventionMapping("main",
() -> resolveProvider.flatMap(ResolveMainClassName::readMainClassName).get());
}
configureToolchainConvention(project, run); configureToolchainConvention(project, run);
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment