Gradle 4.3.1 upgrade

LabKey Support Forum
Gradle 4.3.1 upgrade susanh+test1  2017-12-07 13:32
Status: Closed
 
With r55385 in trunk, we have upgraded the version of gradle in trunk/develop from 3.4.1 to 4.3.1. Because of this, and the fact that with Gradle 4.X the default organization of output directories changed, you will probably want to do a cleanBuild after you sync SVN and pick up this change. (It's not strictly necessary as I've been switching back and forth between versions quite a lot lately without cleanBuild in between, but it will make for a less cluttered build space.)

You will notice right away that the console output is quite different with this version of Gradle. There are a lot of other new features the Gradle team has added, which you can explore yourself. One that might be of particular interest for those who don't like to type is the support of camel-case abbreviations for gradle tasks. So you can deploy the core module like so:

./gradlew :se:mo:co:dM

There are some warnings produced in the build about things we use that will be removed in Gradle 5.0. We'll work on getting those fixed with the next gradlePlugins version (Issue 32413).

As always, let us know if you encounter problems or have questions. If you get stuck and it seems like it is because of this upgrade, it is easy to switch back to the 3.4.1 version of gradle to check if that's the problem or get yourself unblocked by doing this:

./gradlew wrapper --gradle-version=3.4.1

Thanks!

Susan

 
 
Susan Hert responded:  2017-12-11 19:13

One other note here. You will need to upgrade your version of IntelliJ to version 2017.2.5 or later if you are doing the Gradle refresh in IntelliJ. Otherwise, you may encounter an error message such as:

Error:Can't register given path of type 'SOURCE' because it's out of content root.
Content root: 'C:/labkey/server/modules/query'
Given path: 'C:\labkey\build\modules\query\gensrc\antlr'