You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can add a library with or without a version to a catalog.
build.gradle:
catalog {
versionCatalog {
library('lib1', 'my', 'library1').version('1.0.0')
library('lib2', 'my', 'library2').withoutVersion()
}
}
---
toml:
[libraries]
lib1 = {group = "my", name = "library1", version = "1.0.0" }
lib2 = {group = "my", name = "library2", version = "" }
This works fine, and I can use lib1 right away or would need a platform that will provide a version for lib2. I can also override the lib1 version from settings.gradle. Now, I want to add a library without a version (aka needs a platform) and keep an option to set that version manually/override.
I'd expect that this should work in a very similar fashion as in the first case. After all, the version is "" in both cases. But it does not and fails with
Invalid TOML catalog definition:
- Problem: In version catalog libs, alias definition 'lib2-version' is invalid.
Reason: Version for 'lib2-version' must not be empty.
Possible solution: Set a value for 'version'.
Which feels like an artificial restriction.
The text was updated successfully, but these errors were encountered:
I can add a library with or without a version to a catalog.
This works fine, and I can use
lib1
right away or would need a platform that will provide a version forlib2
. I can also override thelib1
version fromsettings.gradle
. Now, I want to add a library without a version (aka needs a platform) and keep an option to set that version manually/override.I'd expect that this should work in a very similar fashion as in the first case. After all, the version is
""
in both cases. But it does not and fails withWhich feels like an artificial restriction.
The text was updated successfully, but these errors were encountered: