Android Jetpack Baseline Profile with Dynamic Feature Modules

443 Views Asked by At

I'm trying to implement baseline profile with macrobenchmark to speed up release build.

I based my implementation on https://developer.android.com/studio/profile/baselineprofiles

and this commit of their jetSnack demo application https://github.com/android/compose-samples/commit/cadc6d189dc841b0935684e9fb07c396eacedda7

however, my project uses dynamic feature modules, and every time I run the application it crashes on exception

java.util.ServiceConfigurationError: mypackage.feature.entry.EntryFeature: Provider mypackage.feature.entry.di.EntryFeatureImpl not found

I added -dontobfuscate into proguard rules as per commits above, yet the features aren't loading, if I just run release version it works fine, do I need to initialize them somehow manually ? Does anyone have any experience with this ? Official documentation on DFM is particularly poor on this one, thanks.

Sample code of failing benchmark: https://github.com/Hessesian/android-dynamic-code-loading

0

There are 0 best solutions below