Skip to content

Commit d602ce3

Browse files
rlazoemilypgoogle
authored andcommitted
Ignore non-firebase libraries from release configuration (#4793)
1 parent 2470e1a commit d602ce3

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

buildSrc/src/main/java/com/google/firebase/gradle/plugins/publish/PublishingPlugin.java

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,9 @@ public void apply(Project project) {
120120

121121
Set<String> allFirebaseProjects =
122122
project.getSubprojects().stream()
123-
.filter(
124-
sub ->
125-
sub.getExtensions().findByType(FirebaseLibraryExtension.class)
126-
!= null)
127-
.map(
128-
sub ->
129-
sub.getExtensions()
130-
.findByType(FirebaseLibraryExtension.class)
131-
.artifactId
132-
.get())
123+
.map(sub -> sub.getExtensions().findByType(FirebaseLibraryExtension.class))
124+
.filter(ext -> ext != null)
125+
.map(ext -> ext.artifactId.get())
133126
.collect(Collectors.toSet());
134127

135128
Set<FirebaseLibraryExtension> projectsToPublish =
@@ -140,7 +133,8 @@ public void apply(Project project) {
140133
project
141134
.project(name)
142135
.getExtensions()
143-
.getByType(FirebaseLibraryExtension.class))
136+
.findByType(FirebaseLibraryExtension.class))
137+
.filter(ext -> ext != null)
144138
.flatMap(lib -> lib.getLibrariesToRelease().stream())
145139
.collect(Collectors.toSet());
146140
project

0 commit comments

Comments
 (0)