Skip to content

App Size Metrics: add support for Android Universal APKs#365

Merged
AliSoftware merged 10 commits intotrunkfrom
app-size-metrics+android-universal-apk
May 31, 2022
Merged

App Size Metrics: add support for Android Universal APKs#365
AliSoftware merged 10 commits intotrunkfrom
app-size-metrics+android-universal-apk

Conversation

@AliSoftware
Copy link
Contributor

@AliSoftware AliSoftware commented May 19, 2022

This work is part of the App Metrics project [ref: paaHJt-37V-p2] and implements the fastlane actions necessary to send iOS and Android app size metrics [ref: paaHJt-3od-p2#comment-6098] to the App Metrics server.

What

This builds on top of #364 and adds support for including "Universal APKs" metrics for Android.

(I suggest to get #364 merged first before this #365, to keep the diffs of each PR separate and easier to review in isolation)

Why

This will mostly be useful if/when we want to send app size metrics for Installable Builds, which are build using ./gradlew assemble<app>JalapenoDebug and thus produce a single, Universal .apk — as opposed to an .aab bundle like we do for beta and release builds that we upload to the Play Store)

How

  • New universal_apk_path parameter for the android_send_app_size_metrics action
  • The aab_path parameter is no longer mandatory, to allow the case where we only pass the universal APK but no .aab. It's still required to have at least one of universal_apk_path or aab_path (if not both) though.
  • Changed a key used in the Android metrics payload to the more explicit "Optimized File Size" for R8-optimized APKs (i.e. file-size as reported by apkanalyzer, as opposed to the .apk file size on disk).
    • Hopefully that will help differentiate in particular the Universal APK's file size on disk vs the Universal APK's optimized file size ("optimized" as in "after R8 optimizations and according to apkanalyzer", as opposed to "optimized for a specific device architecture", that latter being instead indicated by the split: metadata)
  • Moved the keys used in each metrics payload into constants at the top of the action, making them easier to spot and change

To Test

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants