RxJava 2.2.13 Proguard issue

Created on 14 Oct 2019  路  5Comments  路  Source: ReactiveX/RxJava

After updating to RxJava 2.2.13 we get the following proguard warnings and the build fails:

Warning: org.reactivestreams.FlowAdapters$FlowPublisherFromReactive: can't find superclass or interface java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters$FlowToReactiveProcessor: can't find superclass or interface java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters$FlowToReactiveSubscriber: can't find superclass or interface java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$FlowToReactiveSubscription: can't find superclass or interface java.util.concurrent.Flow$Subscription
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$FlowPublisherFromReactive: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters$FlowPublisherFromReactive: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$FlowPublisherFromReactive: can't find referenced class java.util.concurrent.Flow
Warning: org.reactivestreams.FlowAdapters$FlowPublisherFromReactive: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$FlowPublisherFromReactive: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$FlowPublisherFromReactive: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$FlowPublisherFromReactive: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$FlowPublisherFromReactive: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters$FlowToReactiveProcessor: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters$FlowToReactiveProcessor: can't find referenced class java.util.concurrent.Flow$Subscription
Warning: org.reactivestreams.FlowAdapters$FlowToReactiveProcessor: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$FlowToReactiveProcessor: can't find referenced class java.util.concurrent.Flow
Warning: org.reactivestreams.FlowAdapters$FlowToReactiveProcessor: can't find referenced class java.util.concurrent.Flow$Subscription
Warning: org.reactivestreams.FlowAdapters$FlowToReactiveProcessor: can't find referenced class java.util.concurrent.Flow$Subscription
Warning: org.reactivestreams.FlowAdapters$FlowToReactiveProcessor: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$FlowToReactiveProcessor: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$FlowToReactiveProcessor: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$FlowToReactiveProcessor: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$FlowToReactiveProcessor: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters$FlowToReactiveSubscriber: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$FlowToReactiveSubscriber: can't find referenced class java.util.concurrent.Flow$Subscription
Warning: org.reactivestreams.FlowAdapters$FlowToReactiveSubscriber: can't find referenced class java.util.concurrent.Flow
Warning: org.reactivestreams.FlowAdapters$FlowToReactiveSubscriber: can't find referenced class java.util.concurrent.Flow$Subscription
Warning: org.reactivestreams.FlowAdapters$FlowToReactiveSubscriber: can't find referenced class java.util.concurrent.Flow$Subscription
Warning: org.reactivestreams.FlowAdapters$FlowToReactiveSubscriber: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$FlowToReactiveSubscription: can't find referenced class java.util.concurrent.Flow$Subscription
Warning: org.reactivestreams.FlowAdapters$FlowToReactiveSubscription: can't find referenced class java.util.concurrent.Flow
Warning: org.reactivestreams.FlowAdapters$ReactivePublisherFromFlow: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters$ReactivePublisherFromFlow: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters$ReactivePublisherFromFlow: can't find referenced class java.util.concurrent.Flow
Warning: org.reactivestreams.FlowAdapters$ReactivePublisherFromFlow: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$ReactivePublisherFromFlow: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters$ReactivePublisherFromFlow: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters$ReactivePublisherFromFlow: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters$ReactivePublisherFromFlow: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters$ReactivePublisherFromFlow: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters$ReactivePublisherFromFlow: can't find referenced class java.util.concurrent.Flow$Publisher
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowProcessor: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowProcessor: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowProcessor: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowProcessor: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowProcessor: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowProcessor: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowProcessor: can't find referenced class java.util.concurrent.Flow
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowProcessor: can't find referenced class java.util.concurrent.Flow$Subscription
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowProcessor: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowProcessor: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowProcessor: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowProcessor: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowProcessor: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowProcessor: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowProcessor: can't find referenced class java.util.concurrent.Flow$Processor
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowSubscriber: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowSubscriber: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowSubscriber: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowSubscriber: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowSubscriber: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowSubscriber: can't find referenced class java.util.concurrent.Flow
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowSubscriber: can't find referenced class java.util.concurrent.Flow$Subscription
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowSubscriber: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowSubscriber: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowSubscriber: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowSubscriber: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowSubscriber: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowSubscriber: can't find referenced class java.util.concurrent.Flow$Subscriber
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowSubscription: can't find referenced class java.util.concurrent.Flow$Subscription
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowSubscription: can't find referenced class java.util.concurrent.Flow$Subscription
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowSubscription: can't find referenced class java.util.concurrent.Flow$Subscription
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowSubscription: can't find referenced class java.util.concurrent.Flow
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowSubscription: can't find referenced class java.util.concurrent.Flow$Subscription
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowSubscription: can't find referenced class java.util.concurrent.Flow$Subscription
Warning: org.reactivestreams.FlowAdapters$ReactiveToFlowSubscription: can't find referenced class java.util.concurrent.Flow$Subscription

I assume it's because of the changes from Reactive Streams 1.0.3:

FlowAdapters artifact removed, FlowAdapters moved into the core jar https://github.com/reactive-streams/reactive-streams-jvm/issues/424

Any advice on how to fix Proguard?

2.x Android Question

Most helpful comment

You may suppress the warning apparently, one of these could work:

-dontwarn org.reactivestreams.FlowAdapters
-dontwarn org.reactivestreams.**
-dontwarn java.util.concurrent.flow.**
-dontwarn java.util.concurrent.**

All 5 comments

You may suppress the warning apparently, one of these could work:

-dontwarn org.reactivestreams.FlowAdapters
-dontwarn org.reactivestreams.**
-dontwarn java.util.concurrent.flow.**
-dontwarn java.util.concurrent.**

I'm not sure what else we could do. This is a problem with the RS library but I don't think they know or consider ProGuard & Android environment issues.

Can't remember where I posed but R8 is complaining too:

R8: Missing class: java.util.concurrent.Flow$Subscription
R8: Missing class: java.util.concurrent.Flow$Publisher
R8: Missing class: java.util.concurrent.Flow$Processor
R8: Missing class: java.util.concurrent.Flow$Subscriber

Let's ship rules so R8 can read them.

Okay, but I don't know how to setup gradle to include a file in the META-INF/proguard directory. Also it is unclear what the filename should be based on the tweet.

I believe it's as simple as this:

diff --git a/src/main/resources/META-INF/proguard/rxjava2.pro b/src/main/resources/META-INF/proguard/rxjava2.pro
new file mode 100644
index 000000000..b9994780a
--- /dev/null
+++ b/src/main/resources/META-INF/proguard/rxjava2.pro
@@ -0,0 +1,2 @@
+# Reactive Stream specification is bringing them but not using them.
+-dontwarn java.util.concurrent.Flow
\ No newline at end of file

I wanted to submit a PR but RxJava does not work with Gradle 5.x and the Gradle Wrapper 4.x that is being used does not like my Java 11 version :man_shrugging:
Hence I can't verify it

Was this page helpful?
0 / 5 - 0 ratings