Seemingly no gradle import support in IDEA - intellij-idea

I have the full version of IDEA 12.1.6
I am trying to import the gradle project https://github.com/Synesso/jomsocial-automation-test
The import doesn't recognise the project as a gradle project. No dependencies are linked, the java profile is ignored and there is no jetgradle window.
In the IDE settings the only thing that matches a search for "gradle" is the gradle plugin, which is installed by default.
I think I need to configure the IDE to support gradle imports, but can't find what or where.

That is strange. Anyway, the Gradle support in IntelliJ 12 is very limited. You are better off with Gradle's idea plugin or IntelliJ 13 (EAP), which has much better Gradle support.

Related

In Karate DSL Framework, IntelliJ IDE is unable to find visible feature files using Gradle

When using the following tools to create a sample Karate DSL Test; a "no features found at [classpath: packagename]" is thrown:
IntelliJ 2017.2.3
Gradle 2.9
project structure is shown in screenshot. Note that I have used the exact same project structure in Eclipse Mars 4.5.2 with Gradle and I was not able to replicate this issue. I also used Maven with Intellij and this issue did not occur.
The issue is isolated to Intellij using Gradle! any thoughts?
My best guess is IntelliJ Gradle does not honor the sourceSets tweak needed for the recommended Karate folder structure.
I just had an idea, try switching to the "traditional" Java project structure where *.feature files are in src/test/resources (not src/test/java) and that might just work.
Example project structure, from IDEA 2017.2.6 with Gradle.

IntelliJ Idea LanternaGriffon Doesn't Recognize Griffon Project

I just made my first Griffon project, using lazybones. I chose griffon-lanterna-groovy for my template, and I then removed pom.xml and maven/ as I will be using Gradle. I then run gradle build test run and everything looked good. (it ran, build succeeded, etc.)
Next, I opened the project in IntelliJ and I've tried this in a variety of ways. No matter what I do, it IntelliJ doesn't recognize that this is a Griffon project.
I am using the latest stable version of all these library's, and I'm using IntelliJ Idea Ultimate Edition. I'm to to lazybones, Griffon, and lanterna, so any help is appreciated.
Griffon 2.x applications are either regular Gradle or Maven projects, you do not need an specific Griffon IDE plugin. IntelliJ ships with a Griffon plugin that's only compatible with Griffon 1.x projects. Do not use this plugin.
Refer to http://griffon-framework.org/tutorials/1_getting_started.html#_tutorial_1_4

IntelliJ 14.1 is too slow when I import a Maven project

If I import a Maven project (Import Project > choose the main pom.xml file > check Import Maven projects automatically > Next ...):
in IntelliJ IDEA 14.1 Ultimate Edition it takes about 5 hours until is ready.
in IntelliJ IDEA 14.0.3 Ultimate Edition it was about 20 times faster.
During the processing, if I maximize a popup it looks like:
The modules (folders) in the Project area are shown only at the end (only the files from the main directory are shown during the "resolving" - in this case immediately).
The jar files are already in the .m2 folder, so the problem is not related to the time for downloading those jars.
Is there a "hidden" setting needed to improve the performance? (a check box, a command, etc.)
Details:
Windows 7
Java 7
Apache Maven 3.2.1
Edit:
JDK, Maven, .m2, IntelliJ IDEA and the project sources are on the same drive
JetBrains wrote:
Your projects open faster and the IDE is more responsive as some processes now run in the background.
regarding IntelliJ IDEA 14.1 and probably it is faster but (at least for me) not using the default settings.
If you use the bundled Maven that comes with Idea 14.1, have a look here: Slow Intellij IDEA deployment . Using an installed Maven seems to be much faster.
Another improvement could be to change the JDK for importer (and probably the VM options for importer) from Use internal JRE to your own JDK:
It's all because Maven version. Maven 3.0.5 or Maven 2.x use simplified dependency resolution so often it can be used during import for big projects. Thought it can work incorrect for some projects which uses 3.1+ Maven.
Switching off auto-importing is another solution.

How to use an existing Gradle project in IntelliJ IDEA 13/14

I am using Gradle and IntelliJ IDEA. Normally I use apply plugin: 'idea' to generate the IDEA project files. With IDEA 12 I was used to work with the JetGradle tool view.
Now I updated to IDEA 13 and the JetGradle tool view is gone. When I use the old run configuration gradle:run, IDEA tells me:
Error running gradle:run:
Module 'X' is not backed by gradle.
How can I activate the gradle build in IDEA 13 without the tool view? I found this tweet from Cédric Champeau, but was still not able to solve it. Do I have to turn my simple gradle project into a multi module project or what?
Update
With File - Import Project ... I can import the build.gradle file and than I can choose View - Tool Windows - Gradle, which was hidden before. Is this the way to go?
What you state in your update is the correct way to go. The Gradle Plug-in received a lot of love in the IDEA 13 update and has changed a bit. An import of the Gradle build file is necessary. And as you have noted, the JetGradle tool window is now named simple Gradle
Tested with Gradle 1.9. In my opinion there are 2 issues:
Issue 1: when using gradlew idea I expect to receive a valid IDEA project without the need to import it. There are discussions on the gradle forum, see this Gradle forum post. In this Jetbrains forum post it is told that there is no backward compatibility with IntelliJ 12 gradle projects at the moment.
Issue 2: With IDEA 12 it was possible to open the JetGradle View even if the current project was not a gradle projcet. But the view displayed the message "There is no linked Gradle project. You can Add one" and offered you the possibility to convert the project to an gradle project with a simple click. In IDEA 13 it is not possible to open the Gradle View when the current project is not a gradle project. I asked a question here.
In the Gradle forum post mentioned above Peter Niederweiser stated:
The preferred way of integrating with IDEA 13 is to use IDEA's Gradle import, without running gradle idea. (You should still apply the idea plugin though, and it's still important to apply it to allprojects {} rather than subprojects {} when dealing with multi-project builds.)
So the answer from Mark Vedder is correct, altough I would have liked to have more information.
I have found that when you initially import a gradle project into Idea, if you don't have all of your directories created yet, the gradle tool window vanishes while you are importing into Idea. (It is there when the import starts, but at the end it disappears.) However, if I manually build the project first (on a mac, >gradle clean build), and then go back to IDEA and import the project, the gradle tool window stays active. Hopefully this will help someone else.
you can go to Project Structure (Ctrl + Alt + Shift +S) and then under the Modules, click "Import Module" and choose your build.gradle from the project file repo. It will make the module gradle aware and then you will also see the Gradle window
The simplest way to do this is to use the Import Project option if you cannot use the gradlew idea to produce the idea project

Intellij Idea 12 gradle build

I am trying to build a project with gradle from within Intellij Idea 12 (commercial editon) but this keeps failing. I have the gradle plugin enabled and also the gradle gui plugin. The native project gradle import is working. (I'm not using gradle idea btw.)
When using the bash I only run gradle war to build my web application. Now I want to do the same from within Intellij.
The gradle gui plugin seems to be using the wrong JDK (I guess it's the one Idea uses, a 1.6 JDK) and therefor fails to compile because this is a JDK 1.7 project. And it doesn't integrate well into Idea because it seems like an external build process (like triggering external ant tasks).
What I have done so far is to configure my own artifact in a way that is equivalent to the one gradle war would have build. But that means a lot of configuration and simply feels wrong. There should be a better way?
So what do I have to do to make Idea compile a project in a way similar to the command line gradle task?
JetGradle plugin doesn't provide native tasks support at the moment. It's scheduled for v.12.1 - IDEA-95897. Feel free to track the plugin's news and update it manually as soon as corresponding support is provided.