Gradle (Intellij?) not picking up local lib code changes

Hi guys,
Long time Maven user here, taking my first steps with Gradle these days and been struggling with a simple setup that feels like a fairly common use case, so I’m potentially missing something…Here’s what I’ve got:


  • build.gradle
  • settings.gradle
  • a bunch of code referencing MyLib…


  • build.gradle
  • settings.gradle
  • more code…

Now basically what I want is simple - for IntelliJ/Gradle to pick up the local lib codebase when debugging MyApp locally and pull the lib from the remote repo when building MyApp in Production.
I’m able to achieve either one but not both, meaning pulling from the remote repo (using compile 'MyLib.1.0.0-SNAPSHOT' in MyApp’s build.gradle) or working with the local lib code (using compile project('MyLib') in MyApp’s build.gradle

Would appreciate any help here

– G