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

КОМЕНТАРІ • 118

  • @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 Рік тому +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  11 місяців тому +1

      Glad it was helpful!

  • @badripaudel77
    @badripaudel77 2 роки тому +3

    Amazing as always. Nice & Easy ❤️

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

  • @byronjohnson2762
    @byronjohnson2762 Рік тому

    Extremely helpful and well put together!

  • @ritwikgupta6025
    @ritwikgupta6025 Рік тому

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

  • @user-ux2zl1ry6x
    @user-ux2zl1ry6x 2 місяці тому

    Very simple and easy to understand tutorial. Thank you

  • @quasa0
    @quasa0 9 місяців тому

    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.

  • @rafaelbraga3d
    @rafaelbraga3d Місяць тому

    Really awesome tutorial! Thanks a lot

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

  • @VanshitaGupta-pj6bo
    @VanshitaGupta-pj6bo Рік тому

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

  • @kolotunbabubay
    @kolotunbabubay Рік тому

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

  • @MihirKulkarni3
    @MihirKulkarni3 Рік тому

    Great crash course. Thanks for sharing!

  • @KD0MOO
    @KD0MOO День тому

    Thanks for posting this!

  • @sergey_tech
    @sergey_tech 6 місяців тому

    Awesome explanation, thank you!

  • @AayushGore-
    @AayushGore- Місяць тому

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

  • @ashishjha9262
    @ashishjha9262 Рік тому

    Amazing explanation!! Thanks :)

  • @timani27
    @timani27 Рік тому

    The most effective and effective over of Gradle

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

  • @vamshikrishnachowdary2878
    @vamshikrishnachowdary2878 Рік тому

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

  • @InderjeetSingh-jp3ln
    @InderjeetSingh-jp3ln 2 роки тому +4

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

  • @NguyenHung-bf8jw
    @NguyenHung-bf8jw 11 місяців тому

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

    • @MarcoCodes
      @MarcoCodes  11 місяців тому

      You're very welcome!

  • @divyaagrawal810
    @divyaagrawal810 Рік тому

    Thank you for this!

  • @misaelramirez7550
    @misaelramirez7550 Рік тому

    Great vid!

  • @DavidePavan
    @DavidePavan Рік тому

    Super Marco!

  • @eslamgad3723
    @eslamgad3723 11 місяців тому

    Thank you sir, very useful

  • @MasoodAliKhanPathan
    @MasoodAliKhanPathan Рік тому

    Nice one!

  • @michelchaghoury9629
    @michelchaghoury9629 2 роки тому

    amazing channel keep going

  • @pad5724
    @pad5724 2 роки тому

    Great, thanks

  • @pbkvijaykulkarni6404
    @pbkvijaykulkarni6404 4 місяці тому

    Very nice

  • @utkarshdevgan6199
    @utkarshdevgan6199 Рік тому

    you are very very underatted!!!!!

  • @dan110024
    @dan110024 2 місяці тому

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

  • @florianvanbondoc3539
    @florianvanbondoc3539 11 місяців тому

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

  • @anthroponymy
    @anthroponymy 2 роки тому

    As always you were amazing 🌍

    • @MarcoCodes
      @MarcoCodes  2 роки тому +1

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

    • @anthroponymy
      @anthroponymy 2 роки тому

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

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

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

  • @shubhankarmane3172
    @shubhankarmane3172 Рік тому

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

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

  • @MathieuBergounioux
    @MathieuBergounioux 3 місяці тому

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

  • @Jod4light
    @Jod4light 2 роки тому +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  2 роки тому +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 2 роки тому +1

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

    • @Jod4light
      @Jod4light 2 роки тому

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

  • @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 10 місяців тому

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

  • @curiossoul
    @curiossoul 10 місяців тому

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

  • @Christopher-pe6zj
    @Christopher-pe6zj 2 роки тому +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 роки тому +2

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

  • @jopadjr
    @jopadjr 11 місяців тому

    906th...Great explanation !!!

  • @filipemelo1408
    @filipemelo1408 Рік тому

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

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

  • @biswajitpattanayak9992
    @biswajitpattanayak9992 Рік тому +1

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

    • @MarcoCodes
      @MarcoCodes  Рік тому

      Not planned in the next quarter:(

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

  • @Basirafeef
    @Basirafeef Рік тому

    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  Рік тому +1

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

    • @Basirafeef
      @Basirafeef Рік тому

      @@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 Рік тому

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

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

  • @muraliaathi6118
    @muraliaathi6118 9 місяців тому

    @Marco Is it possible to debug build.gradle ?

    • @MarcoCodes
      @MarcoCodes  9 місяців тому

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

  • @masterten8599
    @masterten8599 11 місяців тому

    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  11 місяців тому

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

  • @pavel7650
    @pavel7650 Рік тому

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

    • @MarcoCodes
      @MarcoCodes  Рік тому

      Without the actual error message, no chance

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

  • @zzzzzzzzzzsh
    @zzzzzzzzzzsh 2 роки тому

    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  2 роки тому +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 2 роки тому

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

  • @venkatvikram8241
    @venkatvikram8241 13 днів тому

    hey Marco, I'm having an error saying "settings.gradle" could not be compiled

    • @venkatvikram8241
      @venkatvikram8241 13 днів тому

      nevermind, I had a version mismatch which caused the error

  • @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 Місяць тому

      @@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 4 місяці тому +1

    Would you migrate from groovy to Kotlin?

    • @MarcoCodes
      @MarcoCodes  4 місяці тому

      For legacy projects, nope.

  • @ArtificialDjDAGX
    @ArtificialDjDAGX 5 місяців тому

    so, why do you recommend kotlin over groovy?

    • @MarcoCodes
      @MarcoCodes  5 місяців тому +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 10 місяців тому

    It would be great if you put subtitles

    • @MarcoCodes
      @MarcoCodes  10 місяців тому

      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 Місяць тому

    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  22 дні тому

      Can't help out here, sorry.