0

So, I have kotlin plugin in my project set to latest stable release 1.3.72 but i have a dependency in which the plugin is defined as id 'org.jetbrains.kotlin.jvm' version 1.+ so it fetches 1.4-M1 which is actually not resolvable and I'm getting the following error:

Could not find org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4-M1.

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

This is how i defined version of it in my build.gradle file:

plugins {
    id 'org.jetbrains.kotlin.jvm' version '1.3.72'
    id 'org.jetbrains.dokka' version '0.10.1'
}
...

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
    ...
}

Since the org.jetbrains.kotlin:kotlin-stdlib-jdk8 doesn't have 1.4-M1 release gradle could not resolve it. Is there any way to force downgrade the version of this?

Animesh Sahu
  • 7,445
  • 2
  • 21
  • 49

1 Answers1

0

I finally found the answer myself, I strictly defined version of org.jetbrains.kotlin:kotlin-stdlib-jdk8 and forced the ktor-dependency for using the defined version:

ext {
    ktor_version='1.3.0'
}
dependencies {
    implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") {
        version {
            strictly "1.3.72"
        }
        because "1.4-M1 is not released"
    }
    implementation("io.ktor:ktor-server-core:$ktor_version") { force=true }
}
Animesh Sahu
  • 7,445
  • 2
  • 21
  • 49