Intellij 2017 and Gradle build?

LabKey Support Forum
Intellij 2017 and Gradle build? Ben Bimber  2018-05-21 09:18
Status: Closed
 
I recently set up a new dev machine and it's been a while since I did much java development, but I'm finding builds/hot swapping to be painfully slow. I am using the latest Intellij, 2017.3. I assume this means I must be doing something out of sync with how most LabKey devs have this set up. I have a couple questions:

1) Are many devs using Intellij 2017 or still 2016?

2) I noticed Intellij and command line gradle seemed to be outputting to different directories (intellij was using paths like server\api\out, I think). This might relate to this issue:

https://youtrack.jetbrains.com/issue/IDEA-175172

Based on what was suggested there, I enabled:

File | Settings | Build, Execution, Deployment | Build Tools | Gradle | Runner => Delegate IDE build/run actions to gradle.

Which made a major difference on build time. However, I dont think classpath is set correctly since when I try to build the project through intellij, the GWT classes give errors. Is this a familiar issue for LK devs, and/or is there something else I should be looking into?

Thanks in advance.
 
 
Jon (LabKey DevOps) responded:  2018-06-01 22:37
Hi Ben,

I believe everyone at LabKey is running on 2017 now for IntelliJ (Ultimate and Community versions).

Also, I think that "out" directory thing is due to the gradlePluginsVersion value in the LABKEY_HOME/trunk (or whatever branch you're working on)/gradle.properties file being the incorrect value for the specific version of LabKey you're trying to build against.

Take a look at the README info on https://github.com/LabKey/gradlePlugin and you should be able to get the appropriate version number for the gradlePluginsVersion there.

Once you swap it out, you should not see that "out" behavior again.

Regards,

Jon
 
Ben Bimber responded:  2018-06-02 05:44
I'm running against a branch based off 18.1. The plugin version I'm using is the default for this branch, 1.2.4, which is also the same as what's checked in for the release18.1 branch, so while it's older than the latest trunk version it seems matched to the branch. I'll try updating to 1.2.5 (highest compatible w/ 18.1 according to your link) and see if this helps.

I actually updated to Intellij 2018 since this post and this made a dramatic difference as well. Thanks.