Remove exclusions from kotlin-stdlib dependency of published artifacts

Log warning about it, this is probably a project configuration bug and should be checked.
This commit is contained in:
Vyacheslav Gerasimov
2018-04-24 21:30:16 +03:00
parent 003f381fcd
commit c10c5a44d1
@@ -85,6 +85,16 @@ open class PublishedKotlinModule : Plugin<Project> {
dependencies.removeIf {
InvokerHelper.getMetaClass(it).getProperty(it, "scope") == "test"
}
dependencies
.find {
InvokerHelper.getMetaClass(it).getProperty(it, "groupId") == "org.jetbrains.kotlin"
&& InvokerHelper.getMetaClass(it).getProperty(it, "artifactId") == "kotlin-stdlib"
}
?.also {
InvokerHelper.getMetaClass(it).setProperty(it, "exclusions", emptyList<Any>())
logger.warn("WARNING! Removed exclusions from kotlin-stdlib dependency of ${this.artifactId} artifact's maven metadata, check kotlin-stdlib dependency of ${project.path} project")
}
}
}