3

I recently added Kotlin 1.1.1 to my project, which worked fine on OS X. I synced it over to an Ubuntu box, and trying to run any gradle command on my build results in:

A problem occurred configuring root project 'myproject'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.1.
     Required by:
         project :
      > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.1.
         > Could not get resource 'https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.1.1/kotlin-gradle-plugin-1.1.1.pom'.
            > Could not HEAD 'https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.1.1/kotlin-gradle-plugin-1.1.1.pom'.
               > java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

I have tried both ways to configure it, including:

buildscript {
   ext.kotlin_version = '1.1.1'

   repositories {
     mavenCentral()
   }

   dependencies {
     classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
   }
}

and

plugins {
  id "org.jetbrains.kotlin.jvm" version "1.1.1"
}

What am I doing wrong?

Stevey
  • 2,822
  • 1
  • 23
  • 30

0 Answers0