How can I publish to maven the plugin defined at buildSrc?


I have a Gradle project with Java/Scala code for an user library. To build this library I am using a custom gradle plugin that i created at buildSrc.

I would like to publish the buildSrc plugin to maven so it can be used in additional repos.

However, I want to have plugin and library for users at same repo. How can I achieve it? The plugin jar always get named as buildSrc.jar. I would like to configure the name for it.

Thanks in advance!


Rename buildSrc folder as plugin folder. Update root project settings.gradle.kts and add includeBuild("plugin").

Inside of plugin/build/gradle.kts configure tasks.jar and gradlePlugin block. Apply base project build.gradle.kts to share same version, group…