mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-30 02:07:50 +08:00
IntelliJ Platform Gradle Plugin: runIde
task
This commit is contained in:
parent
a3fc8fff1c
commit
c34ddf3adb
@ -126,12 +126,12 @@ Type
|
||||
: [`ProductInfo`](tools_intellij_platform_gradle_plugin_types.md#ProductInfo)
|
||||
|
||||
|
||||
### assertIntelliJPlatformSupportedVersion()
|
||||
{#IntelliJPlatformVersionAware-assertIntelliJPlatformSupportedVersion}
|
||||
### validateIntelliJPlatformVersion()
|
||||
{#IntelliJPlatformVersionAware-validateIntelliJPlatformVersion}
|
||||
|
||||
Asserts that the resolved IntelliJ Platform is supported by checking against the minimal supported IntelliJ Platform version.
|
||||
Validates that the resolved IntelliJ Platform is supported by checking against the minimal supported IntelliJ Platform version.
|
||||
|
||||
Invokes [`ProductInfo.assertSupportedVersion()`](tools_intellij_platform_gradle_plugin_types.md#ProductInfo-assertSupportedVersion).
|
||||
Invokes [`ProductInfo.validateSupportedVersion()`](tools_intellij_platform_gradle_plugin_types.md#ProductInfo-validateSupportedVersion).
|
||||
|
||||
{style="narrow"}
|
||||
Throws
|
||||
|
@ -29,6 +29,7 @@ flowchart
|
||||
printBundledPlugins
|
||||
printProductsReleases
|
||||
publishPlugin
|
||||
runIde
|
||||
signPlugin
|
||||
|
||||
jarSearchableOptions & prepareSandbox --> buildPlugin
|
||||
@ -59,6 +60,8 @@ flowchart
|
||||
click printBundledPlugins "#printBundledPlugins"
|
||||
click printProductsReleases "#printProductsReleases"
|
||||
click publishPlugin "#publishPlugin"
|
||||
click runIde "#runIde"
|
||||
click signPlugin "#signPlugin"
|
||||
|
||||
style classpathIndexCleanup stroke-dasharray: 5 5
|
||||
style instrumentCode stroke-dasharray: 5 5
|
||||
@ -891,14 +894,38 @@ Default value
|
||||
: [`intellijPlatform.publishing.toolboxEnterprise`](tools_intellij_platform_gradle_plugin_extension.md#intellijPlatform-publishing-toolboxEnterprise)
|
||||
|
||||
|
||||
> Not implemented.
|
||||
>
|
||||
{style="warning"}
|
||||
|
||||
|
||||
## runIde
|
||||
{#runIde}
|
||||
|
||||
<tldr>
|
||||
|
||||
**Sources**: [`RunIdeTask`](%gh-ijpgp%/src/main/kotlin/org/jetbrains/intellij/platform/gradle/tasks/RunIdeTask.kt)
|
||||
|
||||
**Extends**: [`JavaExec`][gradle-javaexec-task], [`RunnableIdeAware`](tools_intellij_platform_gradle_plugin_task_awares.md#RunnableIdeAware), [`CustomIntelliJPlatformVersionAware`](tools_intellij_platform_gradle_plugin_task_awares.md#CustomIntelliJPlatformVersionAware)
|
||||
|
||||
</tldr>
|
||||
|
||||
Runs the IDE instance using the currently selected IntelliJ Platform with the built plugin loaded.
|
||||
It directly extends the [`JavaExec`][gradle-javaexec-task] Gradle task, which allows for an extensive configuration (system properties, memory management, etc.).
|
||||
|
||||
This task class also inherits from [`CustomIntelliJPlatformVersionAware`](tools_intellij_platform_gradle_plugin_task_awares.md#CustomIntelliJPlatformVersionAware), which makes it possible to create `runIde` tasks using custom IntelliJ Platform versions:
|
||||
|
||||
```Kotlin
|
||||
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
|
||||
import org.jetbrains.intellij.platform.gradle.tasks.RunIdeTask
|
||||
|
||||
tasks {
|
||||
val runPhpStorm by registering(RunIdeTask::class) {
|
||||
type = IntelliJPlatformType.PhpStorm
|
||||
version = "2023.2.2"
|
||||
}
|
||||
|
||||
val runLocalIde by registering(RunIdeTask::class) {
|
||||
localPath = file("/Users/hsz/Applications/Android Studio.app")
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## setupDependencies
|
||||
{#setupDependencies}
|
||||
|
@ -84,10 +84,10 @@ The information is retrieved from the <path>product-info.json</path> file in the
|
||||
| fileExtensions | The list of file extensions associated with the product. |
|
||||
| modules | The list of modules of the product. |
|
||||
|
||||
### assertSupportedVersion()
|
||||
{#ProductInfo-assertSupportedVersion}
|
||||
### validateSupportedVersion()
|
||||
{#ProductInfo-validateSupportedVersion}
|
||||
|
||||
Asserts that the resolved IntelliJ Platform is supported by checking against the minimal supported IntelliJ Platform version.
|
||||
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.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user