https://kotlinlang.org logo
#announcements
Title
# announcements
r

Robert Jaros

05/12/2020, 11:18 AM
I'm trying to use
1.4-M1
and I'm getting this warning from gradle:
Copy code
w: Runtime JAR files in the classpath should have the same version. These files were found in the classpath:
    /opt/rjaros/.gradle/wrapper/dists/gradle-6.3-all/b4awcolw9l59x95tu1obfh9i8/gradle-6.3/lib/kotlin-stdlib-1.3.70.jar (version 1.3)
...
    /opt/rjaros/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.4-M1/1bd127486717887634cc406a5651bd6090f11678/kotlin-stdlib-1.4-M1.jar (version 1.4)
w: Consider providing an explicit dependency on kotlin-reflect 1.4 to prevent strange errors
w: Some runtime JAR files in the classpath have an incompatible version. Consider removing them from the classpath
Should I ignore this or somehow fix this?
c

christophsturm

05/12/2020, 12:18 PM
you can force all the kotlin libs on the same version with something like this: `
Copy code
implementation(enforcedPlatform("org.jetbrains.kotlin:kotlin-bom:$kotlinVersion"))
or run
./gradlew dependencies
to see what dependency pulls in the old version
m

Mike

05/12/2020, 12:46 PM
Use
dependencyInsight
to quickly see what is bringing in a dependency. Very powerful tool that many don't seem to be aware of.
./gradlew dI --dependency kotlin-reflection
will show you what is bringing in kotlin-reflection as a dependency on the 'main' configuration.
dI
is short for
dependencyInsight
. Yes, Gradle supports 'aliasing' out of the box. If you want a different configuration, there's another parameter called
--configuration
. And what you put for the dependency is a
dependency contains x
.
🤩 1
c

christophsturm

05/12/2020, 12:49 PM
you can also combine it with
--scan
to get a web view
2 Views