This message was deleted.
# community-support
s
This message was deleted.
s
most recent version of library that was in mavenLocal not the version that is currently there.
Can you elaborate on this with an example? I have a similar workflow and have never had to use --refresh-dependencies
e
For example, if I add a log line to the library and run
gradle publishToMavenLocal
then sync the consumer with Android Studio and run the app, the log line isn't printed. If I
--refresh-dependencies
then sync the consumer with Android Studio and run the app, the log line is printed.
s
Any chance this could be due to the build-cache? Does
--no-build-cache
or
--rerun-tasks
given you the same result as using
--refresh-dependencies
. if this is android specific, then it could also be because an separate cache of
jettified-*
artifacts are created for an external dep which are then used in the app.
a
Have you told Gradle that the dependency has a changing version? You can do this by either changing your library to have a version that ends in
-SNAPSHOT
, or in the consumer with setChanging():
Copy code
dependencies {
  implementation("blah:foo:1.2.3") {
    isChanging = true
  }
}
more info: https://docs.gradle.org/current/userguide/dynamic_versions.html
my last resort is either blowing away
.m2
then refreshing dependencies then
publishToMavenLocal
then refresh dependencies or changing the artifact version
you could speed this up by publishing to a local directory, instead of Maven Local. Then you would only have to delete the local directory
e
Could be the build cache, I'll try that next time it comes up. I have jetifier disabled. I am using a SNAPSHOT version