https://kotlinlang.org logo
Title
r

rook

06/07/2018, 5:53 PM
Have you tried just starting a brand new kotlin project in IDEA and seeing if that just works? If that doesn’t work, then there’s a deeper issue. If that does work, then it’s a Gradle configuration issue.
👍 1
d

Dhawal

06/07/2018, 6:01 PM
I will try this and revert back
Tried creating a new kotlin java project using gradle. Got the same error in sync. What could be the issue here?
r

rook

06/07/2018, 6:33 PM
can you post your
build.gradle
file?
d

Dhawal

06/08/2018, 3:11 AM
Here it is:
buildscript {
    ext.kotlin_version = '1.2.41'

    repositories {
        mavenCentral()
    }
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

plugins {
    id 'java'
}

group 'com.practice'
version '1.0-SNAPSHOT'

apply plugin: 'kotlin'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

dependencies {
    compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
    testCompile group: 'junit', name: 'junit', version: '4.12'
}

compileKotlin {
    kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
    kotlinOptions.jvmTarget = "1.8"
}
I don't see anything suspicious here
r

rook

06/08/2018, 3:13 PM
Try manually setting your
buildDir
to the file path where your project resides.