Hello, I'd like to create a JavaExec task that cal...
# community-support
h
Hello, I'd like to create a JavaExec task that calls some class passing some command line argument to the class. That works well:
Copy code
tasks.register<JavaExec>("someTask") {
    classpath = sourceSets["main"].runtimeClasspath
    mainClass.set("some.class")
    mainModule.set("some.module")
    args("--foo")
}
, but if I use the
--args bar
option when launching the task, this will override the setting of
--foo
. Any way to force a command line argument from the build script that won't get erased when
--args
is used ?