agoda-com / Kakao

This repo is no longer supported. Please visit a https://github.com/KakaoCup/Kakao
Apache License 2.0
1.11k stars 102 forks source link

Kakao use kotlin reflection api? #11

Closed Judrummer closed 6 years ago

Judrummer commented 6 years ago

I have found some error with RecyclerView when forgot to add itemType to KRecyclerView

 val provideItem = itemTypes.getOrElse(T::class) {
            throw IllegalStateException("${T::class.qualifiedName} did not register to KRecyclerView")
        }.provideItem 

On this snippet (In Views.kt line 176), when itemType not found, It will throw kotlin.jvm.KotlinReflectionNotSupportedError: Kotlin reflection implementation is not found at runtime. Make sure you have kotlin-reflect.jar in the classpath because we use qualifiedName.

Should we add kotlinReflection into testCompile dependency or change qualifiedName to anotherName (ex. simpleName?

Unlimity commented 6 years ago

Better to change to simpleName. We shouldn't have any reflection dependency in our code. Can you prepare PR?

VerachadW commented 6 years ago

I will take this

Unlimity commented 6 years ago

Fixed.