greenrobot / EventBus

Event bus for Android and Java that simplifies communication between Activities, Fragments, Threads, Services, etc. Less code, better quality.
http://greenrobot.org/eventbus/
Apache License 2.0
24.67k stars 4.66k forks source link

Embed R8 rules in JAR #652

Closed kyze8439690 closed 2 years ago

kyze8439690 commented 4 years ago

Link: https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.BuildType.html#com.android.build.gradle.internal.dsl.BuildType:consumerProguardFiles

greenrobot-team commented 4 years ago

EventBus is not distributed as an Android library (AAR), so that won't work.

But we could embed them using a meta-inf file similar to https://github.com/objectbox/objectbox-java/commit/92f3cd54a40ebea753886c480ef4c0094743e8ca

kyze8439690 commented 4 years ago

If proguard rule is embeded in META-INF directory, can gradle build system refer to this file?

greenrobot-team commented 4 years ago

Once we do, yes. However, it's R8 that uses this file, not Gradle. https://twitter.com/jakewharton/status/1004401938467876865

qeadsw commented 3 years ago

This proposal is necessary because it is in step with The Times. Hope the official adoption update!

greenrobot-team commented 2 years ago

Resolved as part of #670.