3

I am getting the following error while running the build in our internal CI Server.

org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'org.gradle.kotlin.kotlin-dsl', version: '0.18.1'] was not found in any of the following sources:

  • Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
  • Plugin Repositories (could not resolve plugin artifact 'org.gradle.kotlin.kotlin-dsl:org.gradle.kotlin.kotlin-dsl.gradle.plugin:0.18.1') Searched in the following repositories: Gradle Central Plugin Repository

app/buildSrc/build.gradle.kts Below is the code in build.gradle.kts

plugins {
    `kotlin-dsl`
}

Even though I tried to include the repositories above or below the plugins didnt make any difference.

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

1 Answer 1

5

I had to add pluginManagement to the settings.gradle

pluginManagement {
       repositories {
                  maven("https://ci.mycompany.com/jcenter")
               }
}
Sign up to request clarification or add additional context in comments.

1 Comment

Do you mean settings.gradle of the project or is it another one inside buildSrc?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.