Gradle not picking up latest local Maven changes

Hi,

I have two Android projects – my main project and a second project containing only a library. I’m using the maven-publish plugin in the library package and am running gradlew publishToMavenLocal after making changes. However, no matter what I do, I can’t get these changes to appear in my other project, which is using mavenLocal(). The library in question is only available locally – if I remove mavenLocal(), it fails to resolve.

  • I’ve explored the %UserProfile%\.m2\repository directory and expanded out the .jar file I found there. Using the IntelliJ decompiler thing I’ve observed that it has the correct .class files.
  • The app\build\intermediates\exploded-aar\ directory in my application has the old artifact.
  • I’ve tried deleting the %UserProfile%\.gradle\caches directory to no avail, though there were a few JARs that were still locked.
  • I’ve tried gradlew --refresh-dependencies clean build, no help.
  • I’ve tried adding this, no help:
allprojects {
    configurations.all {
        resolutionStrategy.cacheChangingModulesFor 0, 'hours'
    }
}

So basically, the library project itself is up to date. The local maven repository is up to date. But I can’t make Gradle nor Android Studio actually pick up the new artifacts.