I would like to remove 11k methods from my dex count when using Realm in a Kotlin Android application.
Documentation should not require me to add kotlin-reflect as a dependency.
Documentation states that kotlin-reflect is required:
Many of Realm APIs reference Java classes, and for that reason you must include
org.jetbrains.kotlin:kotlin-reflect:${kotlin_version}as a compile dependency.
I believe this is false because the ability to get a java Class<T> from a Kotlin KClass<T> is present in the Kotlin stdlib.
I've removed kotlin-reflect from my dependencies, ran a clean build, and the application still seemed to function normally.
I have been using Realm in my Kotlin application for a couple of months without the kotlin-reflect dependency, and it is working as expected.
I won't rule out that it was left there, because it was needed at some point and we never got around to testing it without. We should update our documentation it seems.
Website and example updated.
Awesome, thank you for confirming!
Most helpful comment
I have been using Realm in my Kotlin application for a couple of months without the
kotlin-reflectdependency, and it is working as expected.