Hi,
I hope this is not a silly question. But I’ve been rewriting our project to use version catalog (using libs.versions.toml file) and I’ve noticed that this normally works:
implementation libs.somelib
But with platform, I need to call a get() method. Otherwise, I get an error:
Oh, thanks a lot for pointing me in the right direction. I found the culprit. We also have an ‘exclude’. And when I pass that as well I need to use get().
Starting a Gradle Daemon, 2 incompatible and 1 stopped Daemons could not be reused, use --status for details
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\devel\eurofunk\tmp\demo\demo\build.gradle' line: 15
* What went wrong:
A problem occurred evaluating root project 'demo'.
> Cannot convert the provided notation to an object of type Dependency: map(valueof(DependencyValueSource)).
The following types/formats are supported:
- String or CharSequence values, for example 'org.gradle:gradle-core:1.0'.
- Maps, for example [group: 'org.gradle', name: 'gradle-core', version: '1.0'].
- FileCollections, for example files('some.jar', 'someOther.jar').
- Projects, for example project(':some:project:path').
- ClassPathNotation, for example gradleApi().
Comprehensive documentation on dependency notations is available in DSL reference for DependencyHandler type.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 9s
<-------------> 0% WAITING
> IDLE