Does `kotlin-stdlib-jre8` always include `kotlin-s...
# announcements
r
Does
kotlin-stdlib-jre8
always include
kotlin-stdlib-jre7
, and if so, does it do any harm to use
excludes
to leave out
jre7
from the
runtimeClasspath
?
Copy code
runtimeClasspath - Runtime classpath of source set 'main'.
+--- org.slf4j:slf4j-api:1.7.22
+--- org.jetbrains.kotlin:kotlin-stdlib-jre8:1.1.4
|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.1.4
|    |    \--- org.jetbrains:annotations:13.0
|    \--- org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.4
|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.1.4 (*)
r
Why do you need to remove it?
r
Just finding ways to slim down the jar file.
And it also puzzles me that jre8 includes jre7.
r
Why does it puzzle you? Java 8 includes all the changes to Java 7
r
Exactly
so why include both if jre8 includes jre7?
r
The
kotlin-stdlib-jreN
does not include the the JRE, just some helpful methods to interface with the changes. If they already have all the changes for Java 7 in the jre7 library, why would they write them all again when they can just include them with the jre8 library?
r
Thanks, that explains it. I knew it wasn’t the JRE itself, but was just confused. I assumed that just like the JRE, the
kotlin-stdlib-jreN
would “look” the same. For example, when I install the
jre8
, I don’t need to also install the
jre7
. But your explanation clarifies my confusion.
👍 2