https://kotlinlang.org logo
Title
b

Bino

03/23/2020, 11:48 AM
Does anyone know, how to publish a custom ktor feature?
c

Casey Brooks

03/23/2020, 3:50 PM
There’s a page in the docs for creating custom Features, it’s pretty straightforward. You’d publish your custom feature as a normal JVM library, and others would include it by
install()
-ing it just like the built-in Features https://ktor.io/advanced/features
b

Bino

03/23/2020, 4:14 PM
@Casey Brooks Okay, so just create a package end publish it to maven or similar? I’ll try
c

Casey Brooks

03/23/2020, 4:17 PM
Yup, exactly! Nothing magical to it, ktor doesn’t use ServiceProviders, DI, or anything like that. Users create and register Features directly in their Modules