I have one really strange issue with Dokka `java.l...
# dokka
t
I have one really strange issue with Dokka
java.lang.UnsupportedOperationException: PermittedSubclasses requires ASM9
I found one related error in Kotlin, which is already fixed. I have Dokka 1.9.20, Kotlin 1.9.24, Gradle 8.8, AGP 8.5.1. I tried to run
./gradlew  buildEnvironment
to see build script dependencies and there is only
org.ow2.asm:asm:9.6
, so I don't understand why it should write that it requires ASM9, when there is ASM 9 already.
And that class OffersAction is directly part of the project, just another gradle module,m so it cannot be corrupted or something like that. I tried to clear cache and build on several machines and platforms.
I found that it is happening only when I set
Copy code
JavaVersion.VERSION_17
I set it for java
android.compileOptions
sourceCompatibility
and
targetCompatibility
. Also for Kotlin
kotlinOptions.jvmTagret
And also directly for
DokkaTask.dokkaSourcests jdkVersion
When I change it to 11, it works. But why. I'm using JDK 17 as target for all other projects without any issue.
Dokka itself is still using JVM 11 for build.
l
@Tomáš Procházka Did you try to set the JVM toolchain using the
kotlin.jvmToolchain
function instead of the various properties from
android
,
kotlin
and Dokka ?
t
Yes. I tried. But when you use toolchain and set it to JDK 17, there is the same issue. There is no differences, it just take the value from toolchain.
😕 1
I tried also to budil current master of dokka project and use 2.0.20-SNAPSHOT in my project. I even build it with JVM 17.
l
I really don't know then, sorry @Tomáš Procházka. 😕
t
And class on it is failing looks also very simple:
Copy code
@Parcelize
sealed class OffersAction : Parcelable {
    data object Purchase : OffersAction()
    data class Renew(val psn: String) : OffersAction()
    data class Upsell(val psn: String) : OffersAction()
    data class CrossSell(val psn: String) : OffersAction()
    data class CrossGrade(val psn: String?, val inAppProductId: String?) : OffersAction()
    data object Restore : OffersAction()
}
145 Views