littlerobots / version-catalog-update-plugin

Gradle plugin for updating a project version catalog
Apache License 2.0
565 stars 23 forks source link

Update catalog from remote repository ? #90

Closed belkevglaz closed 2 years ago

belkevglaz commented 2 years ago

Hi

I use catalog from my remote repository and include configuration like this into settings.gradle:

dependencyResolutionManagement {
    versionCatalogs {
        create("libs") {
            from("com.example:catalog:1.+")
        }

        repositories {
            maven {
                url 'https://artifactory.example.com/artifactory/repo/'
            }
        }
    }
}

Is it possible to update catalog from repo instead of *.toml file ? Unfortunately, -SNAPSHOT suffix doesn't work for versionCatalogs. Thanks.

hvisser commented 2 years ago

No that wouldn't work as the catalog is hosted in a repository, and you can't change it in that repository.

You could however use the plugin the update the toml file that you publish, though you would need to do some special setup, #65 has some ideas around this.

belkevglaz commented 2 years ago

Thanks for reply, @hvisser When I update versions in toml file in my catalog project and re-publish, that's does not matter. Project that use catalog can't update (re-download) new version of toml even if it is snapshot. I need explicitly remove catalog dependency from gradle cache to get edition of the same version of catalog.

hvisser commented 2 years ago

If the issue is that the dependency isn't updating for you, then that might be a Gradle issue, not something related to this plugin, since that is a core Gradle feature.

belkevglaz commented 2 years ago

Yeah, I guess. I thought that maybe you know how to solve this issue. So, any way, thanks.