stevesaliman / gradle-properties-plugin

Gradle plugin to simplify loading project properties from external environment specific files
Apache License 2.0
192 stars 28 forks source link

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

Open lyonlai opened 4 years ago

lyonlai commented 4 years ago

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.

stevesaliman commented 4 years ago

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?