So I have a folder that has many jar files. And I have to use these jar files in classpath for java exec task. But it gives me -
What went wrong:
Execution failed for task ':TestProj:runTest'.
A problem occurred starting process 'command 'C:\Program Files\Java\jdk1.6.0_31\bin\
java.exe''
Caused by: java.io.IOException: CreateProcess error=206, The filename or extension is
too long
I am doing something like
def jarFiles = files { file('testDir').listFiles() }
task runTest(type: JavaExec) {
main = 'Main'
classpath = jarFiles
}
I've tried to use '/*' in path but gradle throws exception
Could not normalize path for file....
Any workarounds?