Build: fail on attempt to include anntations.jar from intellij

This commit is contained in:
Sergey Rostov
2019-01-23 14:53:15 +03:00
parent f35185b261
commit 82e56f9cdd
@@ -69,6 +69,9 @@ fun Project.intellijUltimatePluginDep(plugin: String) = intellijDep(plugin)
fun ModuleDependency.includeJars(vararg names: String, rootProject: Project? = null) {
names.forEach {
var baseName = it.removeSuffix(".jar")
if (baseName == "annotations") {
error("Don't use anntations.jar from intellij. Kotlin stdlib already has this annotations.")
}
if (rootProject != null && rootProject.extra.has("ignore.jar.$baseName")) {
return@forEach
}