IntelliJ Platform Testing Extension
The IntelliJ Platform Gradle Plugin introduces a top-level intellijPlatformExtension
extension. It provides a possibility for registering custom tasks for running the IDE, unit tests, UI tests, or performance tests.
For each of the custom tasks, a dedicated sandbox is created to isolate them form other tasks or the build flow as they may rely on a different IntelliJ Platform version, plugins, or other configuration.
IntelliJ Platform Testing
After the IntelliJ Platform Gradle Plugin is applied, the intellijPlatformTesting
extension can be used for registering new tasks to fulfil specific requirements of the project.
The extension exposes four NamedDomainObjectContainers
which allow for creating new objects of given types. Registering of a custom task which allows for adjusting the IntelliJ Platform type and version can be done by using one of the below containers, depending on the task purpose.
Example:
By default, created tasks depend on the IntelliJ Platform defined with Dependencies Extension. However, it is possible to adjust it to any requirements with passing custom values directly to the created object, task
, or sandboxTask
task instances.
Example:
task {}
Depending on the type of registered object, a different task
class is available for configuration:
Type | Task class |
---|---|
| |
| |
| |
|
prepareSandboxTask {}
The prepareSandboxTask
refers to a dedicated PrepareSandboxTask
task instance, connected only with a newly created task. The name of this task is based on the name of created task, like prepareSandbox_[TASK_NAME]
.
plugins {}
An extension to provide custom plugins to be added when running the task runtime, or disabling bundled ones.
It provides several methods for adding remote and local plugins, or for disabling already loaded or bundled plugin.
Example:
Function | Description |
---|---|
| Adds a dependency on a plugin for a custom IntelliJ Platform. |
| Adds a dependency on a plugin for a custom IntelliJ Platform using a string notation:
|
| Adds dependencies on plugins for a custom IntelliJ Platform using a string notation:
|
| Disables the specific plugin with its ID. |
| Disables specific plugins with the list of their IDs. |
| Adds a dependency on a local IntelliJ Platform plugin. Accepts path or a dependency on another module. |
| Adds a dependency on a Robot Server Plugin. |