Runtime included in stdlib


#1

Am I right that the runtime is included in the stdlib? So I only have to
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
and when using shadowing I only have to
shadow "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"? The runtime seems to be a transitive dependency. I can’t read that from the docs.


#2

kotlin-stdlib will bring in everything, but it is not guaranteed not to use transitive dependencies (usting kotlin-stdlib-jre7 or kotlin-stdlib-jre8 certainly does). If you want to see what to include in a shadow it may be interesting to use the application plugin to gradle and see what is put in the application zip.


#3

Since Kotlin 1.1 kotlin-stdlib includes the runtime. And it still has a dependency on org.jetbrains:annotations.

I suggest you to inspect the dependency graph (gradle dependencies), to decide what do you want to shadow.


#4

Thanks!