META-INF/services in JAR with Gradle

后端 未结 5 1883
予麋鹿
予麋鹿 2020-12-14 07:06

I wanted to build a plugin module that can be loaded with a ServiceLoader. This requires adding a file to the META-INF/services directory, that is named after t

5条回答
  •  没有蜡笔的小新
    2020-12-14 07:35

    Hi Can try this: https://plugins.gradle.org/plugin/com.github.harbby.gradle.serviceloader

    Usage

    serviceLoader {
        serviceInterface 'org.example.plugins.PluginService'
        serviceInterface 'org.example.plugins.PluginService2'
    }
    

提交回复
热议问题