Intellij IDEA and Gradle projects

benwaffle

I have a new project. Should I place apply plugin: 'idea' in build.gradle and run $ gradle idea? Or should I import the gradle project directly into IntelliJ IDEA 14.1? Which one will allow me to add dependencies to build.gradle and have IDEA automatically download & know about them?

Doron Gold

With Intellij 14 you can just open the the build.gradle file using Intellij's File --> Open. this will import the gradle project, including all dependencies. After you change something in the build.gradle file, you can click on "refresh all gradle projects" at the top of the gradle tool window.

You may also mark "use auto-import" under the Build Tools/Gradle tab in Settings. This will resolve all changes made to the gradle project automatically every time you refresh your project.

The idea plugin is the old method of importing a gradle project into Intellij. With the newer versions of Intellij, it has become redundant.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Why my gradle projects creates separated modules for main and test in Intellij Idea

From Dev

How to import Gradle Projects in IntelliJ?

From Dev

How to attach sources to auto-generated Gradle-based dependencies in IntelliJ IDEA 13.0 in a way that will survive next Gradle projects refresh?

From Java

IntelliJ IDEA Gradle Sync OutOfMemory

From Dev

Gradle + Intellij IDEA 13 bug

From Dev

Gradle not downloading dependencies in intelliJ idea

From Dev

Gradle + Intellij idea: run configuration

From Dev

Gradle + Intellij idea: run configuration

From Dev

IntelliJ IDEA with multiple gradle subprojects

From Dev

How to delete projects in Intellij IDEA 14?

From Dev

intellij IDEA distinguish different projects by color

From Dev

Android Studio Linked with IntelliJ Gradle projects

From Dev

Is there a keyboard shortcut in intellij to synchronize all gradle projects?

From Dev

Is there a keyboard shortcut in intellij to synchronize all gradle projects?

From Dev

Android Studio Linked with IntelliJ Gradle projects

From Dev

Exclude folders from Gradle project in IntelliJ IDEA

From Dev

Open Gradle project in IntelliJ IDEA, set encoding

From Java

Display Gradle output in console in Intellij IDEA 2016.1.1

From Dev

How to pass arguments to Gradle from IntelliJ IDEA

From Dev

Gradle Java debugging project in IntelliJ IDEA

From Dev

Adding AAR in IntelliJ IDEA without gradle

From Dev

Custom artifact generation on Intellij Idea 13 and Gradle

From Dev

Gradle not downloading dependencies in intelliJ idea 2016.2

From Dev

No Gradle Tool Window in IntelliJ IDEA 13?

From Dev

How to disable Gradle daemon in IntelliJ Idea?

From Dev

Building war with Gradle, Debugging with IntelliJ IDEA

From Dev

mapstruct and gradle configuratoin issue in Intellij IDEA

From Dev

Intellij Idea - Gradle: Execution failed for task ':compileJava'

From Dev

Gradle Sync Failure in Fresh IntelliJ IDEA Install

Related Related

  1. 1

    Why my gradle projects creates separated modules for main and test in Intellij Idea

  2. 2

    How to import Gradle Projects in IntelliJ?

  3. 3

    How to attach sources to auto-generated Gradle-based dependencies in IntelliJ IDEA 13.0 in a way that will survive next Gradle projects refresh?

  4. 4

    IntelliJ IDEA Gradle Sync OutOfMemory

  5. 5

    Gradle + Intellij IDEA 13 bug

  6. 6

    Gradle not downloading dependencies in intelliJ idea

  7. 7

    Gradle + Intellij idea: run configuration

  8. 8

    Gradle + Intellij idea: run configuration

  9. 9

    IntelliJ IDEA with multiple gradle subprojects

  10. 10

    How to delete projects in Intellij IDEA 14?

  11. 11

    intellij IDEA distinguish different projects by color

  12. 12

    Android Studio Linked with IntelliJ Gradle projects

  13. 13

    Is there a keyboard shortcut in intellij to synchronize all gradle projects?

  14. 14

    Is there a keyboard shortcut in intellij to synchronize all gradle projects?

  15. 15

    Android Studio Linked with IntelliJ Gradle projects

  16. 16

    Exclude folders from Gradle project in IntelliJ IDEA

  17. 17

    Open Gradle project in IntelliJ IDEA, set encoding

  18. 18

    Display Gradle output in console in Intellij IDEA 2016.1.1

  19. 19

    How to pass arguments to Gradle from IntelliJ IDEA

  20. 20

    Gradle Java debugging project in IntelliJ IDEA

  21. 21

    Adding AAR in IntelliJ IDEA without gradle

  22. 22

    Custom artifact generation on Intellij Idea 13 and Gradle

  23. 23

    Gradle not downloading dependencies in intelliJ idea 2016.2

  24. 24

    No Gradle Tool Window in IntelliJ IDEA 13?

  25. 25

    How to disable Gradle daemon in IntelliJ Idea?

  26. 26

    Building war with Gradle, Debugging with IntelliJ IDEA

  27. 27

    mapstruct and gradle configuratoin issue in Intellij IDEA

  28. 28

    Intellij Idea - Gradle: Execution failed for task ':compileJava'

  29. 29

    Gradle Sync Failure in Fresh IntelliJ IDEA Install

HotTag

Archive