Skip to content

Commit

Permalink
Merge pull request quarkusio#8340 from roguexz/master
Browse files Browse the repository at this point in the history
Gradle: Search for build script dependencies in the parent projects as well
  • Loading branch information
aloubyansky authored Apr 2, 2020
2 parents 97eedc0 + d4fba4d commit 5fa4bb3
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,14 @@ private void copyOutputToConsole(InputStream is) {
}

private void addGradlePluginDeps(StringBuilder classPathManifest, DevModeContext context) {
Configuration conf = getProject().getBuildscript().getConfigurations().getByName("classpath");
ResolvedDependency quarkusDep = conf.getResolvedConfiguration().getFirstLevelModuleDependencies().stream()
List<ResolvedDependency> buildScriptDeps = new ArrayList<>();
Project prj = getProject();
while (prj != null) {
buildScriptDeps.addAll(prj.getBuildscript().getConfigurations().getByName("classpath")
.getResolvedConfiguration().getFirstLevelModuleDependencies());
prj = prj.getParent();
}
ResolvedDependency quarkusDep = buildScriptDeps.stream()
.filter(rd -> "io.quarkus.gradle.plugin".equals(rd.getModuleName()))
.findFirst()
.orElseThrow(() -> new IllegalStateException("Unable to find quarkus-gradle-plugin dependency"));
Expand Down

0 comments on commit 5fa4bb3

Please sign in to comment.