1

在我们的内部 CI 服务器中运行构建时出现以下错误。

org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'org.gradle.kotlin.kotlin-dsl', version: '0.18.1'] 在以下任何来源中都找不到:

  • Gradle 核心插件(插件不在 'org.gradle' 命名空间中)
  • Plugin Repositories (could not resolve plugin artifact 'org.gradle.kotlin.kotlin-dsl:org.gradle.kotlin.kotlin-dsl.gradle.plugin:0.18.1') 在以下存储库中搜索:Gradle Central Plugin Repository

app/buildSrc/build.gradle.kts 下面是 build.gradle.kts 中的代码

plugins {
    `kotlin-dsl`
}

即使我尝试在插件上方或下方包含存储库也没有任何区别。

plugins {
    `kotlin-dsl`
}
repositories {
      maven("https://ci.mycompany.com/jcenter")
}
4

1 回答 1

2

我必须将 pluginManagement 添加到 settings.gradle

pluginManagement {
       repositories {
                  maven("https://ci.mycompany.com/jcenter")
               }
}
于 2018-08-30T02:46:08.910 回答