Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Sharing experience of adapting AppBundle on LIN...

Sharing experience of adapting AppBundle on LINE Android CI.

LINE DevDay 2020

November 26, 2020
Tweet

More Decks by LINE DevDay 2020

Other Decks in Technology

Transcript

  1. Agenda › AppBundle › Universal APK › LINE Android CI

    Systems › AGP bugs related Aab › How to solve these issues
  2. AppBundle Upload format on Google Play Store › Google Play

    converts optimized “Split Apk” for devices by configuration and dynamic features › Cannot installable on devices
  3. AppBundle › Recommended to use latest AGP version Requires Android

    Gradle Plugin 3.2 or higher Upload format on Google Play Store › Google Play converts optimized “Split Apk” for devices by configuration and dynamic features › Cannot installable on devices
  4. AppBundle › Recommended to use latest AGP version Requires Android

    Gradle Plugin 3.2 or higher Inconvenient use for in-house distribution › LINE Android team uses “Universal APK” to distribute in-house Upload format on Google Play Store › Google Play converts optimized “Split Apk” for devices by configuration and dynamic features › Cannot installable on devices
  5. Universal APK › Google Play is no longer required for

    distribution. › Can distribute installable with single file. Pros
  6. Universal APK › Google Play is no longer required for

    distribution. › Can distribute installable with single file. Pros Cons › Cannot determine real distribution size. › Minor settings can be differ with real distribution › ABI › Compression Level
  7. Universal APK › Google Play is no longer required for

    distribution. › Can distribute installable with single file. Pros Cons › Cannot determine real distribution size. › Minor settings can be differ with real distribution › ABI › Compression Level How to build universal apk (without bundletool) › $ ./gradlew :app:packageDebugUniversalApk › $ ls app/build/outputs/universal_apk/debug › app-debug-universal.apk
  8. LINE Android CI Systems › App packaging › Deploy Universal

    Apk on In-House repository for Pre-QA, QA team › Deploy AppBundle on Google Play for Dogfooding, Alpha and Production Release Pipeline Pull Request Checkers › App packaging : Universal App, AppBundle › UnitTest based Robolectric › Code formatter / Lint Checker › Etc…
  9. Changes of LINE Android CI System 1BDLBHJOH 6OJU5FTU -JOU "QL

    BQQBTTFNCMF%FCVH BQQUFTU%FCVH6OJU5FTU BQQMJOU%FCVH
  10. Changes of LINE Android CI System 1BDLBHJOH 6OJU5FTU -JOU "QL

    BQQBTTFNCMF%FCVH BQQUFTU%FCVH6OJU5FTU BQQMJOU%FCVH "QQ#VOEMF BQQCVOEMF%FCVH BQQQBDLBHF%FCVH6OJWFSTBM"QL BQQUFTU%FCVH6OJU5FTU GFBUVSFUFTU%FCVH6OJU5FTU GFBUVSFUFTU%FCVH6OJU5FTU ʜ BQQMJOU%FCVH TJODF"(1
  11. Issues related with Universal App > Task :app:packageDebugUniversalApk FAILED Error:

    Program type already present: $r8$backportedMethods$utility$Long$1$hashCode › https://issuetracker.google.com/issues/146265847 AGP 3.6 AGP 3.4, 3.5 > Task :app:packageDebugUniversalApk FAILED Error: Program type already present: $r8$java8methods$utility$Long$hashCode$IJ › https://issuetracker.google.com/issues/139993729
  12. Issues related with Universal App > Task :app:packageDebugUniversalApk FAILED Error:

    Program type already present: $r8$backportedMethods$utility$Long$1$hashCode › https://issuetracker.google.com/issues/146265847 AGP 3.6 AGP 3.4, 3.5 > Task :app:packageDebugUniversalApk FAILED Error: Program type already present: $r8$java8methods$utility$Long$hashCode$IJ › https://issuetracker.google.com/issues/139993729
  13. Issues related with Universal App > Task :app:packageDebugUniversalApk FAILED Error:

    Program type already present: $r8$backportedMethods$utility$Long$1$hashCode › https://issuetracker.google.com/issues/146265847 AGP 3.6 AGP 3.4, 3.5 > Task :app:packageDebugUniversalApk FAILED Error: Program type already present: $r8$java8methods$utility$Long$hashCode$IJ › https://issuetracker.google.com/issues/139993729
  14. Issues related with UnitTest AGP 3.2 ~ AGP 4.0 ›

    Cannot perform robolectric tests for Dynamic Feature by ClassLoader failure > Task :dynamicfeature:testDebugUnitTest FAILED com.bugexample.dynamicfeature.FeatureModuleDataHelperTest > Fails at runtime with NoClassDefFoundError when running testDebugUnitTest FAILED java.lang.NoClassDefFoundError at FeatureModuleDataHelperTest.kt:11 Caused by: java.lang.ClassNotFoundException at FeatureModuleDataHelperTest.kt:11 › https://issuetracker.google.com/issues/123441249
  15. Issues related with UnitTest AGP 3.2 ~ AGP 4.0 ›

    Cannot perform robolectric tests for Dynamic Feature by ClassLoader failure > Task :dynamicfeature:testDebugUnitTest FAILED com.bugexample.dynamicfeature.FeatureModuleDataHelperTest > Fails at runtime with NoClassDefFoundError when running testDebugUnitTest FAILED java.lang.NoClassDefFoundError at FeatureModuleDataHelperTest.kt:11 Caused by: java.lang.ClassNotFoundException at FeatureModuleDataHelperTest.kt:11 › https://issuetracker.google.com/issues/123441249
  16. Conclusion › There are several bugs related with AppBundle in

    build tools. › CI System has a variety of requirements that Google did not expect.
  17. Conclusion › Search your issue on AOSP issue tracker(http://b.android.com), and

    give ⭐ › If there is no issue you have, please submit and share. › There are several bugs related with AppBundle in build tools. › CI System has a variety of requirements that Google did not expect.
  18. Conclusion › Search your issue on AOSP issue tracker(http://b.android.com), and

    give ⭐ › If there is no issue you have, please submit and share. › Collaborate with Googler to fix bugs › Provide MWE(Minimal Working Example) › Also most source codes of AGP are opened, and we can find out the cause of the problem. › There are several bugs related with AppBundle in build tools. › CI System has a variety of requirements that Google did not expect.
  19. See also › References from android developer documentations › About

    Android App Bundles : https://d.android.com/guide/app-bundle › bundletool : https://d.android.com/studio/command-line/bundletool › Best Practices for a modularized app with dynamic features by Leo Chu
  20. See also › References from android developer documentations › About

    Android App Bundles : https://d.android.com/guide/app-bundle › bundletool : https://d.android.com/studio/command-line/bundletool › AOSP Issue tracker › appbundle › Android Gradle Plugin › Best Practices for a modularized app with dynamic features by Leo Chu