libs.versions.toml: Lib alias starting with a lowercase letter followed by an uppercase letter don't work when referenced later #28928
Labels
a:bug
has:workaround
Indicates that the issue has a workaround
in:dependency-version-catalog
re:comprehensibility
reasonable errors and warnings, clear dsl, mental overload
Current Behavior
Libraries (and bundles) declared with a single lowercase letter followed by an uppercase letter don't work. When referencing the lib Gradle can't find it when you build.
An observation/"workaround": If you reference the lib with an uppercase letter instead (without changing the definition to start with an uppercase letter) it works.
Expected Behavior
Using a lowercase letter as the first letter and an uppercase letter as the second letter in a variable name when declaring a library in the libs.versions.toml and referencing it later with the same name should work.
Context (optional)
Some of the libs I use start with a lowercase letter followed by an uppercase one. I wanted to do the same when declaring aliases for them in my libs.versions.toml file.
Steps to Reproduce
Declare a library alias in the libs.versions.toml file that starts with a single lower-case letter that is followed by an upper-case letter. E.g.
mLib
Use this library in your build.gradle file
E.g.
testImplementation libs.mLib
Build the project. It gives an error like
Could not get unknown property 'mLib' for extension 'libs' of type org.gradle.accessors.dm.LibrariesForLibs.
Gradle version
8.7
Build scan URL (optional)
No response
Your Environment (optional)
Gradle wrapper 8.7,
Java 17 Temurin,
Ubuntu 22.04.4 LTS
The text was updated successfully, but these errors were encountered: