Skip to content

Use Dagger in firebase-appdistribution #4540

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

Merged
merged 1 commit into from
Jan 9, 2023
Merged

Conversation

lfkellogg
Copy link
Contributor

Based on @vkryachko 's prototype: #4380

This leaves out support for multiple FirebaseApps since our SDK does not support that yet.

@google-oss-bot
Copy link
Contributor

1 Warning
⚠️ Did you forget to add a changelog entry? (Add the 'no-changelog' label to the PR to silence this warning.)

Generated by 🚫 Danger

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jan 6, 2023

Coverage Report 1

Affected Products

  • firebase-appdistribution

    Overall coverage changed from ? (10c1a92) to 0.00% (90564b1) by ?.

    64 individual files with coverage change

    FilenameBase (10c1a92)Merge (90564b1)Diff
    AabUpdater.java?0.00%?
    AabUpdater_Factory.java?0.00%?
    ApkInstaller.java?0.00%?
    ApkInstaller_Factory.java?0.00%?
    ApkUpdater.java?0.00%?
    ApkUpdater_Factory.java?0.00%?
    AppDistributionReleaseImpl.java?0.00%?
    AppDistributionReleaseInternal.java?0.00%?
    AppDistroComponent.java?0.00%?
    AppIconSource.java?0.00%?
    AppIconSource_Factory.java?0.00%?
    AutoValue_AppDistributionReleaseImpl.java?0.00%?
    AutoValue_AppDistributionReleaseInternal.java?0.00%?
    AutoValue_ImageUtils_ImageSize.java?0.00%?
    AutoValue_TesterApiDisabledErrorDetails.java?0.00%?
    AutoValue_TesterApiDisabledErrorDetails_HelpLink.java?0.00%?
    AutoValue_UpdateProgressImpl.java?0.00%?
    DaggerAppDistroComponent.java?0.00%?
    ErrorMessages.java?0.00%?
    FeedbackActivity.java?0.00%?
    FeedbackActivity_MembersInjector.java?0.00%?
    FeedbackSender.java?0.00%?
    FeedbackSender_Factory.java?0.00%?
    FirebaseAppDistributionExceptions.java?0.00%?
    FirebaseAppDistributionFileProvider.java?0.00%?
    FirebaseAppDistributionImpl.java?0.00%?
    FirebaseAppDistributionImpl_Factory.java?0.00%?
    FirebaseAppDistributionLifecycleNotifier.java?0.00%?
    FirebaseAppDistributionLifecycleNotifier_Factory.java?0.00%?
    FirebaseAppDistributionNotificationsManager.java?0.00%?
    FirebaseAppDistributionNotificationsManager_Factory.java?0.00%?
    FirebaseAppDistributionRegistrar.java?0.00%?
    FirebaseAppDistributionTesterApiClient.java?0.00%?
    FirebaseAppDistributionTesterApiClient_Factory.java?0.00%?
    HttpsUrlConnectionFactory.java?0.00%?
    HttpsUrlConnectionFactory_Factory.java?0.00%?
    ImageUtils.java?0.00%?
    InstallActivity.java?0.00%?
    LogWrapper.java?0.00%?
    NewReleaseFetcher.java?0.00%?
    NewReleaseFetcher_Factory.java?0.00%?
    PackageInfoUtils.java?0.00%?
    ReleaseIdentifier.java?0.00%?
    ReleaseIdentifier_Factory.java?0.00%?
    ReleaseUtils.java?0.00%?
    ScreenshotTaker.java?0.00%?
    ScreenshotTaker_Factory.java?0.00%?
    SequentialReference.java?0.00%?
    SignInResultActivity.java?0.00%?
    SignInStorage.java?0.00%?
    SignInStorage_Factory.java?0.00%?
    TakeScreenshotAndStartFeedbackActivity.java?0.00%?
    TakeScreenshotAndStartFeedbackActivity_MembersInjector.java?0.00%?
    TaskCache.java?0.00%?
    TaskCompletionSourceCache.java?0.00%?
    TaskUtils.java?0.00%?
    TesterApiDisabledErrorDetails.java?0.00%?
    TesterApiHttpClient.java?0.00%?
    TesterApiHttpClient_Factory.java?0.00%?
    TesterSignInManager.java?0.00%?
    TesterSignInManager_Factory.java?0.00%?
    UpdateProgressImpl.java?0.00%?
    UpdateTaskCache.java?0.00%?
    UpdateTaskImpl.java?0.00%?

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/vyd7isT4g3.html

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2023

Unit Test Results

172 tests   172 ✔️  44s ⏱️
  17 suites      0 💤
  17 files        0

Results for commit 70c51bc.

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jan 6, 2023

Size Report 1

Affected Products

  • base

    TypeBase (10c1a92)Merge (90564b1)Diff
    apk (aggressive)?8.39 kB? (?)
    apk (release)?8.65 kB? (?)
  • firebase-annotations

    TypeBase (10c1a92)Merge (90564b1)Diff
    apk (aggressive)?8.39 kB? (?)
    apk (release)?9.46 kB? (?)
  • firebase-appdistribution

    TypeBase (10c1a92)Merge (90564b1)Diff
    aar?229 kB? (?)
    apk (aggressive)?890 kB? (?)
    apk (release)?2.63 MB? (?)
  • firebase-appdistribution-api

    TypeBase (10c1a92)Merge (90564b1)Diff
    aar?16.0 kB? (?)
    apk (aggressive)?112 kB? (?)
    apk (release)?1.27 MB? (?)
  • firebase-common

    TypeBase (10c1a92)Merge (90564b1)Diff
    aar?67.4 kB? (?)
    apk (aggressive)?111 kB? (?)
    apk (release)?1.26 MB? (?)
  • firebase-components

    TypeBase (10c1a92)Merge (90564b1)Diff
    aar?44.9 kB? (?)
    apk (aggressive)?23.1 kB? (?)
    apk (release)?596 kB? (?)
  • firebase-installations

    TypeBase (10c1a92)Merge (90564b1)Diff
    aar?55.0 kB? (?)
    apk (aggressive)?116 kB? (?)
    apk (release)?1.28 MB? (?)
  • firebase-installations-interop

    TypeBase (10c1a92)Merge (90564b1)Diff
    aar?8.05 kB? (?)
    apk (aggressive)?65.0 kB? (?)
    apk (release)?651 kB? (?)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/5Ys4jer3Cp.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jan 6, 2023

Startup Time Report 1

Note: Layout is sometimes suboptimal due to limited formatting support on GitHub. Please check this report on GCS.

Startup time comparison between the CI merge commit (90564b1) and the base commit (10c1a92) are not available.

No macrobenchmark data found for the base commit (10c1a92). Analysis for the CI merge commit (90564b1) can be found at:

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/OxoFuS8wdc/index.html

@lfkellogg lfkellogg force-pushed the lk/fad-dagger branch 3 times, most recently from 72ffea6 to 252b219 Compare January 7, 2023 00:15
}

@VisibleForTesting
@Inject
public ApkUpdater(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need to be public?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely not! Good catch.

@lfkellogg lfkellogg merged commit ae0932d into fad/in-app-feedback Jan 9, 2023
@lfkellogg lfkellogg deleted the lk/fad-dagger branch January 9, 2023 15:28
Comment on lines +58 to +62
implementation 'javax.inject:javax.inject:1'
vendor ('com.google.dagger:dagger:2.43.2') {
exclude group: "javax.inject", module: "javax.inject"
}
annotationProcessor 'com.google.dagger:dagger-compiler:2.43.2'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please migrate to:

  implementation libs.javax.inject
  vendor (libs.dagger) {
    exclude group: "javax.inject", module: "javax.inject"
  }
  annotationProcessor libs.dagger.compiler

This will ensure all sdks are aligned on the same version

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in followup: #4593

@Lightweight private final Executor lightweightExecutor;

@Inject
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this class, and all other @Inject classes, please ensure that @Singleton is not required and it's ok to have different instances injected in different injection sites.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, fixed in followup: #4593

@firebase firebase locked and limited conversation to collaborators Feb 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants