Reputation: 2036
I'm having some trouble upgrading the version of Kotlin to 1.3-M1
or 1.3-M2
I'm using 1.2.51
right now and the error I'm getting when I try using any newer versions like 1.3-M2
is:
Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.3-M2.
I'm guessing it has been moved but I've looked al over and haven't found a solution.
Can anyone point me in the right direction?
Upvotes: 8
Views: 21817
Reputation: 1
To update to a prerelease version of Kotlin, you need to add the kotlin-eap repository to your build.gradle:
buildscript {
ext.kotlin_version = '1.3.10'
repositories {
google()
jcenter()
repositories {
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
}
repositories {
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
Upvotes: 0
Reputation: 53
I just change 1.2.x version of kotlin in my gradle file like this and it worked:
buildscript
{
ext.kotlin_version = '1.3.10'
repositories {
google()
jcenter()
}
Upvotes: 0
Reputation: 2036
Thanks to yole and TheWanderer I found what was missing.
Here under the EAP-NEXT
tab you can find the correct version of the kotlin plugin for IntelliJ/Android Studio.
So this is what I did to solve it:
1 - Android Studio -> Tools -> Kotlin -> Configure Kotlin Plugin Updates
2 - Select Early Access Preview 1.3 on the Update channel
drop down(If you can't find it click again)
3 - What this answer says:
On your project level build.gradle
:
buildscript {
repositories {
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
}
repositories {
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
Upvotes: 7
Reputation: 97178
To update to a prerelease version of Kotlin, as described in the blog post, you need to add the kotlin-eap
repository to your build.gradle:
buildscript {
repositories {
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
}
repositories {
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
Upvotes: 3
Reputation: 17834
org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.7
Doesn't exist. The plugin versions use trailing zeros, so it would be:
org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.70
However, 1.2.71
is currently the latest, so I recommend using that instead.
https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-gradle-plugin
Upvotes: 2