Skip to content

Proguard Optimization on Desktop fails #338

@JuBan1

Description

@JuBan1

Hello there,

it appears that Proguard can't be used for code optimization with this library to optimize desktop JVM builds.

This can be reproduced by trying to package the sample app: ./gradlew :sample:desktopApp:packageReleaseUberJarForCurrentOS

This will fail with a compile-time error:

proguard.evaluation.exception.IncompleteClassHierarchyException:
[...]
Can't find common super class of [com.jetbrains.cef.remote.ThriftTransport$1] (with 1 known super classes: com.jetbrains.cef.remote.ThriftTransport$1 and 1 unknown classes: org.apache.thrift.transport.TServerTransport) and [com.jetbrains.cef.remote.ThriftTransport$2] (with 1 known super classes: com.jetbrains.cef.remote.ThriftTransport$2 and 1 unknown classes: org.apache.thrift.transport.TServerTransport)

Given the error message I assume that this ultimately comes from JCEF.

I tinkered for a few hours with proguard rules and found no way of making it run. -keeping or -dontwarning the relevant packages solved some issues but not all. Even keeping literally everything via ** still fails.

Only by adding -dontoptimize did it actually complete without errors. In this case you can still benefit from code shrinking.

I'm not sure how to even approach this issue since proguard rules don't appear to help.

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