Gradle 7.2 Version Catalog Plugins gives an IDE error "'val Project.libs: LibrariesForLibs' can't be called in this context by implicit receiver. Use the explicit one if necessary" #18107
Labels
a:bug
closed:duplicate
Duplicated or superseeded by another issue
in:dependency-version-catalog
in:kotlin-dsl
Expected Behavior
Plugin libraries defined in a Version Catalog file should be accessible in the
plugins
block with no issuesCurrent Behavior
Plugin libraries are accessible in the
plugins
block (and the buildscript builds fine), but a red squiggly line can be seen on thelibs
part in the IDE with the error:(Text version:)
This Google IssueTracker comment about the same issue points out that:
However, this syntax doesn't appear to work no matter what I've tried.
Using either version of the classes that the IDE suggests:
Gives another error:
Context
Trying to update defined build plugins to use the new Version Catalogs API for easier version management
Steps to Reproduce
gradle/lib.versions.toml
app/build.gradle.kts
(GitHub project)
Your Environment
IDE
Android Studio Bumblebee | 2021.1.1 Canary 9
Build #AI-211.7628.21.2111.7653804, built on August 19, 2021
Runtime version: 11.0.10+0-b96-7249189 amd64
VM: OpenJDK 64-Bit Server VM by Oracle Corporation
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 1280M
Cores: 8
Registry: external.system.auto.import.disabled=true, documentation.show.toolbar=true
Non-Bundled Plugins: org.toml.lang (0.2.153.4056-211), org.jetbrains.kotlin (211-1.5.21-release-328-AS7442.40)
Build scan
URL: https://gradle.com/s/ostfhaxrfyjna
The text was updated successfully, but these errors were encountered: