Ignat Beresnev
03/04/2024, 6:00 PMSebastian Schuberth
03/04/2024, 6:10 PMOleg Yukhnevich
03/04/2024, 6:22 PMkenkyee
03/04/2024, 8:24 PMLukasz Kalnik
03/05/2024, 8:26 AMERROR: Exception while analyzing expression at (238,45) in /runner/work/app-path-redacted/AppComposeScreen.kt
...
Caused by: java.lang.IllegalStateException: Could not read class: VirtualFile: /home/automata/.gradle/caches/transforms-4/ec27e9b5bc98114d7404e1026e605152/transformed/lottie-compose-6.4.0-api.jar!/com/airbnb/lottie/compose/LottieCompositionSpec.class
...
Caused by: java.lang.UnsupportedOperationException: PermittedSubclasses requires ASM9
Lukasz Kalnik
03/05/2024, 8:27 AMLukasz Kalnik
03/05/2024, 8:30 AMPreviewParameterProvider
and doesn't mention any class related to Lottie Compose (the class is mentioned at another point of the file, inside a private Composable).Ignat Beresnev
03/05/2024, 9:03 AMIgnat Beresnev
03/05/2024, 9:08 AM./gradlew buildEnvironment
Lukasz Kalnik
03/05/2024, 9:12 AMclasspath
+--- org.jetbrains.dokka:dokka-gradle-plugin:1.9.10
| \--- org.jetbrains.dokka:dokka-core:1.9.10
| +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.3
| | \--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.3
...
Ignat Beresnev
03/05/2024, 9:13 AMdokkaHtml
/ dokkaHtmlMultiModule
?Lukasz Kalnik
03/05/2024, 9:13 AMdokkaHtml
Lukasz Kalnik
03/05/2024, 9:15 AM./gradlew dokkaHtml
from the command line it generates the docs correctly. Must be something with our CI configuration then. Thanks for the quick help though!Oleg Yukhnevich
03/05/2024, 9:19 AMLukasz Kalnik
03/05/2024, 9:22 AMbuild.gradle.kts
tasks.dokkaHtml.configure {
dokkaSourceSets {
named("main") {
noAndroidSdkLink.set(false)
}
}
}
tasks.register<Jar>("javadocJar") {
archiveClassifier.set("javadoc")
from("$buildDir/dokka/javadoc")
}
artifacts {
tasks.findByName("javadocJar")
}
publishing {
singleVariant("release") {
withJavadocJar()
}
Lukasz Kalnik
03/05/2024, 9:23 AMjavaDocReleaseGeneration
failsLukasz Kalnik
03/05/2024, 9:26 AMLukasz Kalnik
03/05/2024, 9:58 AMOleg Yukhnevich
03/05/2024, 10:44 AMjavaDocReleaseGeneration
which fails - then it's Dokka running, but older version coming from AGP - and so it's an issue on AGP side unfortunately...
May be you can workaround somehow like this (https://github.com/getkevin/kevin-android/pull/121/files) - workaround means, that there will be no javadoc.jar
generated via AGPLukasz Kalnik
03/05/2024, 10:46 AMjavadoc.jar
Lukasz Kalnik
03/05/2024, 10:47 AMOleg Yukhnevich
03/05/2024, 10:53 AMwithJavadocJar
in publishing
DSL coming from AGP) and manually add javadoc.jar
generated by latest Dokka to publication
I will setup some test project and come back to you later today with some snippet to overcome the issueLukasz Kalnik
03/05/2024, 10:54 AMLukasz Kalnik
03/05/2024, 2:38 PMpublishing
DSL I removed the withJavaDocJar()
and instead in Kotlin's publishing
DSL I added to each of the publications
an artifact()
containing the Jar generated from Dokka output.Oleg Yukhnevich
03/05/2024, 2:42 PMLukasz Kalnik
03/05/2024, 2:42 PM