File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
plugin-idea/src/main/kotlin/nl/fabianm/kotlin/plugin/generated/idea Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,11 @@ internal object GeneratedImportHandler {
3232 private val PLUGIN_JPS_JAR : String?
3333 get() = PathManager .getJarPathForClass(GeneratedCommandLineProcessor ::class .java)
3434
35+ /* *
36+ * The implementation title to search for.
37+ */
38+ private val PLUGIN_IMPLEMENTATION_TITLE = " nl.fabianm.kotlin.plugin.generated"
39+
3540 /* *
3641 * The [Logger] instance for this class.
3742 */
@@ -49,7 +54,7 @@ internal object GeneratedImportHandler {
4954
5055 val facetSettings = facet.configuration.settings
5156 val commonArguments = facetSettings.compilerArguments ? : CommonCompilerArguments .DummyImpl ()
52- val regex = " ( .*\\ ${File .separator} ?$buildSystemPluginJar -.*\\ .jar" .toRegex()
57+ val regex = " .*\\ ${File .separator} ?$buildSystemPluginJar -.*\\ .jar" .toRegex()
5358
5459 // Remove the incompatible compiler plugin from the classpath if found
5560 var isEnabled = false
@@ -82,7 +87,7 @@ internal object GeneratedImportHandler {
8287 return try {
8388 val jar = JarInputStream (FileInputStream (path))
8489 val manifest = jar.manifest
85- manifest.mainAttributes.getValue(" Implementation-Title" ).startsWith( " nl.fabianm.kotlin.plugin.generated " )
90+ manifest.mainAttributes.getValue(" Implementation-Title" ).trim().equals( PLUGIN_IMPLEMENTATION_TITLE , ignoreCase = true )
8691 } catch (_: Exception ) {
8792 false
8893 }
You can’t perform that action at this time.
0 commit comments