Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an valid proguard rule for RxJava and FasterXML?

Now the only problem stopping me from using kotlin in production is that I can't find a correct proguard file for it.

What I used:

1.Kotlin

2.Anko

3.Jackson-Kotlin-module

Here's the warning message:

:app:proguardRelease
Warning: com.fasterxml.jackson.databind.ext.DOMSerializer: can't find referenced class org.w3c.dom.bootstrap.DOMImplementationRegistry
Warning: rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef: can't find referenced class sun.misc.Unsafe
Warning: rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef: can't find referenced class sun.misc.Unsafe
Warning: rx.internal.util.unsafe.ConcurrentCircularArrayQueue: can't find referenced class sun.misc.Unsafe
Warning: rx.internal.util.unsafe.ConcurrentSequencedCircularArrayQueue: can't find referenced class sun.misc.Unsafe
Warning: rx.internal.util.unsafe.MpmcArrayQueueConsumerField: can't find referenced class sun.misc.Unsafe
Warning: rx.internal.util.unsafe.MpmcArrayQueueProducerField: can't find referenced class sun.misc.Unsafe
Warning: rx.internal.util.unsafe.MpscLinkedQueue: can't find referenced class sun.misc.Unsafe
Warning: rx.internal.util.unsafe.SpmcArrayQueueConsumerField: can't find referenced class sun.misc.Unsafe
Warning: rx.internal.util.unsafe.SpmcArrayQueueProducerField: can't find referenced class sun.misc.Unsafe
Warning: rx.internal.util.unsafe.SpscArrayQueue: can't find referenced class sun.misc.Unsafe
Warning: rx.internal.util.unsafe.UnsafeAccess: can't find referenced class sun.misc.Unsafe
Warning: there were 41 unresolved references to classes or interfaces.
like image 795
Marvin Avatar asked Oct 29 '15 12:10

Marvin


2 Answers

It has nothing to do with Kotlin. Ignore the warnings in your proguard file:

-dontwarn sun.misc.Unsafe
-dontwarn org.w3c.dom.bootstrap.DOMImplementationRegistry
like image 79
Andrey Breslav Avatar answered Sep 24 '22 14:09

Andrey Breslav


a better is just to have this aar as a dependency:

https://github.com/artem-zinnatullin/RxJavaProGuardRules

like image 33
Fred Grott Avatar answered Sep 24 '22 14:09

Fred Grott