0
votes

I don't understand why this very simple task using gradle doesn't work ?

task test(type:Exec) { commandLine 'ls -l' }

the output just tell me that :

$ gradle test :test FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':test'.

    A problem occurred starting process 'command 'ls -l''

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED code here

What is wrong with my use?

1
Does it work if you use executable+args instead of commandLine?bzlm

1 Answers

0
votes

Use

task test(type:Exec) { commandLine 'ls', '-l' }

BTW: you really should specify working directory too.