2 Answers

2
votes

Add the following repository to your root build.gradle for milestone releases

  ext.kotlin_version = "1.4-M2"
  repositories {
    //Your existing respositories
    maven {
      url "https://dl.bintray.com/kotlin/kotlin-eap/"
    }
  }
1
votes

It's because obviously milestone releases of Kotlin Gradle Plugin are not yet published to release repositories.

Your second link is actually a redirect: https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4-M2/kotlin-gradle-plugin-1.4-M2.pomhttps://repo.jfrog.org/artifactory/libs-release-bintray/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4-M2/kotlin-gradle-plugin-1.4-M2.pom. As you see, it points to the libs-release-bintray repo, which, as stated in its name, hosts only stable release.

You need to add an EAP repository to you build script, because the plugin you're looking for is actually located here: https://dl.bintray.com/kotlin/kotlin-eap/org/jetbrains/kotlin/kotlin-gradle-plugin/1.4-M2

Read more about configuring EAP in Gradle for Kotlin here.