AboutLibraries
AboutLibraries copied to clipboard
Configuration caching failure in Android projects
About this issue
I've found an issue with caching in AboutLibrary
plugin, a pretty serious I think.
Details
The recipe for disaster:
- create an Android project
- add this plugin to it, without any additional configuration (note that
registerAndroidTasks
is set totrue
in this case) - create at least one additional Android module, and make it a
debugImplementation
dependency in the main module - make sure to include some third-party dependencies in both modules (like AppCompat, nothing fancy)
- add those lines to the
gradle.properties
file:org.gradle.configureondemand=true
,org.gradle.unsafe.configuration-cache=true
- try to execute
./gradlew :app:assembleRelease
Expected outcome:
- a successful build
Actual outcome:
FAILURE: Build failed with an exception.
* What went wrong:
An exception occurred applying plugin request [id: 'com.android.library']
> Failed to apply plugin 'com.android.internal.library'.
> Gradle#projectsEvaluated(Action) on build 'AboutLibrariesTestApp' cannot be executed in the current context.
So, in other words: assembling release application is broken.
I've prepared a sample application with this issue, reduced to the bare minimum needed to reproduce it: https://github.com/ILikeYourHat/AboutLibrariesTestApp
Checklist
- [x] Searched for similar issues
- [x] Checked out the sample application
- [x] Read the README
- [x] Checked out the CHANGELOG
- [ ] Read the MIGRATION GUIDE