in intellij-plugin-structure/structure-intellij/src/main/java/com/jetbrains/plugin/structure/intellij/verifiers/LegacyIntelliJIdeaPluginVerifier.kt [52:69]
fun verify(plugin: IdePlugin): VerificationResult {
if (plugin is IdeModule || plugin.hasPackagePrefix || plugin.contentModules.isNotEmpty()) return NotLegacyPlugin
val dependencies = plugin.dependencies
if (dependencies.isEmpty()) {
return VerificationResult.NoDependencies
} else {
val v1Dependencies = dependencies.filterIsInstance<PluginV1Dependency>()
// Due to confusing semantics we might need to check old-style module declarations
val oldSemanticsModuleDependencies = dependencies.filterIsInstance<PluginDependencyImpl>()
val moduleCandidates = v1Dependencies + oldSemanticsModuleDependencies
if (dependsOnAnyModuleAvailableInAllProducts(moduleCandidates)) return NotLegacyPlugin
if (dependsOnAnyModuleWithComIntellijModulesPrefix(moduleCandidates)) return NotLegacyPlugin
if (dependencies.any { it is PluginV2Dependency }) return NotLegacyPlugin
return VerificationResult.NoModuleDependencies
}
}