Skip to content

Commit

Permalink
Enforce the new Kotlin JDK libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
vRallev committed Jun 10, 2018
1 parent 0ac25fe commit 44f6762
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,19 @@ subprojects { subproject ->
// avoids conflicts in test app
configurations.all {
resolutionStrategy.force "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"

// Replace deprecated Kotlin JRE dependencies with JDK dependencies
resolutionStrategy.dependencySubstitution {
all { DependencySubstitution dependency ->
if (dependency.requested instanceof ModuleComponentSelector && dependency.requested.group == 'org.jetbrains.kotlin') {
if (dependency.requested.module == 'kotlin-stdlib-jre7') {
dependency.useTarget "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
}
if (dependency.requested.module == 'kotlin-stdlib-jre8') {
dependency.useTarget "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
}
}
}
}
}
}

0 comments on commit 44f6762

Please sign in to comment.