Merge branch 'ipgp-2.0'

This commit is contained in:
Jakub Chrzanowski 2024-02-13 18:35:57 +01:00
commit c7e552f37b
No known key found for this signature in database
GPG Key ID: C39095BFD769862E
11 changed files with 3880 additions and 0 deletions

View File

@ -406,6 +406,16 @@
<toc-element toc-title="Migration Guide from 0.x to 1.x"
target-for-accept-web-file-names="https://lp.jetbrains.com/gradle-intellij-plugin/"/>
</toc-element>
<toc-element topic="tools_intellij_platform_gradle_plugin.md">
<toc-element topic="tools_intellij_platform_gradle_plugin_extension.md"/>
<toc-element topic="tools_intellij_platform_gradle_plugin_repositories_extension.md"/>
<toc-element topic="tools_intellij_platform_gradle_plugin_dependencies_extension.md"/>
<toc-element topic="tools_intellij_platform_gradle_plugin_tasks.md"/>
<toc-element topic="tools_intellij_platform_gradle_plugin_task_awares.md"/>
<toc-element topic="tools_intellij_platform_gradle_plugin_types.md"/>
<toc-element topic="tools_intellij_platform_gradle_plugin_build_features.md"/>
<toc-element topic="tools_intellij_platform_gradle_plugin_migration.md"/>
</toc-element>
<toc-element topic="tools_gradle_grammar_kit_plugin.md"/>
<toc-element toc-title="IDE Tooling">
<toc-element topic="internal_actions_intro.md" accepts-web-file-names="interal_actions_menu.html">

View File

@ -0,0 +1,253 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# IntelliJ Platform Gradle Plugin 2.x (EAP)
<link-summary>IntelliJ Platform Gradle Plugin user and migration guide.</link-summary>
<tldr id="tldr">
**Current Release**: %intellij-platform-gradle-plugin-version% (Early Access Preview)
**GitHub**: [Releases & Changelog](https://github.com/JetBrains/gradle-intellij-plugin/releases), [Issue Tracker](https://github.com/JetBrains/gradle-intellij-plugin/issues)
**Slack**: [#intellij-platform-gradle-plugin](https://jetbrains-platform.slack.com/archives/C05C80200LS) on the [JetBrains Platform Slack](https://plugins.jetbrains.com/slack/)
</tldr>
The _IntelliJ Platform Gradle Plugin 2.x_ is a plugin for the Gradle build system to help configure your environment for building, testing, verifying, and publishing plugins for IntelliJ-based IDEs.
It is going to replace the current _[](tools_gradle_intellij_plugin.md) (1.x)_ in the future.
> See [](tools_intellij_platform_gradle_plugin_migration.md) for FAQ.
>
<snippet id="EAP_Status">
> IntelliJ Platform Gradle Plugin 2.x is currently in **Early Access Preview** and may not support all features and project setups yet (see also [](tools_intellij_platform_gradle_plugin.md#requirements)).
> Please report bugs or problems in the GitHub issue tracker or Slack channel (see [here](tools_intellij_platform_gradle_plugin.md#tldr)).
>
> Any documentation issues should be reported using the feedback form on the bottom of this page.
> Please leave your email in case we need more details.
>
> Thanks a lot in advance for your feedback!
>
{title="Early Access Status" style="warning"}
</snippet>
## Requirements
The following platforms and environments are supported:
- IntelliJ Platform: 2022.3 and later
- Java Runtime: 17 and later
- Gradle: 8.1 and later
## Usage
> Please note that the plugin has a new ID `org.jetbrain.intellij.platform`.
>
{style="note"}
To use the current Early Access Preview snapshot versions, add the following to your <path>settings.gradle.kts</path> file:
```kotlin
pluginManagement {
repositories {
maven("https://oss.sonatype.org/content/repositories/snapshots/")
gradlePluginPortal()
}
}
```
In the <path>build.gradle.kts</path> file, replace the existing reference to the [](tools_gradle_intellij_plugin.md) plugin (`org.jetbrains.intellij`) with:
```kotlin
plugins {
id("org.jetbrains.intellij.platform") version "%intellij-platform-gradle-plugin-version%"
}
```
### Subplugins
The plugin was split into subplugins that can be applied separately.
This allows for applying only a subset of features, e.g. when you only use an IntelliJ Platform SDK dependency without creating any tasks.
#### org.jetbrains.intellij.platform
{#plugin.platform}
This plugin applies all project-level plugins, which brings the fully-flagged tooling for plugin development for IntelliJ-based IDEs.
It includes [](#plugin.core) and [](#plugin.tasks) subplugins.
#### org.jetbrains.intellij.platform.core
{#plugin.core}
The base plugin sets up all the custom configurations and transforms needed to manage the IntelliJ Platform SDK, JetBrains Runtime, CLI tools, and other plugins when they're added as dependencies.
#### org.jetbrains.intellij.platform.tasks
{#plugin.tasks}
Tasks plugin registers and preconfigures all tasks introduced by the IntelliJ Platform Gradle Plugin.
It can be omitted when referring to any IntelliJ Platform SDK dependencies without invoking tasks on project submodules.
#### org.jetbrains.intellij.platform.settings
{#plugin.settings}
If you define repositories within the <path>settings.gradle.kts</path> using the `dependencyResolutionManagement` Gradle, make sure to include the Settings plugin in your <path>settings.gradle.kts</path>.
## Configuration
> Auto-completion, Quick Documentation, and other code insight features are available for many extension functions and properties.
>
{title="Exploring Configuration Options"}
### Setting Up Repositories
{#configuration.repositories}
All IntelliJ Platform SDK artifacts are available via IntelliJ Maven repositories (see [](intellij_artifacts.md)), which exist in three variants:
- releases
- snapshots
- nightly (only selected artifacts)
<include from="tools_intellij_platform_gradle_plugin_repositories_extension.md" element-id="recommendedCallout"/>
**Example #2:**
Build a plugin against a release version of the IntelliJ Platform with dependency on a plugin from the JetBrains Marketplace:
```kotlin
repositories {
mavenCentral()
intellijPlatform {
releases()
marketplace()
}
}
```
See [](tools_intellij_platform_gradle_plugin_repositories_extension.md) on how to configure additional repositories.
#### Dependency Resolution Management
{#configuration.dependencyResolutionManagement}
To access the IntelliJ Platform Gradle Plugin within the <path>settings.gradle.kts</path> to use with `dependencyResolutionManagement`, add:
```kotlin
import org.jetbrains.intellij.platform.gradle.extensions.intellijPlatform
plugins {
id("org.jetbrains.intellij.platform.settings") version "%intellij-platform-gradle-plugin-version%"
}
dependencyResolutionManagement {
repositoriesMode = RepositoriesMode.FAIL_ON_PROJECT_REPOS
repositories {
mavenCentral()
intellijPlatform {
defaultRepositories()
}
}
}
```
#### Cache Redirector
{#configuration.cacheRedirector}
Some repositories, by default, point to JetBrains Cache Redirector to provide better resources resolution.
However, it is possible to use the direct repository URL, if available.
To switch off the default usage of JetBrains Cache Redirector, see the [](tools_intellij_platform_gradle_plugin_build_features.md#useCacheRedirector) build feature.
### Setting Up IntelliJ Platform
Dependencies and [repositories](#configuration.repositories) are handled using explicit entries within `dependencies {}` and `repositories {}` blocks in <path>build.gradle.kts</path> file.
A minimum configuration for targeting IntelliJ IDEA Community 2023.3:
```kotlin
repositories {
mavenCentral()
intellijPlatform {
defaultRepositories()
}
}
dependencies {
intellijPlatform {
intellijIdeaCommunity("2023.3")
}
}
```
The `intellijIdeaCommunity` in the previous sample is one of the extension functions available for adding IntelliJ Platform dependencies to the project.
See [](tools_intellij_platform_gradle_plugin_dependencies_extension.md) on how to target other IDEs.
#### Parametrize IntelliJ Platform Dependency
{id="dependenciesParametrizePlatform"}
As a fallback, `intellijPlatform` extension can be used to allow dynamic configuration of the target platform, e.g., via <path>gradle.properties</path>:
```
platformType = IC
platformVersion = 2023.3
```
The above Gradle properties can be referenced in the <path>build.gradle.kts</path> file with:
```kotlin
dependencies {
intellijPlatform {
val type = providers.gradleProperty("platformType")
val version = providers.gradleProperty("platformVersion")
create(type, version)
}
}
```
The `intellijPlatform` helper accepts also the [`IntelliJPlatformType`](tools_intellij_platform_gradle_plugin_types.md#IntelliJPlatformType) type:
```kotlin
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
dependencies {
intellijPlatform {
val version = providers.gradleProperty("platformVersion")
create(IntelliJPlatformType.IntellijIdeaUltimate, version)
}
}
```
#### Local IntelliJ Platform IDE Instance
{id="dependenciesLocalPlatform"}
It is possible to refer to the locally available IntelliJ-based IDE using the `local` helper function:
```kotlin
repositories {
intellijPlatform {
localPlatformArtifacts()
}
}
dependencies {
intellijPlatform {
local("/Users/hsz/Applications/IntelliJ IDEA Ultimate.app")
}
}
```
Note that the `localPlatformArtifacts()` entry needs to be added to the `repositories {}` block as all local dependencies (local IDE, bundled plugins, etc.) rely on the Ivy repositories.
### Setting Up Plugin Dependencies
TODO
<include from="snippets.md" element-id="missingContent"/>

View File

@ -0,0 +1,97 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Build Features
<link-summary>IntelliJ Platform Gradle Plugin build features.</link-summary>
<include from="tools_intellij_platform_gradle_plugin.md" element-id="EAP_Status"/>
The IntelliJ Platform Gradle Plugin exposes a number of build features to control some of the low-level Gradle plugin behaviors.
To enable or disable a particular feature, add a Project property to the <path>gradle.properties</path> file with the following pattern:
```
org.jetbrains.intellij.buildFeature.<buildFeatureName>=<true|false>
```
E.g., to disable the [](#selfUpdateCheck) feature, add this line:
```
org.jetbrains.intellij.platform.buildFeature.selfUpdateCheck=false
```
## noSearchableOptionsWarning
{#noSearchableOptionsWarning}
When the [](tools_intellij_platform_gradle_plugin_tasks.md#buildSearchableOptions) doesn't produce any results, e.g., when the plugin doesn't implement any [Settings](settings.md), a warning is shown to suggest disabling it for better performance with [](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-buildSearchableOptions).
{style="narrow"}
Default value
: `true`
Example
:
```
org.jetbrains.intellij.buildFeature.buildSearchableOptions=false
```
## paidPluginSearchableOptionsWarning
{#paidPluginSearchableOptionsWarning}
Due to IDE limitations, it is impossible to run the IDE in headless mode to collect searchable options for a paid plugin.
As paid plugins require providing a valid license and presenting a UI dialog, it is impossible to handle such a case, and the task will fail.
This feature flag displays the given warning when the task is run by a paid plugin.
{style="narrow"}
Default value
: `true`
Example
:
```
org.jetbrains.intellij.platform.buildFeature.paidPluginSearchableOptionsWarning=false
```
## selfUpdateCheck
{#selfUpdateCheck}
Checks whether the currently used IntelliJ Platform Gradle Plugin is outdated and if a new release is available.
The plugin performs an update check on every run asking the GitHub Releases page for the redirection URL
to the latest version with `HEAD` HTTP request: [](https://github.com/jetbrains/gradle-intellij-plugin/releases/latest).
If the current version is outdated, the plugin will emit a warning with its current and the latest version.
Feature respects the Gradle [`--offline`](https://docs.gradle.org/current/userguide/command_line_interface.html#sec:command_line_execution_options) mode.
> It is strongly suggested to always use the latest available version. Older plugin versions may also not fully support the latest IDE releases.
{style="narrow"}
Default value
: `true`
Example
:
```
org.jetbrains.intellij.platform.buildFeature.selfUpdateCheck=false
```
## useCacheRedirector
{#useCacheRedirector}
By default, JetBrains Cache Redirector is used when resolving Maven repositories or any resources used by the IntelliJ Platform Gradle Plugin.
Due to limitations, sometimes it is desired to limit the list of remote endpoints accessed by Gradle.
It is possible to refer to the direct location (whenever it is possible) by switching off JetBrains Cache Redirector globally.
{style="narrow"}
Default value
: `true`
Example
:
```
org.jetbrains.intellij.platform.buildFeature.useCacheRedirector=false
```

View File

@ -0,0 +1,118 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Dependencies Extension
<link-summary>IntelliJ Platform Gradle Plugin dependencies extension.</link-summary>
<include from="tools_intellij_platform_gradle_plugin.md" element-id="EAP_Status"/>
Extension class for managing IntelliJ Platform dependencies in a Gradle build script applied to the `DependencyHandler`.
This class provides methods for adding dependencies to different IntelliJ Platform products and managing local dependencies.
It also includes methods for adding IntelliJ Platform plugins, IntelliJ Platform bundled plugins, JetBrains Runtime, as well as IntelliJ Plugin Verifier and Marketplace ZIP Signer tools.
> Corresponding required repositories must be defined in `repositories {}` section, see [](tools_intellij_platform_gradle_plugin_repositories_extension.md).
>
{style="note"}
**Example:**
- setup Maven Central and [`defaultRepositories()`](tools_intellij_platform_gradle_plugin_repositories_extension.md#default-repositories)
- target IntelliJ IDEA Community %ijPlatform%
- add dependency on bundled Java plugin
- add IntelliJ Plugin Verifier and Marketplace ZIP Signer CLI tools
```kotlin
repositories {
mavenCentral()
intellijPlatform {
defaultRepositories()
}
}
dependencies {
intellijPlatform {
intellijIdeaCommunity("%ijPlatform%")
bundledPlugin("com.intellij.java")
pluginVerifier()
zipSigner()
}
// other dependencies, e.g., 3rd-party libraries
}
```
> Just one IntelliJ Platform dependency can be added to the project at a time.
>
{style="warning"}
## Default Target Platforms
See [](#custom-target-platforms) for non-default targets.
| Function | Description |
|----------------------------------|------------------------------------------------------------------|
| `androidStudio(version)` | Adds a dependency on [Android Studio](android_studio.md). |
| `clion(version)` | Adds a dependency on [CLion](clion.md). |
| `fleetBackend(version)` | Adds a dependency on Fleet Backend. |
| `gateway(version)` | Adds a dependency on Gateway. |
| `goland(version)` | Adds a dependency on [GoLand](goland.md). |
| `intellijIdeaCommunity(version)` | Adds a dependency on [IntelliJ IDEA Community](idea.md). |
| `intellijIdeaUltimate(version)` | Adds a dependency on [IntelliJ IDEA Ultimate](idea_ultimate.md). |
| `phpstorm(version)` | Adds a dependency on [PhpStorm](phpstorm.md). |
| `pycharmCommunity(version)` | Adds a dependency on [PyCharm Community](pycharm.md). |
| `pycharmProfessional(version)` | Adds a dependency on [PyCharm Professional](pycharm.md). |
| `rider(version)` | Adds a dependency on [Rider](rider.md). |
| `rustRover(version)` | Adds a dependency on Rust Rover. |
| `writerside(version)` | Adds a dependency on Writerside. |
## Custom Target Platforms
| Function | Description |
|-------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
| `create(type, version)` | Adds a configurable dependency on the IntelliJ Platform. See [](tools_intellij_platform_gradle_plugin.md#dependenciesParametrizePlatform). |
| `local(localPath)` | Adds a dependency on a local IntelliJ Platform instance. See [](tools_intellij_platform_gradle_plugin.md#dependenciesLocalPlatform). |
See also:
- [Types: `IntelliJPlatformType`](tools_intellij_platform_gradle_plugin_types.md#IntelliJPlatformType)
## Plugins
| Function | Description |
|--------------------------------|------------------------------------------------------------------------------------------------------------------------------|
| `plugin(id, version, channel)` | Adds a dependency on a plugin for IntelliJ Platform. |
| `plugin(notation)` | Adds a dependency on a plugin for IntelliJ Platform using a string notation (`pluginId:version`, `pluginId:version@channel`) |
| `plugins(notations)` | Adds dependencies on plugins for IntelliJ Platform using a string notation (`pluginId:version`, `pluginId:version@channel`) |
| `bundledPlugin(id)` | Adds a dependency on a bundled IntelliJ Platform plugin. |
| `bundledPlugins(ids)` | Adds dependencies on bundled IntelliJ Platform plugins. |
See also:
- [](plugin_dependencies.md)
## Tools
| Function | Description |
|---------------------------|-------------------------------------------------------------------------------------|
| `pluginVerifier(version)` | Adds a dependency on [IntelliJ Plugin Verifier](verifying_plugin_compatibility.md). |
| `zipSigner(version)` | Adds a dependency on [Marketplace ZIP Signer](plugin_signing.md). |
See also:
- [](verifying_plugin_compatibility.md), [Tasks: `verifyPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin)
- [](plugin_signing.md), [Tasks: `signPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#signPlugin)
## Java Runtime
| Function | Description |
|-----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
| <p>`jetbrainsRuntime(version, variant, architecture)`</p><p>`jetbrainsRuntime(explicitVersion)`</p> | Adds a dependency on [JetBrains Runtime](ide_development_instance.md#using-a-jetbrains-runtime-for-the-development-instance). |
<include from="snippets.md" element-id="missingContent"/>

View File

@ -0,0 +1,58 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Migration Guide from Gradle IntelliJ Plugin
<link-summary>IntelliJ Platform Gradle Plugin 2.x migration guide from Gradle IntelliJ Plugin 1.x</link-summary>
<include from="tools_intellij_platform_gradle_plugin.md" element-id="EAP_Status"/>
## Plugin name change
As the `2.x` branch brings significant breaking changes to the plugin, the name was changed from _Gradle IntelliJ Plugin_ to
_IntelliJ Platform Gradle Plugin_ as the old one was confused with the bundled Gradle support plugin in the IDE.
The plugin is published to the Gradle Plugin Portal with a new name as a new entry, and the old one is marked as deprecated.
## Plugin ID change
Plugin ID has changed from `org.jetbrains.intellij` to `org.jetbrains.intellij.platform`.
To apply it, use:
```kotlin
plugins {
id("org.jetbrains.intellij.platform")
}
```
## Minimum Gradle version
The minimum required Gradle version is now `8.0`, see [Gradle Installation](https://gradle.org/install/) guide on how to upgrade.
See also [](tools_intellij_platform_gradle_plugin.md#requirements).
## `intellij` extension
The `intellij {}` extension is no longer available and was replaced with `intellijPlatform {}`.
Note that the available properties differ, see [](tools_intellij_platform_gradle_plugin_extension.md) for details.
## `setupDependencies` task
To make the IntelliJ SDK dependency available in the IDE, the `setupDependencies` task was provided by Gradle IntelliJ Plugin 1.x.
This task is no longer required, but when switching from 1.x, Gradle may still want to execute it in the _afterSync_ phase.
To completely drop this approach, it is mandatory to remove its reference manually in the IDE.
<procedure title="Removing setupDependencies task">
1. Open <control>Gradle</control> Tool Window
2. Right-click on the main module and select <control>Tasks Activation</control>
3. In the <control>Tasks Activation</control> modal window, find and remove the `setupDependencies` entry.
</procedure>
## Unresolved 'idea-ext' Plugin
Add an explicit dependency on [the plugin](https://github.com/JetBrains/gradle-idea-ext-plugin) in <path>build.gradle.kts</path>:
```kotlin
plugins {
id("org.jetbrains.gradle.plugin.idea-ext") version "1.1.7"
}
```

View File

@ -0,0 +1,93 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Repositories Extension
<link-summary>IntelliJ Platform Gradle Plugin repositories extension.</link-summary>
<include from="tools_intellij_platform_gradle_plugin.md" element-id="EAP_Status"/>
This is an extension class for managing IntelliJ Platform repositories in a Gradle build script.
It's applied to the `RepositoryHandler`.
Available in both `Project` scope and Gradle Settings for `DependencyResolutionManagement`.
It provides methods to add:
- IntelliJ Platform repositories (for releases, snapshots, and nightly builds)
- JetBrains Marketplace repository for fetching plugins
- JetBrains Runtime repository
- Android Studio and IntelliJ Platform binary release repositories (for IntelliJ Plugin Verifier)
- Ivy local repository (for correct access to local dependencies)
<snippet id="recommendedCallout">
> In most cases, simply using [`defaultRepositories()`](tools_intellij_platform_gradle_plugin_repositories_extension.md#default-repositories) repository will be sufficient.
>
{style="tip"}
**Example:**
Setup Maven Central and [`defaultRepositories()`](tools_intellij_platform_gradle_plugin_repositories_extension.md#default-repositories) repositories:
```kotlin
repositories {
mavenCentral()
intellijPlatform {
defaultRepositories()
}
}
```
</snippet>
## Default Repositories
The default repository definition suitable for most plugins.
| Function | Description |
|-------------------------|---------------------------------------------------------------------------------------------------------------------------------------|
| `defaultRepositories()` | Applies a set of recommended repositories required for running the most common tasks provided by the IntelliJ Platform Gradle Plugin. |
It includes:
- `localPlatformArtifacts()` — required to use plugins bundled with IntelliJ Platform or refer to the local IDE
- `releases()` and `snapshots()` — IntelliJ Platform releases channels
- `marketplace()` — JetBrains Marketplace plugins repository
- `binaryReleases()` — JetBrains IDEs releases required for running the IntelliJ Plugin Verifier
## IDE Releases
| Function | Description |
|---------------|---------------------------------------------------------------------------------------------|
| `releases()` | Adds a repository for accessing IntelliJ Platform stable releases. |
| `snapshots()` | Adds a repository for accessing IntelliJ Platform snapshot releases. |
| `nightly()` | Adds a repository for accessing IntelliJ Platform nightly releases, not available publicly. |
See also:
- [](intellij_artifacts.md)
## Binary IDE Releases
| Function | Description |
|---------------------------------|--------------------------------------------------------------------------------------------------------------|
| `binaryReleases()` | Adds a repository for accessing IntelliJ Platform IDE binary releases for use with IntelliJ Plugin Verifier. |
| `binaryReleasesAndroidStudio()` | Adds a repository for accessing Android Studio binary releases for use with IntelliJ Plugin Verifier. |
See also:
- [](verifying_plugin_compatibility.md)
## Additional Repositories
| Function | Description |
|----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `localPlatformArtifacts()` | Certain dependencies, such as the [local IntelliJ Platform instance](tools_intellij_platform_gradle_plugin.md#dependenciesLocalPlatform) and bundled IDE plugins, need extra pre-processing before they can be correctly used by the IntelliJ Platform Gradle Plugin and loaded by Gradle. This pre-processing involves generating XML files that detail these specific artifacts. Once created, these XMLs are stored in a unique custom [Ivy](https://ant.apache.org/ivy/) repository directory. |
| `jetbrainsRuntime()` | Adds a repository for accessing [JetBrains Runtime](ide_development_instance.md#using-a-jetbrains-runtime-for-the-development-instance) releases. |
| `marketplace()` | Adds a repository for accessing plugins hosted on [JetBrains Marketplace](https://plugins.jetbrains.com). |
See also:
- [](plugin_dependencies.md)
<include from="snippets.md" element-id="missingContent"/>

View File

@ -0,0 +1,305 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Task Awares
<link-summary>IntelliJ Platform Gradle Plugin task `*Aware` interfaces.</link-summary>
<include from="tools_intellij_platform_gradle_plugin.md" element-id="EAP_Status"/>
The Task Awares is a set of interfaces that can be applied to custom Gradle tasks and, when registered using the dedicated register method, inject new features or properties with predefined values.
## CoroutinesJavaAgentAware
{#CoroutinesJavaAgentAware}
[`CoroutinesJavaAgentAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/CoroutinesJavaAgentAware.kt)
The interface provides the path to the Java Agent file for the Coroutines library required to enable coroutines debugging.
Inherited also by [`RunnableIdeAware`](#RunnableIdeAware).
### coroutinesJavaAgentFile
{#CoroutinesJavaAgentAware-coroutinesJavaAgentFile}
The path to the coroutines Java Agent file.
{style="narrow"}
Type
: `RegularFileProperty`
Default value
: [`initializeIntellijPlatformPlugin.coroutinesJavaAgent`](tools_intellij_platform_gradle_plugin_tasks.md#initializeIntelliJPlatformPlugin-coroutinesJavaAgent)
## CustomIntelliJPlatformVersionAware
{#CustomIntelliJPlatformVersionAware}
[`CustomIntelliJPlatformVersionAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/CustomIntelliJPlatformVersionAware.kt)
By default, the project with the IntelliJ Platform Gradle Plugin applied required the presence of the IntelliJ Platform, referred to later by various tasks, configurations, and extensions.
The custom IntelliJ Platform concept allows using another version, i.e., to run a guest IDE or tests against it.
When applying this interface to the task, custom configurations to hold new dependencies defined by [`type`](#CustomIntelliJPlatformVersionAware-type) and [`version`](#CustomIntelliJPlatformVersionAware-version) (or [`localPath`](#CustomIntelliJPlatformVersionAware-localPath), if referring to the local IntelliJ Platform instance) are created, as well as a dedicated [`prepareSandbox`](tools_intellij_platform_gradle_plugin_tasks.md#prepareSandbox) task.
Configurations, as well as the task preparing sandbox for running and testing the custom IntelliJ Platform (if required), have a random suffix applied to avoid collisions.
### type
{#CustomIntelliJPlatformVersionAware-type}
An input property to configure the type of the custom IntelliJ Platform.
By default, it refers to the IntelliJ Platform type used by the current project.
{style="narrow"}
Type
: [`IntelliJPlatformType`](tools_intellij_platform_gradle_plugin_types.md#IntelliJPlatformType)
### version
{#CustomIntelliJPlatformVersionAware-version}
An input property to configure the version of the custom IntelliJ Platform.
By default, it refers to the IntelliJ Platform version used by the current project.
{style="narrow"}
Type
: `Property<String>`
### localPath
{#CustomIntelliJPlatformVersionAware-localPath}
An input property to define the path to the local IntelliJ Platform instance to configure the version of the custom IntelliJ Platform.
The local path precedes the IntelliJ Platform resolution using the [`type`](#CustomIntelliJPlatformVersionAware-type) and [`version`](#CustomIntelliJPlatformVersionAware-version) properties.
{style="narrow"}
Type
: `DirectoryProperty`
## IntelliJPlatformVersionAware
{#IntelliJPlatformVersionAware}
[`IntelliJPlatformVersionAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/IntelliJPlatformVersionAware.kt)
This interface provides tasks a possibility for accessing information about the IntelliJ Platform currently used in the project.
The [`intelliJPlatformConfiguration`](#IntelliJPlatformVersionAware-intelliJPlatformConfiguration) input property receives a dependency added to the `intellijPlatform` configuration, which eventually is resolved and lets to access the IntelliJ Platform details such as [`ProductInfo`](tools_intellij_platform_gradle_plugin_types.md#ProductInfo) or the path to the IntelliJ Platform directory.
It is required to have a dependency on the IntelliJ Platform added to the project with helpers available in [](tools_intellij_platform_gradle_plugin_dependencies_extension.md).
### intelliJPlatformConfiguration
{#IntelliJPlatformVersionAware-intelliJPlatformConfiguration}
Holds the `intellijPlatform` configuration with the IntelliJ Platform dependency added.
It should not be directly accessed.
{style="narrow"}
Type
: `ConfigurableFileCollection`
### platformPath
{#IntelliJPlatformVersionAware-platformPath}
Provides a direct path to the IntelliJ Platform dependency artifact.
{style="narrow"}
Type
: `Path`
### productInfo
{#IntelliJPlatformVersionAware-productInfo}
Provides information about the IntelliJ Platform product.
The information is retrieved from the <path>product-info.json</path> file in the IntelliJ Platform directory.
{style="narrow"}
Type
: [`ProductInfo`](tools_intellij_platform_gradle_plugin_types.md#ProductInfo)
### validateIntelliJPlatformVersion()
{#IntelliJPlatformVersionAware-validateIntelliJPlatformVersion}
Validates that the resolved IntelliJ Platform is supported by checking against the minimal supported IntelliJ Platform version.
Invokes [`ProductInfo.validateSupportedVersion()`](tools_intellij_platform_gradle_plugin_types.md#ProductInfo-validateSupportedVersion).
{style="narrow"}
Throws
: `IllegalArgumentException`
## PluginVerifierAware
{#PluginVerifierAware}
[`PluginVerifierAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/PluginVerifierAware.kt)
The interface provides the path to the IntelliJ Plugin Verifier executable.
It is required to have a dependency on the IntelliJ Plugin Verifier added to the project with [`intellijPlatform.pluginVerifier()`](tools_intellij_platform_gradle_plugin_dependencies_extension.md) dependencies extension.
### pluginVerifierExecutable
{#PluginVerifierAware-pluginVerifierExecutable}
Path to the IntelliJ Plugin Verifier executable.
{style="narrow"}
Type
: `RegularFileProperty`
## RunnableIdeAware
{#RunnableIdeAware}
[`RunnableIdeAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/RunnableIdeAware.kt)
The interface which utilizes a set of various interfaces required for running a guest IDE. Inherits from:
- [`CoroutinesJavaAgentAware`](#CoroutinesJavaAgentAware)
- [`RuntimeAware`](#RuntimeAware)
- [`SandboxAware`](#SandboxAware)
- `JavaForkOptions`
## RuntimeAware
{#RuntimeAware}
[`RuntimeAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/RuntimeAware.kt)
This interface provides access to the Java Runtime (i.e., JetBrains Runtime) resolved with `RuntimeResolver`.
### runtimeDirectory
{#RuntimeAware-runtimeDirectory}
Java Runtime parent directory.
{style="narrow"}
Type
: `DirectoryProperty`
### runtimeExecutable
{#RuntimeAware-runtimeExecutable}
Path to the Java Runtime executable.
{style="narrow"}
Type
: `RegularFileProperty`
### runtimeArch
{#RuntimeAware-runtimeArch}
An architecture of the Java Runtime currently used for running Gradle.
{style="narrow"}
Type
: `Property<String>`
## SandboxAware
{#SandboxAware}
[`SandboxAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/SandboxAware.kt)
The interface provides quick access to the sandbox container and specific directories located within it.
The path to the sandbox container is obtained using the [`intellijPlatform.sandboxContainer`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-sandboxContainer) extension property and the type and version of the IntelliJ Platform applied to the project.
Paths respect custom IntelliJ Platform when combined with [`CustomIntelliJPlatformVersionAware`](#CustomIntelliJPlatformVersionAware).
### sandboxSuffix
{#SandboxAware-sandboxSuffix}
Represents the suffix used i.e., for test-related tasks.
{style="narrow"}
Type
: `Property<String>`
### sandboxContainerDirectory
{#SandboxAware-sandboxContainerDirectory}
The container for all sandbox-related directories.
The directory name depends on the platform type and version currently used for running a task.
{style="narrow"}
Type
: `DirectoryProperty`
### sandboxConfigDirectory
{#SandboxAware-sandboxConfigDirectory}
A configuration directory located within the [`sandboxContainerDirectory`](#SandboxAware-sandboxContainerDirectory).
{style="narrow"}
Type
: `DirectoryProperty`
### sandboxPluginsDirectory
{#SandboxAware-sandboxPluginsDirectory}
A plugins directory located within the [`sandboxContainerDirectory`](#SandboxAware-sandboxContainerDirectory).
{style="narrow"}
Type
: `DirectoryProperty`
### sandboxSystemDirectory
{#SandboxAware-sandboxSystemDirectory}
A system directory located within the [`sandboxContainerDirectory`](#SandboxAware-sandboxContainerDirectory).
{style="narrow"}
Type
: `DirectoryProperty`
### sandboxLogDirectory
{#SandboxAware-sandboxLogDirectory}
A log directory located within the [`sandboxContainerDirectory`](#SandboxAware-sandboxContainerDirectory).
{style="narrow"}
Type
: `DirectoryProperty`
## SigningAware
{#SigningAware}
[`SigningAware`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/aware/SigningAware.kt)
The interface provides the path to the Marketplace ZIP Signer executable.
It is required to have a dependency on the Marketplace ZIP Signer added to the project with [`intellijPlatform.zipSigner()`](tools_intellij_platform_gradle_plugin_dependencies_extension.md) dependencies extension.
### zipSignerExecutable
{#SigningAware-zipSignerExecutable}
Path to the Marketplace ZIP Signer executable.
{style="narrow"}
Type
: `RegularFileProperty`
<include from="snippets.md" element-id="missingContent"/>

View File

@ -0,0 +1,179 @@
<!-- Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. -->
# Types
<link-summary>IntelliJ Platform Gradle Plugin data types, enums, and constants.</link-summary>
<include from="tools_intellij_platform_gradle_plugin.md" element-id="EAP_Status"/>
## FailureLevel
{#FailureLevel}
[`VerifyPluginTask.FailureLevel`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginTask.kt)
Enum class describing the failure level of the IntelliJ Plugin Verifier CLI tool run with the [`verifyPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin) task.
| Name | Description |
|------------------------------------|-------------------------------------------------------------------------------------|
| `COMPATIBILITY_WARNINGS` | Compatibility warnings detected against the specified IDE version. |
| `COMPATIBILITY_PROBLEMS` | Compatibility problems detected against the specified IDE version. |
| `DEPRECATED_API_USAGES` | Plugin uses API marked as deprecated (`@Deprecated`). |
| `SCHEDULED_FOR_REMOVAL_API_USAGES` | Plugin uses API marked as scheduled for removal (`ApiStatus.@ScheduledForRemoval`). |
| `EXPERIMENTAL_API_USAGES` | Plugin uses API marked as experimental (`ApiStatus.@Experimental`). |
| `INTERNAL_API_USAGES` | Plugin uses API marked as internal (`ApiStatus.@Internal`). |
| `OVERRIDE_ONLY_API_USAGES` | Override-only API is used incorrectly (`ApiStatus.@OverrideOnly`). |
| `NON_EXTENDABLE_API_USAGES` | Non-extendable API is used incorrectly (`ApiStatus.@NonExtendable`). |
| `PLUGIN_STRUCTURE_WARNINGS` | The structure of the plugin is not valid. |
| `MISSING_DEPENDENCIES` | Plugin has some dependencies missing. |
| `INVALID_PLUGIN` | Provided plugin artifact is not valid. |
| `NOT_DYNAMIC` | Plugin probably cannot be enabled or disabled without IDE restart |
| `ALL` | Contains all possible options. |
| `NONE` | Contains no option. |
See also:
- [Extension: `intellijPlatform.verifyPlugin.failureLevel`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-verifyPlugin-failureLevel)
- [Tasks: `verifyPlugin.failureLevel`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin-failureLevel)
## IntelliJPlatformType
{#IntelliJPlatformType}
[`IntelliJPlatformType`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/IntelliJPlatformType.kt)
Describes all IntelliJ Platform types available to be used for plugin development, dependency resolution, and plugin verification.
Each entry is composed of a product code name and coordinates used for dependency and binary release resolution.
| Name | Code | Coordinates |
|-------------------------|--------|----------------------------------------------------|
| `AndroidStudio` | `AI` | `com.google.android.studio:studio` |
| `CLion` | `CL` | `com.jetbrains.intellij.clion:clion` |
| `Fleet` | `FLIJ` | `com.jetbrains.intellij.fleetBackend:fleetBackend` |
| `Gateway` | `GW` | `com.jetbrains.intellij.gateway:gateway` |
| `GoLand` | `GO` | `com.jetbrains.intellij.goland:goland` |
| `IntellijIdeaCommunity` | `IC` | `com.jetbrains.intellij.idea:ideaIC` |
| `IntellijIdeaUltimate` | `IU` | `com.jetbrains.intellij.idea:ideaIU` |
| `PhpStorm` | `PS` | `com.jetbrains.intellij.phpstorm:phpstorm` |
| `PyCharmProfessional` | `PY` | `com.jetbrains.intellij.pycharm:pycharmPY` |
| `PyCharmCommunity` | `PC` | `com.jetbrains.intellij.pycharm:pycharmPC` |
| `Rider` | `RD` | `com.jetbrains.intellij.rider:riderRD` |
| `RustRover` | `RR` | `com.jetbrains.intellij.rustrover:RustRover` |
| `Writerside` | `WRS` | `com.jetbrains.intellij.idea:writerside` |
## ProductInfo
{#ProductInfo}
Represents information about the IntelliJ Platform product.
The information is retrieved from the <path>product-info.json</path> file in the IntelliJ Platform directory.
| Name | Description |
|-------------------|--------------------------------------------------------------------------|
| name | The product's name, like "IntelliJ IDEA". |
| version | The marketing version of the product, like "2023.2". |
| versionSuffix | The suffix of the version, like "EAP". |
| buildNumber | The build number of the product, like "232.8660.185". |
| productCode | The product code, like "IU". |
| dataDirectoryName | The directory name of the product data. |
| svgIconPath | The path to the SVG icon of the product. |
| productVendor | The vendor of the product. |
| launch | The list of OS- and arch-specific launch configurations for the product. |
| customProperties | The list of custom properties of the product. |
| bundledPlugins | The list of bundled plugins provided with the current release. |
| fileExtensions | The list of file extensions associated with the product. |
| modules | The list of modules of the product. |
### validateSupportedVersion()
{#ProductInfo-validateSupportedVersion}
Validates that the resolved IntelliJ Platform is supported by checking against the minimal supported IntelliJ Platform version.
If the provided version is lower, an `IllegalArgumentException` is thrown with an appropriate message.
{style="narrow"}
Throws
: `IllegalArgumentException`
## ProductRelease.Channel
{#ProductRelease-Channel}
[`ProductRelease.Channel`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/model/ProductRelease.kt)
List of available channels used by JetBrains IDEs and Android Studio for describing binary releases.
| Name | JetBrains IDEs | Android Studio |
|-------------|:--------------:|:--------------:|
| `EAP` | X | |
| `MILESTONE` | | X |
| `BETA` | | X |
| `RELEASE` | X | X |
| `CANARY` | | X |
| `PATCH` | | X |
| `RC` | | X |
| `PREVIEW` | | X |
See also:
- [Extension: `intellijPlatform.verifyPlugin.ides`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-verifyPlugin-ides)
- [Tasks: `printProductsReleases`](tools_intellij_platform_gradle_plugin_tasks.md#printProductsReleases)
## ProductReleasesValueSource.FilterParameters
{#ProductReleasesValueSource-FilterParameters}
[`ProductReleasesValueSource.FilterParameters`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/provider/ProductReleasesValueSource.kt)
Interface that provides a clear way to filter binary product releases for the purposes of IntelliJ Plugin Verifier.
| Name | Description |
|--------------|------------------------------------------------------------------------------------------------------|
| `sinceBuild` | Build number from which the binary IDE releases will be matched. |
| `untilBuild` | Build number until which the binary IDE releases will be matched. |
| `types` | A list of [`IntelliJPlatformType`](#IntelliJPlatformType) types to match. |
| `channels` | A list of [`ProductRelease.Channel`](#ProductRelease-Channel) types of binary releases to search in. |
See also:
- [Extension: `intellijPlatform.verifyPlugin.ides`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-verifyPlugin-ides)
- [Tasks: `printProductsReleases`](tools_intellij_platform_gradle_plugin_tasks.md#printProductsReleases)
## Subsystems
{#Subsystems}
[`VerifyPluginTask.Subsystems`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginTask.kt)
Specifies which subsystems of the IDE should be checked by the IntelliJ Plugin Verifier CLI tool run with the [`verifyPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin) task.
| Name | Description |
|-------------------|----------------------------------------------|
| `ALL` | Verify all code. |
| `ANDROID_ONLY` | Verify only code related to Android support. |
| `WITHOUT_ANDROID` | Exclude problems related to Android support. |
See also:
- [Extension: `intellijPlatform.verifyPlugin.subsystemsToCheck`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-verifyPlugin-subsystemsToCheck)
- [Tasks: `verifyPlugin.subsystemsToCheck`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin-subsystemsToCheck)
## VerificationReportsFormats
{#VerificationReportsFormats}
[`VerifyPluginTask.VerificationReportsFormats`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/VerifyPluginTask.kt)
Enum class describing the type of the results produced by the IntelliJ Plugin Verifier CLI tool run with the [`verifyPlugin`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin) task.
| Name | Description |
|------------|--------------------------------|
| `PLAIN` | Plain text file. |
| `HTML` | HTML formatted output file. |
| `MARKDOWN` | Markdown file. |
| `ALL` | Contains all possible options. |
| `NONE` | Contains no option. |
See also:
- [Extension: `intellijPlatform.verifyPlugin.verificationReportsFormats`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-verifyPlugin-verificationReportsFormats)
- [Tasks: `verifyPlugin.verificationReportsFormats`](tools_intellij_platform_gradle_plugin_tasks.md#verifyPlugin-verificationReportsFormats)
<include from="snippets.md" element-id="missingContent"/>

3
v.list
View File

@ -19,6 +19,9 @@
<var name="gh-jcef" value="https://github.com/JetBrains/jcef/tree/master/java"/>
<var name="gh-ijpgp" value="https://github.com/JetBrains/gradle-intellij-plugin/blob/2.0"/>
<var name="gradle-intellij-plugin-version" value="1.17.1"/>
<var name="gradle-grammar-kit-plugin-version" value="2022.3.2.1"/>
<var name="intellij-platform-gradle-plugin-version" value="2.0.0-SNAPSHOT"/>
</vars>