Incorporated Gradle info about Sandbox Home directory.

This commit is contained in:
JohnHake 2018-09-12 11:19:37 -07:00
parent d75e1930e7
commit 12a61c2fb8
2 changed files with 33 additions and 19 deletions

View File

@ -6,29 +6,34 @@ A JetBrains feature for developing plugins is to run or debug a plugin project f
[Selecting the **Run** menu](https://www.jetbrains.com/help/idea/running-and-debugging-plugins.html) will launch
a _Development Instance_ of the IDE with your plugin enabled.
This page describes where the settings, caches, logs, and plugins are located for a Development Instance of the IDE.
This information is stored in a different location than for the
The **Sandbox Home** directory contains the
[settings, caches, logs, and plugins](#development-instance-settings-caches-logs-and-plugins)
for a Development Instance of the IDE. This information is stored in a different location than for the
[installed IDE itself](https://intellij-support.jetbrains.com/hc/en-us/articles/206544519-Directories-used-by-the-IDE-to-store-settings-caches-plugins-and-logs).
Please review the documentation for the installed IDE to understand conventions about product names and versions.
These conventions are used below.
### Directory Locations for Development Instances of the IDE
Development Instance configuration data is stored in the **Sandbox Home** directory defined in the IntelliJ Platform SDK
for a plugin project. See [Specify the **Sandbox Home** directory](/basics/getting_started/setting_up_environment.md) for information about
specifying a custom **Sandbox Home** location.
### Sandbox Home Location for Gradle-Based Plugin Projects
For Gradle-based plugins, the default **Sandbox Home** location is defined by the IntelliJ Platform `gradle-intellij-plugin`.
See [Configuring a Gradle Plugin Project](/tutorials/build_system/prerequisites.md)
for more information about specifying a **Sandbox Home** location. The default **Sandbox Home** location
for Gradle-based plugin projects is:
* **Windows** `<Project Dir>\build\idea-sandbox`
* **Linux or Macos** `<Project Dir>/build/idea-sandbox`
The default **Sandbox Home** directory locations are:
### Sandbox Home Location for DevKit-Based Plugin Projects
For DevKit-based plugins, the default **Sandbox Home** location is defined in the IntelliJ Platform Plugin SDK.
See specifying the [Sandbox Home for DevKit Projects](/basics/getting_started/setting_up_environment.md) for more information.
The default **Sandbox Home** directory location for DevKit-based plugin projects is:
* **Windows:** `<User home>\.<product_system_name><product_version>\system\plugins-sandbox\`
* **Linux:** `~/.<product_system_name><product_version>/system/plugins-sandbox/`
* **Macos** `~/Library/Caches/<product_system_name><product_version>/plugins-sandbox/`
Within those directories are subdirectories pertaining to the Development Instance:
### Development Instance Settings, Caches, Logs, and Plugins
Within the **Sandbox Home** directory are subdirectories pertaining to the Development Instance:
* `config` contains settings for the IDE instance.
* `plugins` contains folders for each plugin being run in the IDE instance.
* `system/caches or system\caches` holds the IDE instance data.
* `system/log or system\log` contains the `idea.log` file for the IDE instance.
* `system/caches` or `system\caches` holds the IDE instance data.
* `system/log` or `system\log` contains the `idea.log` file for the IDE instance.
Each of these **Sandbox Home** subdirectories can be manually cleared to reset the IDE Development Instance.
At the next launch of a Development Instance the subdirectories will be repopulated with the appropriate information.

View File

@ -1,20 +1,20 @@
---
title: Getting Started
title: Getting Started with Gradle
---
Adding Gradle build support to an IntelliJ Platform Plugin requires a recent distribution to the Gradle build system and IntelliJ IDEA (Community or Ultimate).
### 1.0. Download and install IntelliJ IDEA
### 1.0 Download and Install IntelliJ IDEA
Download and install either IntelliJ IDEA Ultimate or the IntelliJ IDEA Community Edition.
### 1.1. Ensure the Gradle plugin and 'Plugin DevKit' plugin are enabled
### 1.1 Ensure the Gradle Plugin and 'Plugin DevKit' Plugin are Enabled
You can verify that the plugins are enabled by visiting **Settings \| Plugins**.
<img src="img/step0_gradle_enabled.png" alt="Ensure the Gradle plugin is enabled" width="858px"/>
### 1.2. Create plugin project from scratch
### 1.2 Create a Plugin Project from Scratch
IntelliJ IDEA supports automatically creating new plugin projects using Gradle, with all the necessary build.gradle
setup performed automatically. This can also be used to convert an existing plugin to Gradle, if Gradle is not able to
@ -35,8 +35,17 @@ Finally, specify a JVM Gradle will use, it can be the Project JDK. You also conf
<img src="img/step3_gradle_config.png" alt="Verify the JVM is the correct version" width="800px"/>
### 1.3 Configuring a Gradle Plugin Project
Support for Gradle-based plugin projects is provided by the IntelliJ Platform `gradle-intellij-plugin`.
See the [Gradle plugin README](https://github.com/JetBrains/gradle-intellij-plugin/blob/master/README.md#gradle) for more information.
For example, to configure the **Sandbox Home** directory's location include the following in the project's `build.gradle` file:
```groovy
intellij {
sandboxDirectory = "$project.buildDir/myCustom-sandbox"
}
```
### 1.3. Add Gradle support to an existing plugin
### 1.4 Add Gradle Support to an Existing Plugin
To add Gradle support to an existing plugin project, create a `build.gradle` file under the root directory, with at least the following contents:
@ -73,7 +82,7 @@ gradle cleanIdea idea
This will clean any existing IntelliJ IDEA configuration files and generate a new Gradle build configuration recognized by IntelliJ IDEA. Once your project refreshes, you should be able to view the Gradle tool window displayed under **View \| Tool Windows \| Gradle**. This indicates that IntelliJ IDEA recognizes the Gradle facet.
### 1.4. Running a simple plugin
### 1.5 Running a Simple Plugin
Now add a new `HelloAction` class and `plugin.xml` in the `META-INF` folder: