gradle-cargo-plugin icon indicating copy to clipboard operation
gradle-cargo-plugin copied to clipboard

Setting environment variables for local containers JVM

Open sluedecke opened this issue 8 years ago • 1 comments

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?

sluedecke avatar Dec 28 '16 20:12 sluedecke

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.

bmuschko avatar Dec 29 '16 14:12 bmuschko