Skip to content

Ignore missing library entries #350

Open
@ebourg

Description

@ebourg

I've some troubles supporting both Java 8 and Java 9+ with the same plugin configuration. For example to build with Java 8 I use this:

  <libs>
    <lib>${java.home}/lib/rt.jar</lib>
  </libs>

and for Java 9+ I use this:

  <libs>
    <lib>${java.home}/jmods/java.base.jmod</lib>
    <lib>${java.home}/jmods/java.logging.jmod</lib>
    <lib>${java.home}/jmods/java.sql.jmod</lib>
  </libs>

But I can't use a mixed configuration:

  <libs>
    <lib>${java.home}/lib/rt.jar</lib>
    <lib>${java.home}/jmods/java.base.jmod</lib>
    <lib>${java.home}/jmods/java.logging.jmod</lib>
    <lib>${java.home}/jmods/java.sql.jmod</lib>
  </libs>

In this case Proguard complains about missing files.

The workaround is to duplicate the whole plugin configuration in two different profiles, but I'd like to avoid adding 50 lines of plugin declaration for this.

Would it be possible to modify the plugin to check if the libraries listed exist before using them and ignore those that are missing?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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