https://kotlinlang.org logo
#compose
Title
# compose
d

Dan Yang

04/12/2022, 7:32 PM
Do I need to do anything special to make sure compose's baseline profiles are bundled with my APK? This article https://android-developers.googleblog.com/2022/01/improving-app-performance-with-baseline.html says I just have to build with AGP 7.1+ and baseline profiles will be included in my apk under
assets/dexopt/baseline.prof
However, I've done both of those and can't find
assets/dexopt/baseline.prof
when I profile/debug the apk in android studio.
a

Albert Chang

04/13/2022, 12:14 AM
Are you checking a release build? It will only be included in release builds.
d

Dan Yang

04/13/2022, 12:21 AM
Yeah I was checking the release build. However I think I figured it out. I was looking at a universal.apk created from an app bundle via [bundletool(https://developer.android.com/studio/command-line/bundletool) Building straight from Android Studio and checking the
.apk
produced in the build output folder had the baseline prof file.
👍 1
👍🏼 1
t

Tash

04/19/2022, 10:44 PM
@Dan Yang quick question, did you need to add the
androidx.profileinstaller:profileinstaller:1.2.0-alpha01
dependency to your app module for this? Or, was just using AGP 7.1+ enough to have the Compose profiles installed/bundled with app bundles? Thanks! 🙏🏼 🙏🏼
d

Dan Yang

04/19/2022, 10:56 PM
just using AGP 7.1+ was enough
🙏🏼 1
t

Tash

04/20/2022, 12:30 AM
Great, thanks!
4 Views