diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md index cd99075b3..54661ea58 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_task_awares.md @@ -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 diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md index 693789578..939a28d95 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_tasks.md @@ -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} + + +**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) + + + +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} diff --git a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md index 83db49965..58a10b94c 100644 --- a/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md +++ b/topics/appendix/tools/intellij_platform_gradle_plugin/tools_intellij_platform_gradle_plugin_types.md @@ -84,10 +84,10 @@ The information is retrieved from the product-info.json 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.