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?
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.
Comments