r/java • u/Party_Till_I_Die • Jun 30 '26
You are probably already running gradle/actions
https://blog.gradle.org/running-gradle-github-actions
5
Upvotes
r/java • u/Party_Till_I_Die • Jun 30 '26
40
u/repeating_bears Jun 30 '26
The title seems to imply that it may be running without my knowing but that's not the case
It then says that some popular libraries use it. So what? A project I depend on running it is not the same as me running it.
I don't see any basis for the claim in the title. Here's a more accurate one:
"If you use setup-gradle, you use setup-gradle"
16
u/sq_visigoth Jun 30 '26
What if you never used gradle?
5
u/Az4hiel Jul 01 '26
That's actually pretty funny to see this post now because we have just migrated away from the setup-gradle due to it's recent predatory license changes changes. As much as reimplementing the cache using more primitive GitHub-maintained action/cache was not necessarily trivial (but mostly because GitHub actions have such a terrible feedback loop) our internal implementation now runs faster and fully supports configuration cache reuse (unlike setup-gradle which needs manual patching ATM) - which is quite a meaningful improvement on small GH action runners.
13
u/PentakilI Jun 30 '26
PSA: pin your setup-gradle usage to v5 or earlier. gradle changed the license in v6 in an attempt to monetize it (https://blog.gradle.org/github-actions-for-gradle-v6)
posts like this have an extremely sour taste now
23
u/vips7L Jun 30 '26
Maven 🤝
12
u/Kjufka Jul 01 '26
I avoid gradle like fire... it's just wrong
2
u/blakep561 Jul 01 '26
Gradle needs to learn how to stay in it's lane and just build the dang jar and let the build machine handle all that other stuff.
-2
u/javaprof Jul 01 '26 edited Jul 01 '26
A lot of comments about maven cool, but reality is that on Github Actions Maven support out of the box much weaker than Gradle's:
So no build cache (maybe because in maven it was always unreliable?), no mvn version selection, no maven wrapper validation. No wonder why so many projects migrated from Maven over time, why sbt/gradle existsing. It cool tool but for production speed and ecosystem of Gradle just superior.
Even in maven project Github would suggest anything, but maven:
For maven, to be the better choice consistently (not just skill issue and haters) it's need to improve:
Basically, maven the same for last 10-15 years without major improvements in speed and stability, while Gradle improved a lot in speed, better IDE support and DSL:
And I can't wait for these projects to be released:
So what done maven? Lost Android ecosystem, Spring and Spring boot projects https://spring.io/blog/2020/06/08/migrating-spring-boot-s-build-to-gradle, Kotlin ecosystem (maven not flexible enough to build multiplatform support on top of it, regular JVM projects works just fine, but it's only 50% of Kotlin projects)
Overall, I feel that maven today is like Java 6-7: stuck in bad management, lack of will. Gradle is like Java 11+: good cadence, small releases, deprecations for removal and new features.
Btw, does Maven 4 fixing it's ugly resolution algo? https://jakewharton.com/nonsensical-maven-is-still-a-gradle-problem/