Invoke./gradlew clean :shared:compileIosMainKotlinMetadata – it will succeed
Uncomment api(ProjectDependencies.SQLDelite.runtime) in shared/build.gradle.kts
Invoke ./gradlew clean :shared:compileIosMainKotlinMetadata – it will fail
Effectively the api dependency changes the order of -library %libPath%.klib arguments passed to the K/N compiler. It could be seen in the attached files broken.txt and not-broken.txt. After some experiments with debugger I saw that compiling the working case and manually rewriting the order of dependencies does the thing – build fails.
ERROR: Exception while analyzing expression in (8,5) in %path_to_project%/KT-60761/shared/src/iosMain/kotlin/com/kopylovis/kmmcomposemuliplatformexample/MainViewController.kt
Attachments:
causeThrowable
java.lang.NullPointerException
at androidx.compose.compiler.plugins.kotlin.k1.AnnotationUtilsKt$makeComposableAnnotation$1.getType(AnnotationUtils.kt:38)
at org.jetbrains.kotlin.resolve.descriptorUtil.DescriptorUtilsKt.getAnnotationClass(DescriptorUtils.kt:402)
at org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor$DefaultImpls.getFqName(AnnotationDescriptor.kt:34)
at androidx.compose.compiler.plugins.kotlin.k1.AnnotationUtilsKt$makeComposableAnnotation$1.getFqName(AnnotationUtils.kt:36)
at org.jetbrains.kotlin.descriptors.annotations.Annotations$DefaultImpls.findAnnotation(Annotations.kt:29)
at org.jetbrains.kotlin.descriptors.annotations.AnnotationsImpl.findAnnotation(AnnotationsImpl.kt:22)
Affected platforms
Select one of the platforms below:
Describe the bug Originally reported in https://issuetracker.google.com/issues/294869453. The description below is copied for brevity.
Steps to Reproduce:
./gradlew clean :shared:compileIosMainKotlinMetadata
– it will succeedapi(ProjectDependencies.SQLDelite.runtime)
inshared/build.gradle.kts
./gradlew clean :shared:compileIosMainKotlinMetadata
– it will failEffectively the api dependency changes the order of
-library %libPath%.klib
arguments passed to the K/N compiler. It could be seen in the attached filesbroken.txt
andnot-broken.txt
. After some experiments with debugger I saw that compiling the working case and manually rewriting the order of dependencies does the thing – build fails.Affected platforms Select one of the platforms below: