Gradle Tutorial - Crash Course
Вставка
- Опубліковано 6 лип 2024
- Ever looked for a comprehensive tutorial to Gradle that is fun and entertaining at the same time?
In this video, you'll learn how to use Gradle like a professional: From using the Gradle wrapper, using Gradle together with IDEs and Gradle basics like build.gradle and settings.gradle, to running commands (clean build) as well as understanding multi-project Gradle builds - by the end of it, there won't be many questions left when it comes to Gradle.
► References
REF 1 - GitHub Repo: github.com/marcobehlerjetbrai...
► Timestamps
00:00 Intro
00:28 Cloning The Sample Project
01:04 Gradlew Build - First Try
01:37 Gradle Wrapper
02:24 settings.gradle
03:04 Gradle Multi-Projects
04:24 Gradle Project Structure Explained
07:01 Gradlew Clean
07:19 Gradlew Test
08:56 Gradle's Smart Features
09:52 Build.Gradle Explained
11:06 Dependency Scopes
12:11 Adding Dependencies
12:34 Package Search
14:19 Implementation Scope
14:51 API Scope
15:20 Plugins
16:47 Repositories
17:20 Modifying Gradle Tasks
17:38 Common Gradle Issues
18:40 Creating New Gradle Projects
19:23 Gradle Init
21:44 Outro
► FOLLOW ME
/ marcobehler
www.marcobehler.com
This is the only video which I found to cover gradle concepts mostly used in real-time projects in enterprise world. Thanks a Ton, Marco! this video was really helpful.
Thank You Marco for taking out your time and explaining things so well. I am grateful 🙏🏻.
watched so many videos, but never understood Gradle they way you did, thank you so much! God bless you.
Amazing crash course. Thank you Marco
I have been using gradle for a long time. but I didn't deep dive into it to know how things work. thanks for taking your time to put this good material.
Glad it was helpful!
Amazing as always. Nice & Easy ❤️
Jeez, thank you. This were enough information to get me started. Android Studio generated the enigma of the grandle-build toolchain for me. I did not really know what happened or where to look things up... now this is way more clear. Thank you!
Extremely helpful and well put together!
Thank You Marc😍 I don't know have word to express my gratitude toward you.
Very simple and easy to understand tutorial. Thank you
This was a great video. Coming from C++ / Python, more recently Go / Java background, preparing a coding assignment in Kotlin with Gradle for my new job. Watched the video on 1.5x, great and exactly what I wanted.
Really awesome tutorial! Thanks a lot
Thanks for this. Actually from some days I'm finding good tutorial of grade 🔥
This is one of the best and most efficient videos about Gradle with Groovy. If only it included Kotlin too. Other videos, despite being newer, teach obsolete Groovy syntax. Thanks.
Thanks!
Best compact version of all the major information regrading gradle- saved a lot of tym..thanks!
Glad you enjoyed it!
Finally something informative on the topic. 😀 Thx for the video.
Great crash course. Thanks for sharing!
You are welcome :)
Thanks for posting this!
Awesome explanation, thank you!
Thank you so much for being such great to the point! :)
Amazing explanation!! Thanks :)
The most effective and effective over of Gradle
You are amazing. You are a good teacher. its first time on your channel subscribed ! . Thank you very much for your efforts for this video.
Thanks and welcome
I just loved it, you made this topic from cherry on the tree to cherry on the cake . Thank you a lot.
Superb work!
Please do also make one detailed crash course on GIT (using Intellij)
Thank you for this video. Your explaining is so well. Thanks 💯💯💯
You're very welcome!
Thank you for this!
Great vid!
Super Marco!
Thank you sir, very useful
Nice one!
amazing channel keep going
Great, thanks
Very nice
you are very very underatted!!!!!
Thank you.
"But then I thought noo f.. lets forget that" - good save, sir!
new subscriber here, thanks that you explain all those confusing parts which are the most annoying
Happy to help!
As always you were amazing 🌍
Hey NavinKumar, I was pretty sure I replied to another comment of yours that has been deleted meanwhile? About Clink etc?
@@MarcoCodes yes i have added the comment but i dont know who deleted it. i was waiting for your reply but looks like that comment is deleted i dont know who did that. any way hope you got my message. I have started learning JAVA so i need some useful resource from people like you. and project related video should be use full to peoples like us. any way you are rocking and keep the pace.
Hey Marco, great video !
I'm interested in the follow up video. I just inherited a behemoth that used gradle and I'm a newb.
I also have a build.gradle in my root project, not sure what it's supposed to accomplish though 😅
Thank you driden! The next Gradle video will have to wait a while though, a couple of others will follow first :) Is the build.gradle empt yin the root project? Or some general settings that get inherited across submodules?
Thanks Marco, for the wonderful demo! I am just getting started with Gradle and this really helped.
On a separate note, I am a bit curious on how to enable the command prompter and color codes in Windows Cmd prompt. Would be great if you could with that too. 😊
github.com/chrisant996/clink
great video marco, when will the follow-up video be released?
Not sure yet
What are your video making tools ? Amazing videos. Could you tell me what screen recorder, web cam recorder do you use for making these videos? I want to try them. Thanks.
Hey. I'm mostly using Camtasia to record. The specific make of the camera etc actually don't really matter at the beginning, any good webcam/camera will do, though I'm using a Sony ZV-1.
"Fun _and_ entertaining at the same time"? It's almost scary how enjoyable it would be.
:D
Another great video Marco!
Just one point, when I clone the git repo and run "gradlew build" and then "gradlew test", the index.html file is missing. I have just "my-webapp/build/test-results/test/binary/" folder with empty files.
Hey, so, first of all running either gradlew test or gradlew build is enough, because build includes test like shown in the video. And then you'll find the report in "my-webapp/build/reports/.." I'll quickly have to double check what the video says :D Thanks!
@@MarcoCodes The video also shows "build/reports". Try that out and see if the index.html file is there :)
@Marco Behler Yes, my fault, thanks :)
21:32 : "then come back here, see the link for the next video" Sorry I can't see it. Great video; would just love to see the next one. Thanks.
It hasn't been made yet :)
@@MarcoCodesIs it coming out anytime soon? :)
hey, great explanation. could you attach link to next video please.
I legit lol'd when you said you were gonna sell me a course for the other 10%.. I was thinking well at least the guy's honest straight away.. I'm still waiting for the VPN plug.. lols!
:) No 10% courses, no VPN, no Bitcoin, no NFT plugs ever on here.
906th...Great explanation !!!
I hope this course is good, because I came from C# where I was used with easy life and Visual studio hehe
What is a name of the plugin you are using for command line in order to have autocompletion?
It is this: github.com/chrisant996/clink
when do you plan to release the follow up video on gradle?
Not planned in the next quarter:(
Hey, amazing video! Is there another gradle video coming?
Hey Domas, not planned at the moment. What specifically would you like to learn about in a follow-up?
@@MarcoCodes Would like to see about the most modern version of a gradle file and cleanups, that you mentioned around 18:20. Thanks for this Amazing video!
thanks for sharing great knowledge sir.
sir i created an app for multiple people from the same source with different name, themes, and server. the problem is when i update one i need to update others too.
is there a why to create multiple apps from the same source with different name, themes, server and google's .json configuration file from one project with different source sets.
thanks.
Impossible to give an answer without knowing your project in detail.
@@MarcoCodes thanks for reply sir,
i have a sample app and i want to build other multiple apps from the same code base for other customers with app name , theme, server etc changes.
is it possible with gradle to set applicationId, sourceSet and add google's .json configuration file.?
sir, i want to create different flavors of my app for different customers with different app name, theme and different google admobe.
thanks
the problem is when i update customer 1 app i need to update others to with the same change.
What happened to the rest of the promissed Gradle videos you mentioned you will do
Not enough demand for them, for now, so they got pushed further down the backlog.
@Marco Is it possible to debug build.gradle ?
See stackoverflow.com/questions/28437636/how-to-debug-a-gradle-build-gradle-file-in-a-debugger-with-breakpoints
I am using flutter with vscode and it want me to use gradle init but i don't see a flutter option as one of them
As I am using IntelliJ IDEA, I can't tell.
Could not compile settings file 'C:\Java\learning_gradle\gradle-tutorial\settings.gradle'.
Without the actual error message, no chance
This video is missing the part where you explain building a project that doesn't come with the gradlew(.bat) file and folder, where you need to install gradle (add its bin folder to your environment variables) and run "gradle build" (from the folder with the settings.gradle((I assume since its unique while there can be more build.gradle files [it was the first path I tried and it worked]))) this video got me half way there (the rest was a different video and then some guess-work).
Hey Jim! It's basically covered at 18:40, where I show how to use package managers to install Gradle - even though the manual way you described also works just fine. That being said, Gradle projects without wrappers are somewhat in the minority nowadays.
Thanks for yor great explanation!
Even though your explanation is very clear and simple, I think maven is too simple to understand and to quickly get started with compared to gradle. It might because I have worked with maven alot then try to map things to Gradle 😬
I actually think along similar lines. The thing is, Gradle is _super_ powerful, but just a few people I know put in the time and effort to really learn and understand it - as opposed to copy & pasting random Stackoverflow snippets. With Maven, you cannot shoot yourself in the foot that easily.
@@MarcoCodes Agree with you!
I think Maven can't let you shoot yourself in the foot because of thr power of the Xml as there is that schema which puts validation and constraints in how you configure the maven settings. As you said Gradle is very powerful for advanced thing, it gives you more flexibility and that flexibility comes with a cost!
hey Marco, I'm having an error saying "settings.gradle" could not be compiled
nevermind, I had a version mismatch which caused the error
i dont find the follow up gradle tutorial video you're speaking about at the end
That is because it hasn't been recorded yet :)
@@MarcoCodes would be interested in that :)
@@MarcoCodes Waiting for it
Can you do a video tutorial on ODFDOM for java
Noted, but can't promise anything.
Would you migrate from groovy to Kotlin?
For legacy projects, nope.
so, why do you recommend kotlin over groovy?
Hard to put down into a YT comment, maybe in the next video :)
is this a beginner video?
Well, you could give it a watch and find out :) I would say so.
@@MarcoCodes Well I did watch but I feel like it's mid-advance level. You did not even explain what's gradle at all.
It would be great if you put subtitles
Are there no auto-generated ones?
Marc will you please a make video One small Gradle Real Time Gradle Project Please _/\_ 🤏🙏
why cant anyone do a simple tutorial for this shit but they have to put all the shit they know just a step by step
You won't believe it, but this -is- the simple tutorial and close to 5% of what Gradle offers.
@MarcoCodes yeah yeah jibber jabber
jabber jibber yeah yeah
Kindly tell me, how to resolve this error message while building android; BUILD FAILED in 2s
Command failed with exit code 1: C:\Users\USER\GWLAPP2\platforms\android\tools\gradlew.bat cdvBuildDebug
Can't help out here, sorry.