I would like to define a new task called dbStatus that calls (or extends?) run and simply overrides the args property.
apply plugin: 'application' run { args "server", "service.yml" } task(dbStatus, type: run) { args "db", "status", "service.yml }
This does not work because "run" not a valid task class. Is there a quick way to expand a task and simply override a property?
UPDATE: permission
Unfortunately, I just had to define a new JavaExec task and recreate the logic that run configured. Here is what I came up with:
task(dbStatus, type: JavaExec) { main mainClassName classpath sourceSets.main.runtimeClasspath args "db", "status", "service.yml" }
I do not think this is exactly the same as run , since it does not work against the jar assembly, I do not believe it, but it works for my purposes.
source share