Hey! First of all, thank you very much for the plu...
# refreshversions
r
Hey! First of all, thank you very much for the plugin, it's really the most fun and convenient way to manage dependency versions as of yet on my opinion. I have two jitpack-only libraries in the project.
./gradlew refreshVersions
currently fails for one of them. Looking through the logs I see that
maven-metadata.xml
is available for the chthai64/SwipeRevealLayout, but for amulyakhare/TextDrawable JitPack just returns 404. Do I understand correctly that this is strictly an issue with JitPack and has nothing to do with the plugin? If so, is there a way to ignore speicifc artifact when refreshing versions, but keep using version resolution for it (so I don't have to switch from
_
to pinning the version in
build.gradle
for this "broken" package)?
b
Do I understand correctly that this is strictly an issue with JitPack
Yes
is there a way to ignore speicifc artifact when refreshing versions, but keep using version resolution for it
You can keep version in versions.properties (and manage it manually) and fetch it in dependencies block using
versionFor("<http://version.my|version.my>.unique.version.key")
l
Hello, it looks like that library was never really published to jitpack, but to a bintray repo instead. One solution would be to make a fork and actually publish it for jitpack.
r
@Big Chungus nice, thank you. That'll do! @louiscad you're right, that's probably the caveat here. I just referenced specific commit when Bintray went down, and I don't really expect any version updates for it -- we'll just migrate away from it at some point. For the time being I just wanted some unification, as it's still referenced in several modules, and
versionFor
instead of
_
sounds like a fine workaround I didn't think about.
b
versionFor is a godsend! I use it all the time to manage my npm versions for kjs and ktlint version for the plugin (since default bundled version is often outdated)
e
is there a way to ignore speicifc artifact when refreshing versions, but keep using version resolution for it
Another option could be adding
Copy code
refreshVersions {
  rejectVersionIf { moduleId.name == "com.package"  }  // Or perhaps in combination with moduleId.group
}
to
settings.gradle.kts
, perhaps..
r
Didn't look at implementation, but I doubt this would work in my case. This filters versions one by one even if the lambda rejects all versions for the artifact, and I had an issue with resolving the artifact even before getting to filtering. Though in other situations I would consider this way as it keeps dependency declaration in
build.gradle
intact. Thank you foe the suggestion anyway!
­čĹŹ 1