From ce2a469a8805e6d673dcf644a364145c1abfd286 Mon Sep 17 00:00:00 2001 From: Nikita Bobko Date: Wed, 2 Feb 2022 14:12:29 +0100 Subject: [PATCH] coop dev: make it obvious how to resolve problems with outdated iml mapping --- settings.gradle | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/settings.gradle b/settings.gradle index 5c2e5f3c6c9..1f692396b8f 100644 --- a/settings.gradle +++ b/settings.gradle @@ -385,7 +385,12 @@ void intellij(String imlPath) { imlFile = imlFile.exists() ? imlFile : new File("${rootDir}/intellij/plugins/kotlin/${imlPath}") imlFile = imlFile.exists() ? imlFile : new File("${rootDir}/intellij/community/${imlPath}") imlFile = imlFile.exists() ? imlFile : new File("${rootDir}/intellij/${imlPath}") - assert imlFile.exists() + if (!imlFile.exists()) { + throw new IllegalStateException("$imlFile doesn't exist. Please, update mapping in settings.gradle. And regenerate " + + "build.gradle files in kt-branch in 'intellij' repo (./gradlew generateIdePluginGradleFiles). Or you can " + + "remove 'attachedIntellijVersion' in your 'local.properties' if you don't care about being possible to" + + "browse Kotlin plugin sources in scope of Kotlin compiler sources") + } String fileName = imlFile.name String projectName = ":kotlin-ide.${fileName.substring(0, fileName.length() - ".iml".length())}" include(projectName)