kordamp / kordamp-gradle-plugins

A collection of Gradle plugins
https://kordamp.org/kordamp-gradle-plugins/
Apache License 2.0
138 stars 25 forks source link

Gradle 7.0 TYPESAFE_PROJECT_ACCESSORS feature is not compatible with this plugin #467

Closed DVDAndroid closed 3 years ago

DVDAndroid commented 3 years ago

I got an exception when enabling TYPESAFE_PROJECT_ACCESSORS feature preview in my settings.gradle.kts.

build.gradle.kts

plugins {
    id("org.kordamp.gradle.jacoco") version "0.44.0"
}

settings.gradle.kts

enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")

gradlew build

An exception occurred applying plugin request [id: 'org.kordamp.gradle.jacoco', version: '0.44.0']
> Failed to apply plugin class 'org.kordamp.gradle.plugin.base.BasePlugin'.
   > Cannot add extension with name 'projects', as there is an extension already registered with that name.

https://docs.gradle.org/7.0/release-notes.html

Is there any workaround or I am doing something wrong?

aalmiray commented 3 years ago

The Kordamp plugin suite has yet to be vetted to work with Gradle 7. There are several breaking changes in this major release that it may take a while before all issues are resolved.

aalmiray commented 3 years ago

Requires renaming the projects extension registered by the org.kordamp.gradle.base plugin

https://github.com/kordamp/kordamp-gradle-plugins/blob/master/plugins/base-gradle-plugin/src/main/groovy/org/kordamp/gradle/plugin/base/BasePlugin.groovy#L325