Closed maxirosson closed 3 years ago
Hi there! I haven't looked too deep into this code (I found this library just now). Do you think this would be as simple as just parsing each line in the toml file, and referencing the version number value, then performing a lookup to see if it's the latest version?
I think I should refactor DependenciesExtractor & DependenciesUpgrader classes first in order to allow multiple implementations. I will see if I can start with that refactor as the first step
Yes! Nice work! At the moment DependencyBot doesn't support it, making this plugin the only one capable of creating PR's for dependency updates :). When do you think you'll release 3.0?
Oh it looks like I'll have to wait for 3.1.0 for the version support.
I expect to release 3.0 between today and tomorrow. Regarding the [versions] tag support, I don't see that as urgent, because in my opinion doesn't offer any advantage to use that tag if you are going to automatically upgrade your dependencies with the releases hub plugin.
ah gotcha. Thanks for the message back.
If I just delete the version.ref
from each of my dependency, so:
ktor-clientAndroid = { module = "io.ktor:ktor-client-android", version.ref = "ktor" }
becomes
ktor-clientAndroid = { module = "io.ktor:ktor-client-android"}
Would this plugin be smart enough to upgrade it?
You will need to have this string on any file:
"groupId:artifactId:version"
and then configure the dependenciesPaths
extension property to define which files to parse. By default, these files are parsed:
releasesHub {
dependenciesPaths = [
"buildSrc/src/main/kotlin/Libs.kt",
"buildSrc/src/main/kotlin/BuildLibs.kt",
"gradle/libs.versions.toml",
"settings.gradle.kts"
]
}
The basic notation is supported on the libs.versions.toml file:
For example:
[libraries]
groovy-core = "org.codehaus.groovy:groovy:3.0.5"
groovy-json = "org.codehaus.groovy:groovy-json:3.0.5"
groovy-nio = "org.codehaus.groovy:groovy-nio:3.0.5"
https://docs.gradle.org/current/userguide/platforms.html
As part of this issue, the basic notation is supported on the
libs.versions.toml
file:The support for
[versions]
tag will be implemented as part of this issue: https://github.com/dipien/releases-hub-gradle-plugin/issues/17