-
-
Notifications
You must be signed in to change notification settings - Fork 108
Description
I opened a small PR to demo how we could simplify configuring the rules
#581
My vue (stolen from the Perl community) is that:
Simple things should be easy ; complex things should be possible
Rules files do the second half right, the first half not so much.
We have issues like #575 that show people would like for a way to avoid/simplify need for rules files.
I did a GitHub code search on refreshVerisons.extraArtifactVersionKeyRules
see here and only 4 people have configured one during the last month.
If you look at the rules we have, some are powerful like in AndroidX
but most rules are super simple and could be modeled this way:
refreshVersions {
extraVersionRules(
PrefixRule("koin", "io.insert-koin", "koin"),
PrefixRule("ktor", "io.ktor", null),
)
}
That would not change anything fundamental for refreshVersions, the PrefixRule
would simply be converted to a rules file in the background.
PrefixRule("koin", "io.insert-koin", "koin").toRawRules().shouldBe """
io.insert-koin:koin(-*)
^^^^
""")
(I started to write this code already, it works)
Things to consider
- syntax for Groovy users who don't have named arguments?