[英]How to force downgrade plugin version in in gradle?
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:所以,我的项目中的 kotlin 插件设置为最新的稳定版本
1.3.72
,但我有一个依赖项,其中插件定义为id 'org.jetbrains.kotlin.jvm' version 1.+
,因此它获取1.4-M1
哪个实际上是无法解决的,我收到以下错误:
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:这就是我在 build.gradle 文件中定义它的版本的方式:
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.由于 org.jetbrains.kotlin:kotlin-stdlib-jdk8 没有 1.4-M1 版本 gradle 无法解决它。 Is there any way to force downgrade the version of this?
有没有办法强制降级这个版本?
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:我自己终于找到了答案,我严格定义了
org.jetbrains.kotlin:kotlin-stdlib-jdk8
版本,并强制 ktor-dependency 使用定义的版本:
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 }
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.