With these 5 Gradle benefits you'll NEVER use Maven again
Ғылым және технология
Would these Gradle benefits convince you to switch from Maven? Actually, they're so compelling that you may never want to use Maven again.
Find out for yourself, as we explore the top 5 Gradle benefits with a full comparison with Maven. It's time to reach new levels of developer productivity.
▶️ Introduction 0:00
▶️ Much faster 0:15
▶️ Concise build script 3:01
▶️ Easier to customise 4:40
▶️ Promotes build code reuse 6:53
▶️ Improved developer experience 8:43
▶️ Final thoughts 10:26
🚀 FREE QUICK-START GRADLE GUIDE tomgregory.com/gradlequickstart
🔥 ULTIMATE GRADLE BUILD BIBLE tomgregory.com/gradlebuildbible
VIDEO RESOURCES
🐘 Gradle vs Maven: Performance Comparison gradle.org/gradle-vs-maven-pe...
📖 Maven vs. Gradle comparison tomgregory.com/gradle/maven-v...
📖 This video in article format tomgregory.com/gradle/top-gra...
Пікірлер: 51
Thanks for watching the video. Which Gradle benefit did you find most compelling, and why?
Pretty insightful. Thank you.
Thank you for this very informative video. It clarified many questions regarding why we were not using maven at work.
Thank you so much, you rock, this happens to be exactly what I have been needing these days. :)
@TomGregoryTech
2 жыл бұрын
You're welcome! Thanks for the continued support.
@TomGregoryTech All your videos are very informative. Particularly across all your gradle related videos, the way you broke down gradle to make it easily understandable even for beginners is very good and very helpful.
Thank you so much!
Hi Tom thanks for keep sharing about Gradle! Would love to see how you start a new project with gradle and setting up the module
@TomGregoryTech
2 жыл бұрын
You're welcome Kamal. This Gradle tutorial is the video for you then :) kzread.info/dash/bejne/X5ioxaeGfLHTnpM.html
Excellent
@TomGregoryTech
2 жыл бұрын
Thanks!
Really enjoying your content Tom, please keep it up! Unrelated question to the video, but do you have any tips for a developers like me working with languages other than Java (Python and TypeScript in my case) to get a role as a Java developer?
@TomGregoryTech
2 жыл бұрын
Hi Thomas. Thanks for your comments. I have worked with a few people who transitioned to Java within a company that was using several languages. One switched Python > Java. If you don't have that luxury, maybe you can get a slightly more junior position than you're used to, then climb back up once you have more Java experience. Just an idea :)
@thomasgeorge5261
2 жыл бұрын
@@TomGregoryTech thanks Tom, that's useful to know!
Hey Tom, i am freelancer and i completely with you, my current projects have maven as build tool, as i started to work and i saw this my face was like this :( Gradle has a much much much better documentaion
ive been using "gradle clean build" all along... sort of defeats the purpose of incremental build lol! oops. will only use "clean" in future if I actually need it. Thanks for the content btw
I always thought maven is a nightmare, but after a few years with gradle, now I enjoy migrating back to maven ;)
Fantastic!..."hint hint" LOL. so good! thank you I again learned some more! Gradle is becoming demystified incrementally. I can literally work and listen to this video and learn. Byte sized...;=)...to answer your final question in the video...Migrating from Maven to Gradle even for the highly motivated has the following "issues" (not exhaustive, nor applicable everywhere): [Gradle know how], [Risks of migration and therefore management support], ["if it aint broke..."], [Plugin concomitancy from Maven to Gradle], [Some Maven builds files are enormous, or are hierarchical...how would you migrate that?], [Buy-in or the politics of build in the workplace]...the list is long :=) If there was a MavenToGradleCoversion As A service...then maybe. i.e. to be supported during a migration process or even have it done for you while you learn; i can dream right. ;=)
@TomGregoryTech
Жыл бұрын
"MavenToGradleCoversion As A service" Great idea! I think it could work as a collaboration since there would be a lot of pre-requisite knowledge.
Custom tasks in gradle makes me move away from gradle. Nowadays, if you want faster maven, you'd use mvnd.
Hi Tom. The most compelling feature for me is the Kotlin DSL because its typesafe. If something is unclear to me I just can directly jump into the sources and see whats going on. I was just wondering why you are not using the Kotlin DSL?
@TomGregoryTech
2 жыл бұрын
Hi S B. Yes Kotlin DSL is good. I'm not using it in some of my videos right now because a) I'm waiting for it to get a bit more momentum and b) I don't have as much experience with it as the Groovy DSL.
do the incremental builds or daemon matter if it is being spun up through a docker container/image? if not, which is faster in this scenario?
@TomGregoryTech
Жыл бұрын
Hi Mike. If you start Gradle within a short-lived Docker container, you won't benefit from an already running daemon. So startup will be slower. Similar story with incremental build. Consider persisting Gradle's caches for faster builds. I show you how to do this in GItHub in this video kzread.info/dash/bejne/k2uIlK-OYs-TldY.html
Is Gradle also faster in CI (i.e. without a cache, without a daemon)?
@TomGregoryTech
2 жыл бұрын
I haven't done this test myself but according to the Gradle article it is still faster. I would want to do an independent test though to make sure.
How (29s + 1s +1 s) / 3 = 1s??? Maven is lot more wordy? One pom file vs two .gradle files and 2 directories! I have to say that maven log is much better. Gradle sometimes crashes, and doesn't tell you why!
How long have you been using Gradle? Yesterday I spent my whole afternoon and evening to setup a simple Multi-Project build for 2 libraries with Kotlin DSL and Kotlin implementation language. It had so many quirks. First, gradle init generated a fairly complex structure. I added publishing just to dig 5 places where project.version is available. Then I find that it published corrupt metadata, which lead to a NPE on the consumer's side. Different Kotlin and Java JVM targets. Old Kotlin version. Setting up integration tests - pain in the ass and a complex mess of source sets and classpath hell of configuration. And many more WTFs. I have 10 years of Maven and 2 years of Gradle experience. They both are good and both suck in many ways.
@jamesdean4148
2 жыл бұрын
But I really don't know which one sucks more. Imperative Gradle scripts impose a myriad of inconsistent idioms, making them a pain to maintain. Incremental build works until your first test forgets that it was ment to be incremental.. at the end, Gradle is a source of WTFs too, but a faster, more complex WTF machine than Maven.
@TomGregoryTech
2 жыл бұрын
Hi James. Great summary. Thanks for sharing your experience. I've been using Gradle for 5 years. You're right, it is complex. It took me a long time to wrap my head around it. I've created many videos here to try to make the tool more approachable.
for some reason there are more good quality gradle plugins, when there are mavens. even widely used maven plugins do crazy stuff if you look closer to them. like overwriting generated source files in the target dir. I think the craziness of maven lifecycle creeps into people
I wish I could use it, did for a while but the JavaFX native plugin simply doesn't work for quite a while now (technically it does, but an important task isn't without manually hacking it in). Maintainers tell me it's because of them being small and Gradle changing too often. :(
@TomGregoryTech
2 жыл бұрын
Interesting. Yes we do have breaking changes to take care of in major Gradle releases. Guess you're stuck on Maven for now then?
@guai9632
2 жыл бұрын
why do one even need a plugin for fx? isn't it just place fxml along with your classes and just run it?
1 sec or 10 sec or 1 min - it just does not change anything.
Gradle have extra benefit: writing script in Kotlin
Moved to Gradle last year. I hate maven even more now.
How about SBT though ? 🤔
@TomGregoryTech
2 жыл бұрын
Hi Dany. I haven't worked with Scala projects yet.
@dany3370
2 жыл бұрын
People use it for java projects too
@TomGregoryTech
2 жыл бұрын
Hi Dany. I wasn't aware of that so thanks for filling me in. I'm interested to know why you'd choose SBT for a pure Java project.
@dany3370
2 жыл бұрын
I dont have an opinion about it, I thought you could clear this up for me 😄 I guess people like it for simplicity, dont know about it performance though
don't be afraid of XML just avoid it in your life :)
actually yes i do XD
This guy is trying to convince me to never use maven again and replace it with gradle. well I am using ant! :P
@AndiRadyKurniawan
Жыл бұрын
How do you handle the dependencies?
@ramdaneoualitsen1323
Жыл бұрын
@@AndiRadyKurniawan i was just kidding of course:P
You know it's all bullshit when the FIRST point depends on the gradle daemon being warmed up.
developer experience sucks
concise? no, its obfuscated, full of magic and gotchas
@vasiliychernov2123
10 ай бұрын
If you don't maintain your build scripts properly, that is.