Reputation: 2309
I develop android library and I have sample application for this library inside one project. The library is obfuscated before publishing.
If I run ./gradlew :library:assemble
- then proguard executed successfully.
But if I run ./gradlew :app:assemble
- then proguard for the library not executed and even 'aar' isn't created.
It starts with gradle 3.0 android plugin. As I understand it was maded for a faster build, but in my case, it leads to wrong testing process.
Is it possible to force depends on 'aar' from library project without publishing it to an artifactory?
Upvotes: 0
Views: 385
Reputation: 6200
You are probably using the Android gradle plugin 3.0+. This feature has been removed for a little speed gain, see the Migration Guide, Local dependencies.
You can create your own gradle tasks that build the obfuscated library, then copy the resulting aar to the app directory and then build the app. Or you use an older version of the plugin (e.g. 2.3.3), or complain to Google about it and hope that they change their opinion.
Upvotes: 1