-
Notifications
You must be signed in to change notification settings - Fork 625
Fix workflows for Firebase Sessions #4841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Coverage Report 1Affected Products
Test Logs |
The public api surface has changed for the subproject firebase-sessions: Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly. |
The Javadoc failure should be fixed when #4847 lands. |
implementation("com.google.firebase:firebase-common-ktx:20.3.2") | ||
implementation("com.google.firebase:firebase-components:17.1.0") | ||
implementation("com.google.firebase:firebase-encoders-json:18.0.1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me here. But curious why we choose pinned versions over a HEAD dependency! Would be a good learning for all of for future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was an effort across the whole repo to pin dep versions see go/firebase-android-cross-deps
|
||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.google.firebase.sessions.test" | ||
android:versionCode="1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do a dynamic version code here? For eg: number of days since January 2023? I'm trying to see if we can get some dynamicity in the data that is generated especially for the ApplicationInfo proto message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see an easy way to do that inside this manifest file. Maybe we can do it programmatically for that one test later.
|
||
fun getApplicationInfo(firebaseApp: FirebaseApp): ApplicationInfo { | ||
val packageName = firebaseApp.applicationContext.packageName | ||
val packageInfo = firebaseApp.applicationContext.packageManager.getPackageInfo(packageName, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid such a long include, can we import the package to make it look leaner?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These aren't package imports, these are getters. Like firebaseApp.getApplicationContext().getPackageManager()
. I can still make it look leaner by adding another val.
@@ -47,3 +46,6 @@ dependencies { | |||
implementation("androidx.core:core-ktx:1.9.0") | |||
implementation("com.google.android.material:material:1.8.0") | |||
} | |||
|
|||
extra["packageName"] = "com.google.firebase.testing.sessions" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. Why specify the package name here and not in the manifest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is how we pass a package name to the googleServices.gradle
file below.
Fix workflows for Firebase Sessions
googleServices.gradle
file instead of the Google Services plugin directlyApplicationInfoKt
that was showing up in the api surfaceAndroidManifest.xml
file withversionName
set to fix android tests