didi / booster

🚀Optimizer for mobile applications
https://booster.johnsonlee.io
Apache License 2.0
4.9k stars 579 forks source link

如何扫描dynamic-feature #438

Closed zhuangdapao closed 11 months ago

zhuangdapao commented 1 year ago

请教大佬基于4.16.3如何扫描到dynamic-feature里的类。

demo使用https://github.com/android/codelab-android-dynamic-features/tree/master

目前在buildSrc里创建 代码如下

image

打印的结果不包含feature模块里的类,看boosterTransform里需要满足 parameter.plugins.hasPlugin("com.android.dynamic-feature") 但在app里应用插件不包含,而在dynamic模块使用booster插件则会报错 variant.getApplicationId() is not supported by dynamic-feature plugins as it cannot handle delayed setting of the application ID. Please use getApplicationIdTextResource() instead

agp版本为7.0.4 命令./gradlew clean :app:bundleRelease