Kotlin and OSGi
Kotlin and OSGi
To enable Kotlin OSGi support you need to include kotlin-osgi-bundle
instead of regular Kotlin libraries. It is recommended to remove kotlin-runtime
, kotlin-stdlib
and kotlin-reflect
dependencies as kotlin-osgi-bundle
already contains all of them. You also should pay attention in case when external Kotlin libraries are included. Most regular Kotlin dependencies are not OSGi-ready, so you shouldn't use them and should remove them from your project.
Maven
To include the Kotlin OSGi bundle to a Maven project:
<dependencies> <dependency> <groupId>org.jetbrains.kotlin</groupId> <artifactId>kotlin-osgi-bundle</artifactId> <version>${kotlin.version}</version> </dependency> </dependencies>
To exclude