Gradle taking twice as long as maven to run on jenkins

Not much else to say, gradle takes about 5 minutes to run locally and almost 30 minutes to run in jenkins. I’m unsure why, and I don’t think I can run a build scan since it’s company code and I can’t convince the company to get gradle enterprise until I get us actually using gradle and show it’s worth.

Try running with the Gradle profiler (–profile).

Sorry but are you comparing gradle/local vs gradle/jenkins? If so why the reference to Maven in the subject?

I didn’t write my title very clearly did I?

We’re converting from maven to gradle. Gradle is faster locally, by about double. But on jenkins it’s taking 2-3 times as long to run as maven with the same project.

The --profile flag that @Schalk_Cronje suggested is a good start. I just need to have a way to get the profile reports off of jenkins.

With a conventional Jenkins instance, you should be able to inspect the workspace and even download workspace files as a zip file. In a scripted pipeline job, the “Pipeline Steps” action in the left nav is the first step in getting to that.

Hm. Our jenkins instance must not be conventional then. Because there’s nothing present in the Pipeline Steps to pull from. Anyway, I’ve just requested ssh access. I’ll pull the profiles from there. Are they going to be as detailed as build scans?

You could tell Jenkins to archive the profile files as a post-build step.

I’m not sure I understand what you mean