📣
For everyone that wants to try out 1.4.0-dev-35, but has issues migrating
• I pushed a pull request to the kotlin-examples repository, updating
all examples to the new APIs
(PULL REQUEST)
Common Issues:
• Make sure to use the new Provider/Property API:
jdkVersion = 8
->
jdkVersion.set(8)
• Any path of type
String
is now represented as
<http://java.io|java.io>.File
• Any collection of files/directories is now represented as Gradles
ConfigurableFileCollection
• Make sure (especially in Android Projects) to configure Dokka tasks lazy:
tasks.withType<DokkaTask>() { // config }
->
tasks.withType<DokkaTask>().configureEach { }
,
tasks.getByName
->
tasks.named
,etc. Good read
https://docs.gradle.org/current/userguide/task_configuration_avoidance.html
• Note: MPP projects will have all source sets automatically configured. No need for
register
yourself!
• Tip: Use
./gradlew --stacktrace
to get better error messages of what is wrong. I noticed, that the short error message for Groovy scripts is not useful at all
And as always: Feel free to drop me a DM at any time you encounter an issue ☺️
Have fun, folks. Enjoy Kotlin 1.4.0 ☺️ 🎊