Upgrading some builds to Gradle 4.5 that embedd Kotlin 1.2 made the dokka task to fail.
Here are two examples:
Using dokka 0.9.15
java.lang.NoSuchMethodError: kotlin.reflect.jvm.internal.KClassImpl.getMembers(Lkotlin/reflect/jvm/internal/impl/resolve/scopes/MemberScope;ZZZ)Lkotlin/sequences/Sequence;
Using dokka 0.9.16-eap-2
java.lang.NoClassDefFoundError: kotlin/reflect/KClasses
This is apparently due to this breaking change in 1.2:
Another change made to ensure compatibility with the new module system is removing the deprecated declarations in the
kotlin.reflectpackage from thekotlin-reflectlibrary. If you were using them, you need to switch to using the declarations in thekotlin.reflect.fullpackage, which is supported since Kotlin 1.1.
Also had the error with Gradle 4.5 and is gone after downgrading to 4.4.1 again.
Same here as well. This breaks my upgrades to Gradle 4.5.
Here's a test project that demonstrates the error
kotlin-test.zip
I also posted gradle/gradle#4171
So based on outcome of gradle/gradle#4171 this problem is Dokka's problem, not Gradle's. Those of us who use Dokka are stuck with Gradle 4.4.1 until the Dokka team fixes this.
@semoro This is breaking my builds. I've had to disable the dokka plugin for the time being. An ETA on a fix would really be appreciated! Thanks in advance!
@semoro an ETA would be appreciated, so we can decide what suits as better. Thanks!
Hi! I'm working on the fix right now. @dmarin
thanks, please let me know if you need some beta testers for this fix :)
Fixed in new EAP
https://github.com/Kotlin/dokka/releases/tag/0.9.16-eap-3
Thanks for the quick fix @semoro, just tested it and it is working! :)
@semoro Since this is just a patch, why make it an EAP? Can you just bump to 0.9.16 release?
Fixed in 0.9.16
(Late to the party as usual, but posting in case it's useful for others)
Strange, was on 0.9.16 and encountered this problem; upgrading to 0.9.17 fixed it
Most helpful comment
Fixed in 0.9.16