0.1.0 - First release
sweet-spi is available on Maven Central!
sweet-spi consists of three parts:
- multiplatform runtime with a tiny public API and all 24 supported targets
- KSP processor which generates a bit of glue code for each target
- Gradle Plugin which simplifies setup of KSP and runtime
Features
- Easy-to-use SPI with just two annotations and two functions
- No additional setup is necessary for consumers, except for depending on your library, of course
- Automatic loading of service providers from any module or library which is available at runtime
- Automatic discovery of services based on the declaration type
- Support for providing services via objects, properties, and no-arg functions
- Support tor providing multiple services via one declaration
- Ability to explicitly specify which services should be provided by the specific service provider
- Strict identification about which interfaces could be loaded
- Supports both kotlin-jvm and kotlin-multiplatform plugins
Documentation can be found: