Skip to content

Compilation breaks when compiling release build (with proguard) because of lombok #1

@mama-git

Description

@mama-git

It's always failing in :app:transformClassesAndResourcesWithProguardForStagingRelease
Adding -keep class lombok.** { *; } in the proguard file did not help.

11:15:06.286 [ERROR] [system.err] Warning: there were 728 unresolved references to classes or interfaces.
11:15:06.286 [ERROR] [system.err] You may need to add missing library jars or update their versions.
11:15:06.286 [ERROR] [system.err] If your code works fine without the missing classes, you can suppress
11:15:06.286 [ERROR] [system.err] the warnings with '-dontwarn' options.
11:15:06.286 [ERROR] [system.err] (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
11:15:06.286 [ERROR] [system.err] Warning: there were 2 unresolved references to program class members.
11:15:06.286 [ERROR] [system.err] Your input classes appear to be inconsistent.
11:15:06.286 [ERROR] [system.err] You may need to recompile the code.
11:15:06.286 [ERROR] [system.err] (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedprogramclassmember)

in the attached file you can find all the warnings about the classes and interfaces that cannot be found.
lombok_warnings.txt

Am I importing your library incorrectly?

In my build.gradle file I imported the api like this:
dependencies {
...
api 'org.openweathermap.java-api:api-core:1.0'
}

Edit: by using -dontwarn lombok.** I can build the apk, but then at runtime when querying daily forecasts, the DailyForecast.getWeather() method returns null. This does not happen with the debug build or by not using proguard in the release build.

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