Kotlin plugin error: Could not generate a proxy class for class org.jetbrains.kotlin.gradle.tasks.KotlinCompile

Reposting the question from Stack Overflow. I’m getting an error while trying to run a gradle task. Can’t figure out what else is required or what the error is about. The project I’m working on has several subprojects, so I have a main build.gradle. The error is for a subproject where I wanted to try Kotlin.

* Where: Build file '/home/oracle/bnc/KotlinHandler/build.gradle' line: 13

* What went wrong: A problem occurred evaluating root project 'KotlinHandler'.
> Failed to apply plugin [id 'kotlin']
   > Could not generate a proxy class for class org.jetbrains.kotlin.gradle.tasks.KotlinCompile.

Here is my build.gradle

buildscript {
    ext.kotlin_version = '1.1.2-2'

    repositories {
        mavenCentral()
    }

    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

apply plugin: 'kotlin'

repositories {
    mavenCentral()
}

dependencies {
    compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}

JDK 8 required for Kotlin 1.1.2+
Check, that you use JDK 8 ( or higher :slight_smile: )

Thank you, Victor. Specified jdk path in gradle.properties and voila! :slight_smile: