How to start Gradle from a Java profiler?

(Sebastien Tardif) #1

I would like to know how I can start from a profiler, so from Java, gradle. For example, my build is slow when I do: gradlew assemble But using the --profile argument doesn’t tell me enough.

(Peter Niederwieser) #2

It depends on the profiler, but in general you do it in the same way as when profiling any other external JVM application. JVM arguments can be set via the ‘JAVA_OPTS’ or ‘GRADLE_OPTS’ environment variable. If you are using the Gradle daemon, you might want to run with ‘–no-daemon’.