Skip to content

Commit 6c68174

Browse files
committed
Fix smoke test issues
1 parent 2a08a7e commit 6c68174

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ ext {
5858
protobufJavaUtilVersion = libs.versions.protobufjavautil.get()
5959
}
6060

61+
apply plugin: com.google.firebase.gradle.plugins.PublishingPlugin
62+
6163
apply plugin: com.google.firebase.gradle.plugins.ci.ContinuousIntegrationPlugin
6264
apply plugin: com.google.firebase.gradle.plugins.ci.SmokeTestsPlugin
6365

64-
apply plugin: com.google.firebase.gradle.plugins.PublishingPlugin
65-
6666
firebaseContinuousIntegration {
6767
ignorePaths = [
6868
/.*\.gitignore$/,

buildSrc/src/main/java/com/google/firebase/gradle/plugins/LibraryGroups.kt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,19 @@ fun computeLibraryGroups(project: Project): Map<String, List<FirebaseLibraryExte
3232
val libraryGroups =
3333
project.subprojects.mapNotNull { it.firebaseLibraryOrNull }.groupBy { it.libraryGroupName }
3434

35-
// TODO(davidmotson): Confirm the right location for this functionality
36-
for (libraryGroup in libraryGroups.values) {
35+
return libraryGroups
36+
}
37+
38+
fun fixLibraryGroupVersions(libraryGroups: Map<String, List<FirebaseLibraryExtension>>) {
39+
for ((name, libraryGroup) in libraryGroups) {
3740
val maxVersion =
3841
libraryGroup.mapNotNull { it.moduleVersion }.maxOrNull()?.toString() ?: continue
39-
for (library in libraryGroup) {
40-
if (library.moduleVersion == null) {
41-
library.project.version = maxVersion
42+
for (firebaseExtension in libraryGroup) {
43+
if (ModuleVersion.fromStringOrNull(firebaseExtension.project.version.toString()) == null) {
44+
firebaseExtension.project.version = maxVersion.toString()
4245
}
4346
}
4447
}
45-
return libraryGroups
4648
}
4749

4850
/**

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ abstract class PublishingPlugin : Plugin<Project> {
7171
project.gradle.projectsEvaluated {
7272
val allFirebaseLibraries = project.subprojects.mapNotNull { it.firebaseLibraryOrNull }
7373
val libraryGroups = computeLibraryGroups(project)
74+
fixLibraryGroupVersions(libraryGroups)
7475
val releaseMetadata = computeReleaseMetadata(project, allFirebaseLibraries, libraryGroups)
7576

7677
val releasingFirebaseLibraries = releaseMetadata?.releasingLibraries.orEmpty()

0 commit comments

Comments
 (0)