mikepenz/AboutLibraries

Configuration caching failure in Android projects

ILikeYourHat opened this issue · 1 comments

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 to true 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 thegradle.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

Thank you very much for the report @ILikeYourHat