conditional dependencies in gradle

I am working on multi-project build using gradle. I have an requirement pick dependencies on condition of property injected at commandline . Scenario-1: dependencies { if( !