square / spoon

Distributing instrumentation tests to all your Androids.
https://square.github.io/spoon/
Apache License 2.0
2.7k stars 477 forks source link

Use Kotlin JDK instead of Kotlin JRE #547

Closed jaredsburrows closed 6 years ago

jaredsburrows commented 6 years ago

Description:

Use Kotlin JDK instead of Kotlin JRE

See: https://github.com/square/spoon/blame/master/build.gradle#L27

Error:

e: warnings found and -Werror specified
w: /Users/noname/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jre7/1.2.10/ea1aafdd031ba2604b06cb89a97da397b7aff520/kotlin-stdlib-jre7-1.2.10.jar: kotlin-stdlib-jre7 is deprecated. Please use kotlin-stdlib-jdk7 instead
w: /Users/noname/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jre8/1.2.10/71c98c16b4bed3f754c6c398f9da8300ecb0a669/kotlin-stdlib-jre8-1.2.10.jar: kotlin-stdlib-jre8 is deprecated. Please use kotlin-stdlib-jdk8 instead

Temporary Fix:

configurations.all {
  resolutionStrategy {
    eachDependency { details ->
      if (details.requested.name == "kotlin-stdlib-jre8") {
        details.useTarget group: details.requested.group, name: "kotlin-stdlib-jdk8", version: details.requested.version
      }
      if (details.requested.name == "kotlin-stdlib-jre7") {
        details.useTarget group: details.requested.group, name: "kotlin-stdlib-jre7", version: details.requested.version
      }
    }
  }
}