All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jetbrains.plugin.structure.intellij.plugin.PluginBeans.kt Maven / Gradle / Ivy

Go to download

Library for parsing JetBrains IDE plugins. Can be used to verify that plugin complies with JetBrains Marketplace requirements.

There is a newer version: 3.290
Show newest version
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