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

Support for platform dependent and native libs #20

Open
tschulte opened this issue Mar 22, 2015 · 2 comments
Open

Support for platform dependent and native libs #20

tschulte opened this issue Mar 22, 2015 · 2 comments
Assignees
Milestone

Comments

@tschulte
Copy link
Owner

I am not sure if gradle does have support for this, but this plugin should allow defining native dependencies and create corresponding entries in the jnlp.

@tschulte tschulte added this to the 1.0 milestone Nov 6, 2015
@tschulte tschulte self-assigned this Nov 6, 2015
@tschulte
Copy link
Owner Author

tschulte commented Nov 6, 2015

Workaround until this feature is ready:

configurations {
    jnlpWithoutNatives { // <1>
        extendsFrom jnlp
        exclude module: 'jdic-native'
        exclude module: 'jdic-stub'
    }
}
jnlp {
    withXml {
        resources("os": "Windows") { // <2>
            project.configurations.runtime.findAll { it.name =~ /-stub-.*-windows/ }.each { jarFile ->
                jar tasks.generateJnlp.jarParams(jarFile)
            }
        }
        resources("os": "Windows", arch: "x86") {
            project.configurations.runtime.findAll { it.name =~ /-native-.*-win32/ }.each { jarFile ->
                nativelib tasks.generateJnlp.jarParams(jarFile)
            }
        }
        tasks.generateJnlp.from = configurations.jnlpWithoutNatives // <3>
    }
}
  1. add a new configuration that extendsFrom the default jnlp-configuration, but excludes the jars containing the native libs and stub-jars that differ from platform to platform
  2. add platform dependent resources blocks to the jnlp file
  3. before the jnlp-task adds the rest of the resources, change it's source to jnlpWithoutNatives

@tschulte tschulte changed the title Support for platform dependenent and native libs Support for platform dependent and native libs Oct 26, 2017
@tschulte
Copy link
Owner Author

Another thing this might include: different library versions depending on java version. Example: ControlsFX needs different jars to be used depending on the Java version.

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

No branches or pull requests

1 participant