2 Commits

Author SHA1 Message Date
Vsevolod Tolstopyatov 14b13a2f17 [kotlin.reflect] Introduce ClassValue-based cache for KClassImpl
* Replace pcollections with ClassValue/ConcurrentHashMap-based caches
* Do not store weak references, instead cache strong references and count on ClassValue to unload the corresponding classloader if necessary
* ConcurrentHashMap does not rely on WeakReference as it's only selected on Android where classloader leaks don't exist
* Update reflect/scripting JDK requirement to Java 8 in order to proceed

#KT-53454
#KT-50705


Merge-request: KT-MR-6788
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
2022-08-05 15:35:34 +00:00
Zac Sweers 482874fdc1 Embed proguard/R8 rules in kotlin-reflect artifact jar
The Android build pipeline can extract embedded proguard configurations
from dependencies and merge them automatically. This adds a conservative
proguard configuration to the kotlin-reflect JVM artifact in support of
that. This focuses mostly on just retaining what's necessary for
kotlin-reflect's own functionality to operate, but could be expanded if
community feedback discovers other good candidate rules.

With this in place - most Android projects using R8 or Proguard should
Just Work™️ with kotlin-reflect.
2020-01-17 20:03:52 +01:00