gradle-cargo-plugin
gradle-cargo-plugin copied to clipboard
Setting environment variables for local containers JVM
We have some native libraries which need to be in the LD_LIBRARY_PATH (Unix) / PATH (Windows) environment variable. Unfortunately it is not sufficient to set -Djava.library.path since the native library has dependencies to other libraries which are not found by setting -Djava.library.path.
The org/codehaus/cargo/daemon/jvm/DaemonJvmLauncher.java does have an option to set the environment variables of the JVM but I cannot find a way to do this using the gradle plugin.
Can you demonstrate how to do this or add a way to specify environment variables?
The Gradle plugin uses the Cargo Ant tasks. If those tasks support setting environment variables then the plugin can add it. At the moment it's not exposed by the Gradle plugin. Please open a pull request if you are interested in adding the feature.