# Gradle: making Kotlin plugin use version of Kotlin specified by Gradle

**URL:** https://discuss.kotlinlang.org/t/gradle-making-kotlin-plugin-use-version-of-kotlin-specified-by-gradle/1375
**Category:** Support
**Created:** [December 23, 2015, 4:52am UTC](https://discuss.kotlinlang.org/t/gradle-making-kotlin-plugin-use-version-of-kotlin-specified-by-gradle/1375 "2015-12-23T04:52:24Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![radicaled](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/radicaled/32/1684_2.png) [@radicaled](https://discuss.kotlinlang.org/u/radicaled)
#### Post date: [December 23, 2015, 4:52am UTC](https://discuss.kotlinlang.org/t/gradle-making-kotlin-plugin-use-version-of-kotlin-specified-by-gradle/1375/1 "2015-12-23T04:52:24Z")

</div>

How can I tell the Kotlin plugin to **only** use the version of Kotlin specified by Gradle?

For instance, when I imported an existing Gradle project into EAP 16, I had to “configure Kotlin in project” – which dumped a bunch of Beta 4 runtimes into my `/lib` directory. However, Gradle was configured to use an older version of Kotlin’s stdlib, etc. There weren’t serious issues (the codebase was small, so it was easy to check) but I can see in the future how this might be a problem, so I’d like to learn how to strictly control the version of Kotlin used via Gradle sooner rather than later.

Forgive me for sounding a little rusty: Kotlin brought me back to the JVM and its ecosystem after several years, so my knowledge is a bit shallow right now.

---

<div class="post-metadata">

### Author: ![pniederw1](https://avatars.discourse-cdn.com/v4/letter/p/0ea827/32.png) [@pniederw1](https://discuss.kotlinlang.org/u/pniederw1)
#### Post date: [December 23, 2015, 11:23am UTC](https://discuss.kotlinlang.org/t/gradle-making-kotlin-plugin-use-version-of-kotlin-specified-by-gradle/1375/2 "2015-12-23T11:23:55Z")

</div>

I treat Kotlin dependencies like all other dependencies in my Gradle build, and simply ignore the (annoying) “configure Kotlin in project” popup in IntelliJ. ([https://youtrack.jetbrains.com/issue/KT-9275](https://youtrack.jetbrains.com/issue/KT-9275)) This works fine for me. (I use `gradlew idea` to generate the IntelliJ project; don’t know if it make a difference.)

Update: I think the Kotlin compiler version used by IntelliJ is currently tied to the Kotlin plugin version.

---

<div class="post-metadata">

### Author: ![radicaled](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/radicaled/32/1684_2.png) [@radicaled](https://discuss.kotlinlang.org/u/radicaled)
#### Post date: [December 24, 2015, 9:52pm UTC](https://discuss.kotlinlang.org/t/gradle-making-kotlin-plugin-use-version-of-kotlin-specified-by-gradle/1375/3 "2015-12-24T21:52:19Z")

</div>

> [@pniederw1](#):
>
> Update: I think the Kotlin compiler version used by IntelliJ is currently tied to the Kotlin plugin version.

That’s what it’s looking like to me. ☹

One of my problems is that “Make Project” uses whatever’s baked into the IDE to compile instead of calling the `build` task. Ergo, IDEA’s hot reload functionality will use whatever version of Kotlin is bundled with the plugin for compilation instead of the actual Gradle dependencies. That said, `./gradlew -w build` will continuously rebuild, and I think IDEA will try to hot reload code based on file changes after that build, so that can be a work around for now…

---

<div class="post-metadata">

### Author: ![pniederw1](https://avatars.discourse-cdn.com/v4/letter/p/0ea827/32.png) [@pniederw1](https://discuss.kotlinlang.org/u/pniederw1)
#### Post date: [December 25, 2015, 6:41am UTC](https://discuss.kotlinlang.org/t/gradle-making-kotlin-plugin-use-version-of-kotlin-specified-by-gradle/1375/4 "2015-12-25T06:41:23Z")

</div>

Just to be clear, it looks like Kotlin dependencies (e.g. stdlib) _are_ taken from the compile class path (and therefore from Gradle), but not the compiler itself.
