com.jetbrains.plugin.structure.intellij.plugin.PluginBeans.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of structure-intellij Show documentation
Show all versions of structure-intellij Show documentation
Library for parsing JetBrains IDE plugins. Can be used to verify that plugin complies with JetBrains Marketplace requirements.
package com.jetbrains.plugin.structure.intellij.plugin
import com.jetbrains.plugin.structure.intellij.beans.PluginBean
import com.jetbrains.plugin.structure.intellij.beans.PluginDependenciesPluginBean
import com.jetbrains.plugin.structure.intellij.beans.PluginDependencyBean
import com.jetbrains.plugin.structure.intellij.beans.PluginModuleBean
internal const val INTELLIJ_MODULE_PREFIX = "com.intellij.modules."
internal val PluginBean.dependenciesV1: List
get() = dependencies
?.filter { it.dependencyId != null }
?: emptyList()
internal val PluginBean.dependentModules: List
get() = dependenciesV2?.modules?.filter { it.moduleName != null } ?: emptyList()
internal val PluginBean.dependentPlugins: List
get() = dependenciesV2?.plugins?.filter { it.dependencyId != null } ?: emptyList()
internal val PluginDependencyBean.isOptional: Boolean
get() = optional ?: false
internal val PluginDependencyBean.isModule: Boolean
get() = dependencyId?.startsWith(INTELLIJ_MODULE_PREFIX) == true
© 2015 - 2025 Weber Informatics LLC | Privacy Policy