gradle-properties-plugin icon indicating copy to clipboard operation
gradle-properties-plugin copied to clipboard

rootProject.ext seems to be overwritten and causing `groovy.lang.MissingPropertyException`

Open lyonlai opened this issue 4 years ago • 1 comments

We've got an android project with gradle sub projects inside a root project. We have some default configuration defined in rootProject.ext and used in the sub project. After applying the plugin the property defined in rootProject.ext seems to be overwritten and ./gradlew build throws groovy.lang.MissingPropertyException defaultConfig on extra properties extension as it does not exist. If we comment out the apply plugin statement everything works fine. Any idea why is this happened? Thanks ahead.

lyonlai avatar Jun 24 '20 14:06 lyonlai

I have a couple of questions that will help me troubleshoot this issue:

  1. Are you applying the plugin to the root project or the child projects?
  2. Where are you setting the rootProject.ext property, and how?
  3. Are you running the build from the root project or one of the sub projects?

stevesaliman avatar Jul 09 '20 19:07 stevesaliman