https://kotlinlang.org logo
Title
m

Michał Kalinowski

07/29/2019, 11:27 AM
Hey, so I want use ProGuard for obfuscation but each time when I want use reflection I have in bytecode `LKotlin/Metadata'. And there are too much about objects that I want hide. Is there any way to get rid of it? Or I need use java reflection?
d

diesieben07

07/29/2019, 11:28 AM
Kotlin reflection needs the
Metadata
annotation. If you don't want to keep it, you have to resort to Java reflection
m

Michał Kalinowski

07/29/2019, 11:54 AM
that's sad, then I need rewrite most of kotlin reflection to java 😞, anyway thanks!
g

gildor

07/29/2019, 12:06 PM
But Java reflections also require keeping original names, otherwise it will not work
m

Michał Kalinowski

07/29/2019, 12:26 PM
@msink yep but I try just read constructor parameters types to create object so I don't bother about original names