Gradle Tutorial - Crash Course

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 มิ.ย. 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

ความคิดเห็น • 115

  • @akhiljaiswal9468
    @akhiljaiswal9468 8 หลายเดือนก่อน +2

    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.

  • @shreyagarwal6828
    @shreyagarwal6828 ปีที่แล้ว +3

    Thank You Marco for taking out your time and explaining things so well. I am grateful 🙏🏻.

  • @VikashSharmaVS
    @VikashSharmaVS 6 หลายเดือนก่อน +1

    watched so many videos, but never understood Gradle they way you did, thank you so much! God bless you.

  • @burak4716
    @burak4716 ปีที่แล้ว +5

    Amazing crash course. Thank you Marco

  • @yohannestz9893
    @yohannestz9893 11 หลายเดือนก่อน +2

    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.

    • @MarcoCodes
      @MarcoCodes  10 หลายเดือนก่อน +1

      Glad it was helpful!

  • @MrRecorder1
    @MrRecorder1 ปีที่แล้ว

    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!

  • @ritwikgupta6025
    @ritwikgupta6025 ปีที่แล้ว

    Thank You Marc😍 I don't know have word to express my gratitude toward you.

  • @badripaudel77
    @badripaudel77 ปีที่แล้ว +3

    Amazing as always. Nice & Easy ❤️

  • @byronjohnson2762
    @byronjohnson2762 ปีที่แล้ว

    Extremely helpful and well put together!

  • @user-ux2zl1ry6x
    @user-ux2zl1ry6x หลายเดือนก่อน

    Very simple and easy to understand tutorial. Thank you

  • @VanshitaGupta-pj6bo
    @VanshitaGupta-pj6bo ปีที่แล้ว

    Best compact version of all the major information regrading gradle- saved a lot of tym..thanks!

    • @MarcoCodes
      @MarcoCodes  ปีที่แล้ว

      Glad you enjoyed it!

  • @dan110024
    @dan110024 หลายเดือนก่อน

    "But then I thought noo f.. lets forget that" - good save, sir!

  • @abhishekkumar-ei5hl
    @abhishekkumar-ei5hl ปีที่แล้ว

    Thanks for this. Actually from some days I'm finding good tutorial of grade 🔥

  • @rafaeel731
    @rafaeel731 ปีที่แล้ว +5

    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.

  • @kolotunbabubay
    @kolotunbabubay ปีที่แล้ว

    Finally something informative on the topic. 😀 Thx for the video.

  • @rafaelbraga3d
    @rafaelbraga3d หลายเดือนก่อน

    Really awesome tutorial! Thanks a lot

  • @quasa0
    @quasa0 8 หลายเดือนก่อน

    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.

  • @MihirKulkarni3
    @MihirKulkarni3 ปีที่แล้ว

    Great crash course. Thanks for sharing!

    • @MarcoCodes
      @MarcoCodes  ปีที่แล้ว

      You are welcome :)

  • @AayushGore-
    @AayushGore- 22 วันที่ผ่านมา

    Thank you so much for being such great to the point! :)

  • @CyberGenious24
    @CyberGenious24 11 หลายเดือนก่อน

    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.

    • @MarcoCodes
      @MarcoCodes  10 หลายเดือนก่อน

      Thanks and welcome

  • @sergey_tech
    @sergey_tech 5 หลายเดือนก่อน

    Awesome explanation, thank you!

  • @ashishjha9262
    @ashishjha9262 ปีที่แล้ว

    Amazing explanation!! Thanks :)

  • @NguyenHung-bf8jw
    @NguyenHung-bf8jw 11 หลายเดือนก่อน

    Thank you for this video. Your explaining is so well. Thanks 💯💯💯

    • @MarcoCodes
      @MarcoCodes  10 หลายเดือนก่อน

      You're very welcome!

  • @timani27
    @timani27 ปีที่แล้ว

    The most effective and effective over of Gradle

  • @InderjeetSingh-jp3ln
    @InderjeetSingh-jp3ln ปีที่แล้ว +4

    Superb work!
    Please do also make one detailed crash course on GIT (using Intellij)

  • @vamshikrishnachowdary2878
    @vamshikrishnachowdary2878 ปีที่แล้ว

    I just loved it, you made this topic from cherry on the tree to cherry on the cake . Thank you a lot.

  • @divyaagrawal810
    @divyaagrawal810 ปีที่แล้ว

    Thank you for this!

  • @eslamgad3723
    @eslamgad3723 10 หลายเดือนก่อน

    Thank you sir, very useful

  • @misaelramirez7550
    @misaelramirez7550 ปีที่แล้ว

    Great vid!

  • @DavidePavan
    @DavidePavan ปีที่แล้ว

    Super Marco!

  • @MasoodAliKhanPathan
    @MasoodAliKhanPathan ปีที่แล้ว

    Nice one!

  • @michelchaghoury9629
    @michelchaghoury9629 ปีที่แล้ว

    amazing channel keep going

  • @MathieuBergounioux
    @MathieuBergounioux 2 หลายเดือนก่อน

    "Fun _and_ entertaining at the same time"? It's almost scary how enjoyable it would be.

  • @pad5724
    @pad5724 ปีที่แล้ว

    Great, thanks

  • @shyamthe1
    @shyamthe1 9 หลายเดือนก่อน

    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. 😊

    • @MarcoCodes
      @MarcoCodes  9 หลายเดือนก่อน +1

      github.com/chrisant996/clink

  • @utkarshdevgan6199
    @utkarshdevgan6199 ปีที่แล้ว

    you are very very underatted!!!!!

  • @florianvanbondoc3539
    @florianvanbondoc3539 10 หลายเดือนก่อน

    new subscriber here, thanks that you explain all those confusing parts which are the most annoying

    • @MarcoCodes
      @MarcoCodes  10 หลายเดือนก่อน

      Happy to help!

  • @driden1987
    @driden1987 ปีที่แล้ว +1

    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 😅

    • @MarcoCodes
      @MarcoCodes  ปีที่แล้ว

      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?

  • @pbkvijaykulkarni6404
    @pbkvijaykulkarni6404 3 หลายเดือนก่อน

    Very nice

  • @mediamanson
    @mediamanson ปีที่แล้ว

    As always you were amazing 🌍

    • @MarcoCodes
      @MarcoCodes  ปีที่แล้ว +1

      Hey NavinKumar, I was pretty sure I replied to another comment of yours that has been deleted meanwhile? About Clink etc?

    • @mediamanson
      @mediamanson ปีที่แล้ว

      @@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.

  • @anandd2021
    @anandd2021 ปีที่แล้ว

    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.

    • @MarcoCodes
      @MarcoCodes  ปีที่แล้ว

      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.

  • @shubhankarmane3172
    @shubhankarmane3172 ปีที่แล้ว

    great video marco, when will the follow-up video be released?

  • @MrMikomi
    @MrMikomi ปีที่แล้ว

    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.

    • @MarcoCodes
      @MarcoCodes  ปีที่แล้ว

      It hasn't been made yet :)

    • @tanieltari4539
      @tanieltari4539 9 หลายเดือนก่อน

      ​@@MarcoCodesIs it coming out anytime soon? :)

  • @Jod4light
    @Jod4light ปีที่แล้ว +1

    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.

    • @MarcoCodes
      @MarcoCodes  ปีที่แล้ว +1

      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!

    • @marcobehler1395
      @marcobehler1395 ปีที่แล้ว +1

      @@MarcoCodes The video also shows "build/reports". Try that out and see if the index.html file is there :)

    • @Jod4light
      @Jod4light ปีที่แล้ว

      ​ @Marco Behler Yes, my fault, thanks :)

  • @Christopher-pe6zj
    @Christopher-pe6zj ปีที่แล้ว +1

    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!

    • @MarcoCodes
      @MarcoCodes  ปีที่แล้ว +2

      :) No 10% courses, no VPN, no Bitcoin, no NFT plugs ever on here.

  • @jopadjr
    @jopadjr 10 หลายเดือนก่อน

    906th...Great explanation !!!

  • @curiossoul
    @curiossoul 9 หลายเดือนก่อน

    hey, great explanation. could you attach link to next video please.

  • @filipemelo1408
    @filipemelo1408 ปีที่แล้ว

    I hope this course is good, because I came from C# where I was used with easy life and Visual studio hehe

  • @domasklimavicius3907
    @domasklimavicius3907 ปีที่แล้ว

    Hey, amazing video! Is there another gradle video coming?

    • @MarcoCodes
      @MarcoCodes  ปีที่แล้ว

      Hey Domas, not planned at the moment. What specifically would you like to learn about in a follow-up?

    • @sagaryedireswarapu
      @sagaryedireswarapu ปีที่แล้ว +1

      @@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!

  • @user-nf9od6sz2y
    @user-nf9od6sz2y ปีที่แล้ว

    What is a name of the plugin you are using for command line in order to have autocompletion?

    • @MarcoCodes
      @MarcoCodes  ปีที่แล้ว

      It is this: github.com/chrisant996/clink

  • @pavel7650
    @pavel7650 ปีที่แล้ว

    Could not compile settings file 'C:\Java\learning_gradle\gradle-tutorial\settings.gradle'.

    • @MarcoCodes
      @MarcoCodes  ปีที่แล้ว

      Without the actual error message, no chance

  • @biswajitpattanayak9992
    @biswajitpattanayak9992 ปีที่แล้ว +1

    when do you plan to release the follow up video on gradle?

    • @MarcoCodes
      @MarcoCodes  ปีที่แล้ว

      Not planned in the next quarter:(

  • @masterten8599
    @masterten8599 10 หลายเดือนก่อน

    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

    • @MarcoCodes
      @MarcoCodes  10 หลายเดือนก่อน

      As I am using IntelliJ IDEA, I can't tell.

  • @Basirafeef
    @Basirafeef 11 หลายเดือนก่อน

    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.

    • @MarcoCodes
      @MarcoCodes  11 หลายเดือนก่อน +1

      Impossible to give an answer without knowing your project in detail.

    • @Basirafeef
      @Basirafeef 11 หลายเดือนก่อน

      @@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

    • @Basirafeef
      @Basirafeef 11 หลายเดือนก่อน

      the problem is when i update customer 1 app i need to update others to with the same change.

  • @muraliaathi6118
    @muraliaathi6118 8 หลายเดือนก่อน

    @Marco Is it possible to debug build.gradle ?

    • @MarcoCodes
      @MarcoCodes  8 หลายเดือนก่อน

      See stackoverflow.com/questions/28437636/how-to-debug-a-gradle-build-gradle-file-in-a-debugger-with-breakpoints

  • @zzzzzzzzzzsh
    @zzzzzzzzzzsh ปีที่แล้ว

    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 😬

    • @MarcoCodes
      @MarcoCodes  ปีที่แล้ว +1

      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.

    • @zzzzzzzzzzsh
      @zzzzzzzzzzsh ปีที่แล้ว

      @@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!

  • @CryptoCodeZone
    @CryptoCodeZone 7 หลายเดือนก่อน

    What happened to the rest of the promissed Gradle videos you mentioned you will do

    • @MarcoCodes
      @MarcoCodes  7 หลายเดือนก่อน

      Not enough demand for them, for now, so they got pushed further down the backlog.

  • @jim0_o
    @jim0_o ปีที่แล้ว

    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).

    • @MarcoCodes
      @MarcoCodes  ปีที่แล้ว

      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.

  • @everydayasmr8440
    @everydayasmr8440 ปีที่แล้ว

    i dont find the follow up gradle tutorial video you're speaking about at the end

    • @MarcoCodes
      @MarcoCodes  ปีที่แล้ว +2

      That is because it hasn't been recorded yet :)

    • @everydayasmr8440
      @everydayasmr8440 ปีที่แล้ว

      @@MarcoCodes would be interested in that :)

    • @imspzero8730
      @imspzero8730 15 วันที่ผ่านมา

      @@MarcoCodes Waiting for it

  • @jamesvandiver7193
    @jamesvandiver7193 ปีที่แล้ว

    Can you do a video tutorial on ODFDOM for java

    • @MarcoCodes
      @MarcoCodes  ปีที่แล้ว

      Noted, but can't promise anything.

  • @dleonardo3238
    @dleonardo3238 3 หลายเดือนก่อน +1

    Would you migrate from groovy to Kotlin?

    • @MarcoCodes
      @MarcoCodes  3 หลายเดือนก่อน

      For legacy projects, nope.

  • @ArtificialDjDAGX
    @ArtificialDjDAGX 5 หลายเดือนก่อน

    so, why do you recommend kotlin over groovy?

    • @MarcoCodes
      @MarcoCodes  4 หลายเดือนก่อน +1

      Hard to put down into a YT comment, maybe in the next video :)

  • @enesb4797
    @enesb4797 ปีที่แล้ว +3

    is this a beginner video?

    • @MarcoCodes
      @MarcoCodes  ปีที่แล้ว +2

      Well, you could give it a watch and find out :) I would say so.

    • @enesb4797
      @enesb4797 ปีที่แล้ว +1

      @@MarcoCodes Well I did watch but I feel like it's mid-advance level. You did not even explain what's gradle at all.

  • @ExplorerKusakabe
    @ExplorerKusakabe 9 หลายเดือนก่อน

    It would be great if you put subtitles

    • @MarcoCodes
      @MarcoCodes  9 หลายเดือนก่อน

      Are there no auto-generated ones?

  • @ritwikgupta6025
    @ritwikgupta6025 ปีที่แล้ว

    Marc will you please a make video One small Gradle Real Time Gradle Project Please _/\_ 🤏🙏

  • @Sisyphus.
    @Sisyphus. ปีที่แล้ว

    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

    • @MarcoCodes
      @MarcoCodes  ปีที่แล้ว

      You won't believe it, but this -is- the simple tutorial and close to 5% of what Gradle offers.

    • @Sisyphus.
      @Sisyphus. ปีที่แล้ว

      @MarcoCodes yeah yeah jibber jabber

    • @MarcoCodes
      @MarcoCodes  ปีที่แล้ว

      jabber jibber yeah yeah

  • @willaugust7824
    @willaugust7824 19 วันที่ผ่านมา

    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

    • @MarcoCodes
      @MarcoCodes  วันที่ผ่านมา

      Can't help out here, sorry.