I am currently using gradle integration with ecplise. Is there a way to print out the classpath of a javaexec task?
The simplest would be to set log level to info using --info
If you would like to not browse through the output you could add a line similar to this inside your JavaExec task
doFirst{
sourceSets.main.runtimeClasspath.each { println it}
}
sourceSets.main.compileClasspath.asPath
For printing, you can write below the line in your task:
println "Classpath = ${sourceSets.main.compileClasspath.asPath}";
With gradle v4 I was unable to get either of the above options to work, but using --debug
and grep classpath
did find the information.
Or add println configurations.runtime.resolve()
to your build.gradle
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With