diff --git a/plugins/annotation-based-compiler-plugins-ide-support/src/idePluginUtils.kt b/plugins/annotation-based-compiler-plugins-ide-support/src/idePluginUtils.kt index e676b69000c..142556688c6 100644 --- a/plugins/annotation-based-compiler-plugins-ide-support/src/idePluginUtils.kt +++ b/plugins/annotation-based-compiler-plugins-ide-support/src/idePluginUtils.kt @@ -18,6 +18,7 @@ package org.jetbrains.kotlin.annotation.plugin.ide import org.jetbrains.kotlin.cli.common.arguments.CommonCompilerArguments import org.jetbrains.kotlin.idea.facet.KotlinFacet +import java.io.File internal class AnnotationBasedCompilerPluginSetup(val annotationFqNames: List, val classpath: List) @@ -40,7 +41,7 @@ internal fun modifyCompilerArgumentsForPlugin( val newPluginOptions = oldPluginOptions + annotationOptions val oldPluginClasspaths = (commonArguments.pluginClasspaths ?: emptyArray()).filterTo(mutableListOf()) { - !it.substringAfterLast('/', missingDelimiterValue = "").matches("(kotlin-)?(maven-)?$pluginName-.*\\.jar".toRegex()) + !it.substringAfterLast(File.separatorChar, missingDelimiterValue = "").matches("(kotlin-)?(maven-)?$pluginName-.*\\.jar".toRegex()) } val newPluginClasspaths = oldPluginClasspaths + (setup?.classpath ?: emptyList())