gradle
gradle copied to clipboard
Exception occurred applying catalog setting plugin (with composite build)
I developed a catolog setting plugin and after adding this in the consumer project I get an exception
Expected Behavior
There should be no exception
Current Behavior
An exception occurred applying plugin request [id: 'org.jetbrains.kotlin.jvm', version: '1.7.10'] Failed to apply plugin 'org.jetbrains.kotlin.jvm'. Cannot add extension with name 'kotlin', as there is an extension already registered with that name.
Context
This blocks me from using the plugin. I was trying to use the catalog feature and testing first locally via a composite build.
Steps to Reproduce
- clone consumer at the
catalogbranch - clone plugin
- be sure to have the projects root at the same level for the composite build to work
- sync and you should get the mentioned exception
Your Environment
- Ubuntu 22.04.1 LTS
- IntelliJ IDEA 2022.2 (Ultimate Edition) Build #IU-222.3345.118, built on July 26, 2022 Runtime version: 17.0.3+7-b469.32 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Linux 5.15.0-43-generic Kotlin: 222-1.7.10-release-334-IJ3345.118
- Gradle 7.5
You are most likely generating a catalog with the name kotlin which conflicts with the extensions from the Kotlin plugin. There should be a deprecation warning in your build about catalog names not ending in Lib.