We have a a custom gradle-plugin built in Scala, which we wanted to update to 4.0-rc-2 but we’ve run into an issue with the gradleApi.
When depending on gradleApi() in our plugin, from what can be told in Intellij, it appears to be using jar-files from 3.5-rc-2 (located in ~/.gradle/caches/3.5-rc-2/generated-gradle-jars). Of course, we’ve tried clearing all caches making sure it’s all empty.
Are we doing any obvious mistakes, or has anyone seen anything similar?
Open project in IntelliJ with File > Open > Point to project directory. Select to use the provided Gradle Wrapper. External Libraries contains the 3.5-rc2 Gradle API dependency.
Switch to IntelliJ again. Select “Auto-import” (pop-up) for the project to ensure that IntelliJ picks up all changes based on what you have in the Gradle project.
IntelliJ automatically updates the right dependencies to 4.0-rc2 Gradle API dependency in External Libraries.
It’s important to enable auto-import. Anything else you are doing differently? I am using 2017.1.3.