Gradle JavaExec Task Type: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 11: Line 11:


<syntaxhighlight lang='groovy'>
<syntaxhighlight lang='groovy'>
task codeGen(type: JavaExec) {
task someTask(type: JavaExec) {
     jvmArgs = ['-Xmx12g']
     jvmArgs = ['-Xmx12g']
     classpath = configurations.runtimeClasspath
     classpath = configurations.runtimeClasspath

Revision as of 19:27, 3 February 2021

External

Internal

Overview

Executes a Java application as a child process. To get details on the actual java command line, execute Gradle with -i command line option.

task someTask(type: JavaExec) {
    jvmArgs = ['-Xmx12g']
    classpath = configurations.runtimeClasspath
    main = 'myPackage.MyMainClass'
    args 'something somethingelse'
    environment "LD_LIBRARY_PATH", "/usr/local/lib"
    systemProperties [ "some.prop": "some.value", "some.other.prop": "some.other.value" ]

}

Configuration

environment

systemProperties