Fix content filters when excludeProjectDependencies() is used
Fixes gh-23763
This commit is contained in:
@@ -369,7 +369,7 @@ public class LayeredSpec {
|
||||
List<ContentFilter<Library>> excludeFilters = getExcludes().stream().map(filterFactory)
|
||||
.collect(Collectors.toList());
|
||||
if (this.excludeProjectDependencies) {
|
||||
excludeFilters = new ArrayList<>(includeFilters);
|
||||
excludeFilters = new ArrayList<>(excludeFilters);
|
||||
excludeFilters.add(Library::isLocal);
|
||||
}
|
||||
return new IncludeExcludeContentSelector<>(layer, includeFilters, excludeFilters);
|
||||
|
||||
@@ -19,11 +19,12 @@ bootJar {
|
||||
intoLayer("app")
|
||||
}
|
||||
dependencies {
|
||||
intoLayer("subproject-dependencies") {
|
||||
includeProjectDependencies()
|
||||
}
|
||||
intoLayer("snapshot-dependencies") {
|
||||
include "*:*:*SNAPSHOT"
|
||||
excludeProjectDependencies()
|
||||
}
|
||||
intoLayer("subproject-dependencies") {
|
||||
includeProjectDependencies()
|
||||
}
|
||||
intoLayer("commons-dependencies") {
|
||||
include "org.apache.commons:*"
|
||||
|
||||
Reference in New Issue
Block a user