Your source is likely in the incorrect location for what you’re trying to do. If you’re trying to publish a plugin that you can use in other projects, your plugin code should be what’s in src/main/groovy
and src/main/java
. The buildSrc/src/main/groovy
and buildSrc/src/main/java
are for plugins that you want to consume in the same project, not publish for use in other projects.
See https://docs.gradle.org/current/userguide/custom_plugins.html#sec:packaging_a_plugin for details.