Skip to content

Add ProGuard / R8 config #49

@JBramauer

Description

@JBramauer

In my project, I'm using ProGuard. Enabling it without any CoreMidi4J specific rules crashed my app on MacOS (I'm guessing it's the native library accesses Java classes).

Adding keep rules for everything CoreMidi4J related fixed this for me:

-keep class uk.co.xfactorylibrarians.coremidi4j.** { *; }
-keepnames class uk.co.xfactorylibrarians.coremidi4j.** { *; }

This might be more than required, but in this case I took the safe route.

A bug in another library forces me to have optimization disabled as well.
CoreMidi4J might not need this, but I can't verify atm so if anyone else stumbles across this and still has issues after adding above rules, try this one as well:
-dontoptimize

In general, it would be nice to have rules for ProGuard/R8 embedded via META-INF.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions