Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Kotlin nostr] Include proguard rules #402

Open
dluvian opened this issue Apr 12, 2024 · 2 comments
Open

[Kotlin nostr] Include proguard rules #402

dluvian opened this issue Apr 12, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@dluvian
Copy link
Contributor

dluvian commented Apr 12, 2024

Describe the enhancement

Include proguard rules that will allow users to build their Android app in release mode with minify enabled.

Use case

As an Android dev you usually set isMinifyEnabled = true in your build options to reduce the apk size but doing so will break the app. Some classes should be excluded from the minify process or rust-nostr will not work. It would be nice if the lib would work from the get-go without having to figure out proguard rules.

Additional context

I don't know if this is the best solution but it works for me and it's what I'm currently using:

-keep class com.sun.jna.** { *; }
-keep class * implements com.sun.jna.** { *; }
-dontwarn java.awt.Component
-dontwarn java.awt.GraphicsEnvironment
-dontwarn java.awt.HeadlessException
-dontwarn java.awt.Window

Here the file: https://github.com/dluvian/voyage/blob/master/app/proguard-rules.pro

@dluvian dluvian added the enhancement New feature or request label Apr 12, 2024
@yukibtc
Copy link
Member

yukibtc commented Apr 12, 2024

@dluvian
Copy link
Contributor Author

dluvian commented Apr 13, 2024

Yeah, I have no idea how to set this up correctly...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants