After bumping version of kotlin from 1.0.5-2 to 1.1.0 I get a crash:
Error:(114, 0) Cannot convert the provided notation to an object of type Dependency: org.jetbrains.kotlin.gradle.dsl.KotlinProjectExtension_Decorated@5a39a165.
The following types/formats are supported:
- Instances of Dependency.
- String or CharSequence values, for example 'org.gradle:gradle-core:1.0'.
- Maps, for example [group: 'org.gradle', name: 'gradle-core', version: '1.0'].
- FileCollections, for example files('some.jar', 'someOther.jar').
- Projects, for example project(':some:project:path').
- ClassPathNotation, for example gradleApi().
Comprehensive documentation on dependency notations is available in DSL reference for DependencyHandler type.
The project is not synced so I cannot call gradle dependencies or anything else.
main build.gradle
ext {
kotlin_version = '1.1.0'
//(...)
kotlin = "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
Sync crashes in app build.gradle
dependencies {
compile kotlin
//...
}
Turns out that "kotlin" keyword is used within gradle configuration of the new version of kotlin dependecy. The solution was to change the dependency labelname from kotlin to (for example) kotlinDependency
Old:
ext {
kotlin_version = '1.1.0'
//(...)
kotlin = "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
New:
ext {
kotlin_version = '1.1.0'
//(...)
kotlinDependency = "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With