kotlin-playground icon indicating copy to clipboard operation
kotlin-playground copied to clipboard

how to use external libraries

Open christian-draeger opened this issue 4 years ago • 3 comments

is it possible to use libraries inside of playground? i am maintaining an open source kotlin library (currently for JVM, KotlinJS is planed) and think it would be pretty nice to have prepared examples / code snippets on how to use the library via playground in the docs. furthermore it would be really handy whilst trying out other libraries in general. i couldn't find something about this topic in the readme. is this supported in any way (or even planed or let's say a valid feature request) or would i need to run my own fork of kotlin-compiler-server and add my library their (which would lead me to a bunch of drawbacks in comparison to have it as an upstream feature).

christian-draeger avatar Apr 18 '21 18:04 christian-draeger

Hello, @christian-draeger.

Unfortunately, you have to fork kotlin-compiler-server and add your library as a dependency.

You can host your own server or use AWS lambdas or I recommend you to try the Kotless project to deploy your server.

If you need any help just ping me.

AlexanderPrendota avatar Apr 19 '21 08:04 AlexanderPrendota

Can you add kotlinx libs?

TheHett avatar Nov 21 '23 12:11 TheHett