kotlin.reflect.jvm.internal.KotlinReflectionInternalError: Function 'handleEvents' (JVM signature: present$handleEvents(Landroidx/compose/runtime/MutableState;Lkotlin/jvm/internal/Ref$ObjectRef;Lio/element/android/libraries/permissions/api/PermissionsEvents;)V) not resolved in class kotlin.jvm.internal.Intrinsics$Kotlin: no members found
at kotlin.reflect.jvm.internal.KDeclarationContainerImpl.findFunctionDescriptor(KDeclarationContainerImpl.kt:131)
at kotlin.reflect.jvm.internal.KFunctionImpl$descriptor$2.invoke(KFunctionImpl.kt:56)
at kotlin.reflect.jvm.internal.KFunctionImpl$descriptor$2.invoke(KFunctionImpl.kt:55)
at kotlin.reflect.jvm.internal.ReflectProperties$LazySoftVal.invoke(ReflectProperties.java:93)
at kotlin.reflect.jvm.internal.ReflectProperties$Val.getValue(ReflectProperties.java:32)
at kotlin.reflect.jvm.internal.KFunctionImpl.getDescriptor(KFunctionImpl.kt:55)
at kotlin.reflect.jvm.internal.KFunctionImpl.toString(KFunctionImpl.kt:185)
at kotlin.jvm.internal.FunctionReference.toString(FunctionReference.java:130)
at java.lang.String.valueOf(String.java:4092)
at java.lang.StringBuilder.append(StringBuilder.java:179)
at io.element.android.libraries.permissions.api.PermissionsState.toString
at java.lang.String.valueOf(String.java:4092)
at java.lang.StringBuilder.append(StringBuilder.java:179)
at io.element.android.libraries.permissions.impl.DefaultPermissionsPresenter.present(DefaultPermissionsPresenter.kt:128)
With this change, composable previews and screenshots should be created with just:
```
@ElementPreviews@Composable
fun MyViewPreview() {
ElementPreview {
MyView()
}
}
```
- Adds `@ElementPreviews` which is a shorthand for:
```
@Preview(name = "D")
@Preview(name = "N", uiMode = Configuration.UI_MODE_NIGHT_YES)
```
Should be used in connection with the now public `fun ElementPreview()` composable.
- Adds ElementPreviews to previewAnnotations in dangerfile
- Screenshots of night mode previews are now rendered with night mode
- Replaces `ElementPreviewLight` and `ElementThemedPreview` with `ElementPreview`
- Deprecates `ElementPreviewDark` which should be removed.
- Remaining usages of `ElementPreviewDark` are now ignored during screenshot tests
* Update AGP to 8.0.0.
* Set JAVA_HOME to JDK17
* Update lint version.
* Use right JDK for dependency analysis, replace deprecated env var.
* Upgrade to Gradle 8.1.
* Remove `@Supress(DSL_SCOPE_VIOLATION)` as it's no longer needed.
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>