Working with Gradle in IntelliJ IDEA

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ส.ค. 2024
  • In this video we're going to look at how to create, open, and work with Gradle projects in IntelliJ IDEA
    00:00​ - Intro
    00:17 - Creating a new project
    02:18​ - Tour of a Gradle project
    04:41​ - The build.gradle file
    05:47​ - Gradle dependencies
    08:09​ - Source set directories
    08:56​ - Group ID and version number
    09:45​ - Opening a Gradle project
    11:52​ - Opening the Gradle tool window
    12:46​ - Setting an abbreviation
    13:43​ - Running Gradle tasks
    15:17​ - Syncing and reloading
    16:52​ - Gradle settings
    18:25​ - Gradle wrapper
    *Author: Trisha Gee
    For more information, go to: jb.gg/working-with-gradle
    Download IntelliJ IDEA: jb.gg/download-intellij-idea​
    Top 15 IntelliJ IDEA shortcuts: • Top 15 IntelliJ IDEA s... ​
    Join us:
    Website jb.gg/website​
    Blog jb.gg/blog​
    Twitter / intellijidea​
    Facebook / ​
    Category: Building Projects
    #gradle #intelliJIDEA​ #intelliJ​ #jetbrains​ #java​ #programming​ #intellijidea_tutorial

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

  • @Richard-jk5iq
    @Richard-jk5iq 3 ปีที่แล้ว +52

    I want more videos like this one! It do help me understand what gradle is and how to use gradle in IDEA. Thank you!

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

      Glad it was helpful!
      More to come!

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

    I've never even touched Gradle before, so this video was a real life saver!

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

    Very informative and a lot of knowledge within few mins..Great

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

    Thanks for sharing this video. Very useful. I'm also looking at how to create a gradle build for a simple Java project. A simple hello world sample would be great.

  • @ravi-thestar8501
    @ravi-thestar8501 ปีที่แล้ว +1

    clear and concise, excellent video on gradle

  • @VasanthKumar-uw6mg
    @VasanthKumar-uw6mg 3 ปีที่แล้ว +1

    Rich in content. Great explanation. Thanks.

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

    But HOW DO I GET GRADLE ON THE LEFT SIDE
    It says Gradle is installed, but it doesn't show up on the left side of the new project window.

  • @krmanoj0114
    @krmanoj0114 3 ปีที่แล้ว

    Great tutorial, thanks

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

    Really it is worthy to watch. Thank you ❤️

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

    Thx for making! 👍

  • @ayodejidasylva
    @ayodejidasylva 3 ปีที่แล้ว

    Nice and precise

  • @princ363
    @princ363 3 ปีที่แล้ว

    Thanks, useful if any intellij maven user starting with intellij gradle.. 👍

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

    Very helpful!

  • @redouaneezzahir7316
    @redouaneezzahir7316 2 ปีที่แล้ว

    Thank you very much.

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

    Excellent work and very helpful

  • @moaxcp
    @moaxcp 3 ปีที่แล้ว

    Is there a video for quickly setting up a composite build? I have been trying to explain how easy this is with intellij but can't find a good video for it.

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

    So recently I was working on an old project having Java 8 compatible with Gradle Build.
    The build was always getting failed even though I had selected Java8 in project structure. It was not able to recognise wsimport.
    Finally got to know Gradle uses default jdk which you have to change after watching this video !

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

    Awesome tutorial.

  • @prakharbansal9079
    @prakharbansal9079 3 ปีที่แล้ว

    Extremely helpful

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

    It's a nice tutorial. But I have a question: Why I get no completion for dependency when I type implemention like 12:15?

  • @amoljoshi6546
    @amoljoshi6546 3 ปีที่แล้ว

    On open project action, in the build window I see error "Unable to find valid certification path to requested target".
    Unfortunately it does not mention for which target it's having issue... where can I see that details?

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

    Thx, it`s very usefull

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

    Great, usefull

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

    Ok, I searched for ways to change gradle version and change JVM used in project, found answers to both in the 'gradle settings' and 'gradle wrapper' chapters of this video. So it is helpful. Now I need the answer to more complex question: how to configure settings in idea for removing "Found Invalid Gradle JVM configuration" with JAVA_HOME variable set to openjdk 18

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

    5:56 will "add maven artifact" be added to Android studio? so many cool features and they are not working :(

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

    I am confused, why, unlike maven projects, intellij is detecting main and test folders as modules rather than directories for gradle projects?

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

    My New Project Wizard looks completely different and there is no Gradle in the left side bar. Is this a version issue? Intellij IDEA 2022.1

  • @uppalaadarsh3261
    @uppalaadarsh3261 2 ปีที่แล้ว

    Which gradle version we need to use in gradle_wrapper.properriess.
    Currently with 6.8 having log4j vulnerability

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

    I have gradle project with a number of gradle modules and the my-modul-main depends on the modul-common. But IntellijIdea does not see this dependency completely, the only modul-common:test (only scope tests, but not the main one). I've built my project with gradle, and it is built perfectly, but InteelijIdea shows red packages in classes since it doesn't see dependency well. I check Project Structure - modules - my-module-main and there are no expected dependency (only with test scope). Please help

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

    where i can find maven artifact search because when i click on generate it shows the copyright button only how can i open add maven artifact dependency

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

    The way she tries to breathe quietly killing me 🤣🤣🤣

  • @Cagoscra
    @Cagoscra 2 ปีที่แล้ว

    Does anybody knows how to add a dependency from a local gradle project instead of a repository?

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

    Hi, I am not getting the src folder. Could you please help with the same?

    • @eg8580
      @eg8580 3 ปีที่แล้ว

      What do you mean by 'not getting the src folder' ?

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

      I mean I didn’t find src folder under the project and thank you.. I resolved it 🙂

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

      @@swathiramana2680 Hello, what is the solution?
      Please

  • @dmswide9600
    @dmswide9600 3 ปีที่แล้ว

    after Maven,here comes Gradle.

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

    F*ck me! I've spent like 2hrs trying to figure out why my gradle wrapper is not working. Dot and slash ( ./ )! Thank you for this video, otherwise I'd probably throw my computer through the window.

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

    i use both paid and community editions of this IDE with gradle versions 5/6 on windows and mac - it doesn't work like this ever. you have to play games to get the 'content roots' created - and gradle 7 doesn't work with the IDE at all with mysterious groovy errors...
    seriously looking at switching to something more bare metal that actually works.

    • @hexploy
      @hexploy 3 ปีที่แล้ว

      I have the same experience. By stability Maven and its integration with IDE a miles ahead of Gradle.

    • @aemogie
      @aemogie 2 ปีที่แล้ว

      try switching to the kotlin dsl, from my personal experience it works better w/ intellij.
      may not be the same for others though, but give it a try first.

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

    how to write hello world there

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

    Download IntelliJ IDEA: jb.gg/download-intellij-idea​
    Error 404

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

    I think things have changed a little bit with kotlin

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

      How did you go about learning this stuff with Kotlin as the default DSL? I'm completely new to any of this and I find this video quite confusing as it still uses Groovy.

  • @l-hp5pl
    @l-hp5pl หลายเดือนก่อน

    pico jak ort mam spustit tu zastanou aplikaci

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

    Why you so osum?

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

    Could you please update this video for Kotlin? As I've understood Kotlin is now the default DSL. I'm completely new to any of this so it's slightly confusing as I want to learn by using industry standards.

  • @hexploy
    @hexploy 3 ปีที่แล้ว

    How good it looks and how horrible my latest experience with working on Gradle project in Idea:
    1. Checkout some project, trying to open it in IDEA and getting just nothing
    2. Checking idea logs and found exceptions like "could not find extension implementation class org.jetbrains.kotlin.idea.scripting.gradle.importing.KotlinDslSyncListener"
    3. Trying to find issue on youtrack, no exact matches but found similar which expected to be fixed in next release version...
    4. Update idea to the latest EAP version (which, you know, could be a bit difficult for corporate users)
    5. Trying to open it in idea again...
    6. Idea importing project for 10 minutes and just hang on "Gradle: Download groovy-all-1.3-2.5.8.pom..."
    7. Checking idea logs and nothing found
    8. Searching on youtrack for that string and found IDEA-236128 without any workarounds
    9. After 15 minutes of hanging project successfully open
    And each time I opening this project I have to wait for 15 minutes again.

    • @ahmettachmuradov8630
      @ahmettachmuradov8630 3 ปีที่แล้ว

      so what you suggest?

    • @hexploy
      @hexploy 3 ปีที่แล้ว

      @@ahmettachmuradov8630 Nothing special actually. But I quite often see that people praise Gradle, just wanted to show that facing issues is a 'normal' process for Gradle (and its integration with IDE).

    • @ahmettachmuradov8630
      @ahmettachmuradov8630 3 ปีที่แล้ว

      @@hexploy I see. I must learn it because our team uses gradle as a building tool.
      Will see how it goes.

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

      this shit is so fucking frustrating at some many levels

  • @dizlike-to3wn
    @dizlike-to3wn 3 ปีที่แล้ว

    nice, very helpfull