Skip to content

Commit

Permalink
use findByType when not sure if java plugin exists (#1231)
Browse files Browse the repository at this point in the history
use findByType when not sure if java plugin exists #1231
  • Loading branch information
esword authored Sep 16, 2024
1 parent 9345584 commit 6b89b09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog/@unreleased/pr-1231.v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type: fix
fix:
description: use findByType when not sure if java plugin exists
links:
- https://github.com/palantir/gradle-consistent-versions/pull/1231
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static Set<Configuration> getResolvableConfigurations(Project project) {
* applied, this returns an empty set.
*/
private static Set<String> getLegacyJavaConfigurations(Project project) {
JavaPluginExtension javaConvention = project.getExtensions().getByType(JavaPluginExtension.class);
JavaPluginExtension javaConvention = project.getExtensions().findByType(JavaPluginExtension.class);
if (javaConvention == null) {
return ImmutableSet.of();
}
Expand Down

0 comments on commit 6b89b09

Please sign in to comment.