Pill: Fix issue with clashing sdk-common.jar and sdk-common-26.1.2.jar

Move sdk-common.jar to the end of the classpath
This commit is contained in:
Yan Zhulanow
2018-08-20 23:39:46 +03:00
parent 267e239e52
commit b7873edf30
+7 -1
View File
@@ -48,7 +48,13 @@ class JpsCompatiblePlugin : Plugin<Project> {
DependencyMapper("org.jetbrains.kotlin", "kotlin-compiler-embeddable", "runtimeJar") { null },
DependencyMapper("org.jetbrains.kotlin", "kotlin-stdlib-js", "distJar") { null },
DependencyMapper("org.jetbrains.kotlin", "kotlin-compiler", "runtimeJar") { null },
DependencyMapper("org.jetbrains.kotlin", "compiler", "runtimeElements") { null }
DependencyMapper("org.jetbrains.kotlin", "compiler", "runtimeElements") { null },
DependencyMapper("kotlin.build.custom.deps", "android", "default") { dep ->
val (sdkCommon, otherJars) = dep.moduleArtifacts.map { it.file }.partition { it.name == "sdk-common.jar" }
val mainLibrary = PDependency.ModuleLibrary(PLibrary(dep.moduleName, otherJars))
val deferredLibrary = PDependency.ModuleLibrary(PLibrary(dep.moduleName + "-deferred", sdkCommon))
MappedDependency(mainLibrary, listOf(deferredLibrary))
}
)
}