Kotlin / kotlinx-atomicfu

The idiomatic way to use atomic operations in Kotlin
Other
929 stars 59 forks source link

generate proguard rules #184

Open ArcticLampyrid opened 3 years ago

ArcticLampyrid commented 3 years ago

There are two ways to deal with this feature.

  1. generate proguard rules according to what fields FU use
  2. mark all the fields with a specific annotation and write rules for this annotation In fact, android defines Keep annotation (Of course, the pre-defined annotation is android-only, we need to define it by ourselves)

ProGuard/R8 is so widely used that it deserves getting atomicfu out of the box with proguard

fzhinkin commented 5 days ago

@ArcticLampyrid it's been a while since you opened the issue. Was it about R8 renaming atomic backing fields that could no longer be updater by an atomic field updater? Or there were some other reasons to keep generated fields? Thanks in advance!