Skip to content

Commit 1e7abf2

Browse files
authored
3.x: Embed R8 ProGuard rules to ignore Flow* interfaces in RS 1.0.3 (#6706)
* 3.x: Embed R8 ProGuard rules to ignore Flow* interfaces in RS 1.0.3 * Fix wording
1 parent c1b6d7b commit 1e7abf2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ The base classes can be considered heavy due to the sheer number of static and i
489489

490490
### R8 and ProGuard settings
491491

492-
By default, RxJava doesn't require any ProGuard/R8 settings and should work without problems. Unfortunately, the Reactive Streams dependency since version 1.0.3 has embedded Java 9 class files in its JAR that can cause warnings with ProGuard:
492+
By default, RxJava itself doesn't require any ProGuard/R8 settings and should work without problems. Unfortunately, the Reactive Streams dependency since version 1.0.3 has embedded Java 9 class files in its JAR that can cause warnings with the plain ProGuard:
493493

494494
```
495495
Warning: org.reactivestreams.FlowAdapters$FlowPublisherFromReactive: can't find superclass or interface java.util.concurrent.Flow$Publisher
@@ -499,15 +499,14 @@ Warning: org.reactivestreams.FlowAdapters$FlowToReactiveSubscription: can't find
499499
Warning: org.reactivestreams.FlowAdapters: can't find referenced class java.util.concurrent.Flow$Publisher
500500
```
501501

502-
It is recommended one sets up one or more of the following `-dontwarn` entries:
502+
It is recommended one sets up the following `-dontwarn` entry in the application's `proguard-ruleset` file:
503503

504504
```
505-
-dontwarn org.reactivestreams.FlowAdapters
506-
-dontwarn org.reactivestreams.**
507-
-dontwarn java.util.concurrent.Flow.**
508-
-dontwarn java.util.concurrent.**
505+
-dontwarn java.util.concurrent.Flow*
509506
```
510507

508+
For R8, the RxJava jar includes the `META-INF/proguard/rxjava3.pro` with the same no-warning clause and should apply automatically.
509+
511510
### Further reading
512511

513512
For further details, consult the [wiki](https://github.com/ReactiveX/RxJava/wiki).
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-dontwarn java.util.concurrent.Flow*

0 commit comments

Comments
 (0)