Open Tapchicoma opened 2 years ago
Workaround is to use buildscript.dependencies { classpath ... } }
approach
Your reproducer mentions adding repositories to the project, but these will not impact where the plugin is searched for. As you removed the searched locations from your error, can you double check that if you declare the repositories in settings it works?
missed in the code snippet, just add following repositories into pluginManagement
block in settings.gradle.kts
:
repositories {
mavenLocal()
gradlePluginPortal()
}
Hi! Facing a similar issue when trying to use useModule
with the Kotlin plugin 1.7-Beta, but I don't understand the suggested workaround.
Sorry for the late reply.
Thank you for providing a valid report.
The issue is in the backlog of the relevant team, but the existence of a workaround makes it non-critical, so it might take a while before a fix is made.
Expected Behavior
I could use following approach in
settings.gradle
for plugin published with Gradle variants:Gradle is working correctly If plugin is published without variants.
Current Behavior
Gradle fails with following message:
Context
Users could not access Gradle plugins, whose markers are not published to the Gradle plugin portal, but plugin uses Gradle plugin variants feature. This is affecting Kotlin 1.7.0+ versions as well.
Steps to Reproduce
./gradlew install
task in the Kotlin repobuild.gradle.kts
file andsettings.gradle.kts
from above:repositories { mavenLocal() mavenCentral() }