diff --git a/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/repackage/ProjectLibraries.java b/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/repackage/ProjectLibraries.java index d1c4eef608..b10ee35ff7 100644 --- a/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/repackage/ProjectLibraries.java +++ b/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/repackage/ProjectLibraries.java @@ -127,8 +127,11 @@ class ProjectLibraries implements Libraries { } else if (dependency instanceof ProjectDependency) { ProjectDependency projectDependency = (ProjectDependency) dependency; - libraries.addAll(getLibrariesForFileDependencies( - projectDependency.getProjectConfiguration(), scope)); + Configuration dependencyConfiguration = projectDependency + .getDependencyProject().getConfigurations() + .getByName(projectDependency.getConfiguration()); + libraries.addAll( + getLibrariesForFileDependencies(dependencyConfiguration, scope)); } } return libraries;