META-INF/services in JAR with Gradle
You place META-INF/services/org.example.plugins.PluginService in src/main/java, but it’s not a source, it’s a resource file, therefore it should be placed in resources folder according to Maven directory layout convention, that is src/main/resources/META-INF/services/org.example.plugins.PluginService In this case everything should work out of the box.