Use Java 17 or newer
sdk use java 21-zulu
Local build:
./gradlew clean build publishToMavenLocal
Test it in a gradle project using the correct version. In order for Gradle to pick up the plugin from the local Maven
repository, add this first in the gradle setting file setting.gradle
pluginManagement {
repositories {
mavenLocal()
gradlePluginPortal()
}
}
To publish the plugin to Gradle
-
Update the version number
-
Execute the command
./gradlew publishPlugins
Ref: https://guides.gradle.org/publishing-plugins-to-gradle-plugin-portal/