0

I'm trying to switch over to Gradle Kotlin DSL from vanilla Gradle for all my IntelliJ/Kotlin projects. This requires me to specify the distributionUrl property in a Gradle wrapper task of the build file. However whenever I create a Gradle project and choose the "default Gradle wrapper" option, IntelliJ automatically generates a vanilla Gradle version 4.0 (atleast as of right now) wrapper and builds the project using it. Not only does this install an unused Gradle distro on my machine and makes me manually have to recreate the build file and wrapper, but also Gradle 4.0 isn't compatible Java 9.

Is there any way to change what default Gradle wrapper/build file is generated by IntelliJ as I see no wrapper configuration options in the settings tab of the Gradle plugin?

Pavan P
  • 645
  • 8
  • 17

1 Answers1

0

So this is actually a requested feature (thanks to @y.bedrov for the info), but I've found a temporary workaround...

Instead of using the Gradle project creation wizard, you can import a custom buildscript via Import Project. This actually supports Kotlin DSL! However for that, you'll have to add a wrapper task in the buildscript and set the distributionUrl to one of the releases here.

Pavan P
  • 645
  • 8
  • 17