Adjustment for configureOnDemand bug with projectEvaluated

This fixes an issue when configureOnDemand is used in gradle.properties (this option is used by android studio)