Kotlin-dsl-samples: Android Studio 3.2 can not use kotlin-dsl

Created on 9 Oct 2018  路  4Comments  路  Source: gradle/kotlin-dsl-samples

when i updated Android Studio 3.2 ,kotlin plugin must be higher 1.2.51

my project has a buildSrc module, and i use kotlin-dsl, like this:
file : build.gradle.kts
plugins {
kotlin-dsl
}

but build project failed:
error message:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.2.51 and higher. Project 'buildSrc' is using version 1.2.21.

now, i guess kotlin-dsl has kotlin-plugin but version is 1.2.21, can not working at Android Studio 3.2,
because only supports 1.2.51 and higher, what should i do???

Android Studio 3.2
Gradle 4.6
gradle-plugin 3.2
gradle-kotlin-version 1.2.71

Most helpful comment

add fallow in build.gradle.kts

repositories {
jcenter()
}
--- looks like
import org.gradle.kotlin.dsl.kotlin-dsl
repositories {
jcenter()
}
plugins {
kotlin-dsl
}

All 4 comments

Update Gradle 馃檭
Gradle 4.10 brings the Kotlin DSL version 1.0-RC6 which brings Kotlin 1.2.61.
-> https://github.com/gradle/kotlin-dsl/releases/tag/v1.0-RC6

Update Gradle 馃檭
Gradle 4.10 brings the Kotlin DSL version 1.0-RC6 which brings Kotlin 1.2.61.
-> https://github.com/gradle/kotlin-dsl/releases/tag/v1.0-RC6

thanks, i am try to update Gradle 4.10 ,but another problem showing:

Could not resolve all files for configuration ':buildSrc:kotlinCompilerPluginClasspath'.
Could not find org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.2.61.

Gradle 4.10 file don t have kotlin-scripting-compiler-embeddable-1.2.61.jar ,why and how to fix it??

@wuchengithub that's #1033, closing

add fallow in build.gradle.kts

repositories {
jcenter()
}
--- looks like
import org.gradle.kotlin.dsl.kotlin-dsl
repositories {
jcenter()
}
plugins {
kotlin-dsl
}

Was this page helpful?
0 / 5 - 0 ratings