Compare commits
No commits in common. "main" and "v1.14.2" have entirely different histories.
BIN
.github/readme/draft-release.png
vendored
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 92 KiB |
BIN
.github/readme/run-debug-configurations.png
vendored
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 97 KiB |
BIN
.github/readme/run-logs.png
vendored
Before Width: | Height: | Size: 195 KiB After Width: | Height: | Size: 123 KiB |
BIN
.github/readme/settings-secrets.png
vendored
Before Width: | Height: | Size: 345 KiB After Width: | Height: | Size: 264 KiB |
BIN
.github/readme/use-this-template.png
vendored
Before Width: | Height: | Size: 234 KiB After Width: | Height: | Size: 175 KiB |
9
.github/template-cleanup/README.md
vendored
@ -11,7 +11,7 @@
|
||||
- [ ] Adjust the plugin description in `README` (see [Tips][docs:plugin-description])
|
||||
- [ ] Review the [Legal Agreements](https://plugins.jetbrains.com/docs/marketplace/legal-agreements.html?from=IJPluginTemplate).
|
||||
- [ ] [Publish a plugin manually](https://plugins.jetbrains.com/docs/intellij/publishing-plugin.html?from=IJPluginTemplate) for the first time.
|
||||
- [ ] Set the `MARKETPLACE_ID` in the above README badges. You can obtain it once the plugin is published to JetBrains Marketplace.
|
||||
- [ ] Set the `MARKETPLACE_ID` in the above README badges. You can obtain it once the plugin is published to the marketplace.
|
||||
- [ ] Set the [Plugin Signing](https://plugins.jetbrains.com/docs/intellij/plugin-signing.html?from=IJPluginTemplate) related [secrets](https://github.com/JetBrains/intellij-platform-plugin-template#environment-variables).
|
||||
- [ ] Set the [Deployment Token](https://plugins.jetbrains.com/docs/marketplace/plugin-upload.html?from=IJPluginTemplate).
|
||||
- [ ] Click the <kbd>Watch</kbd> button on the top of the [IntelliJ Platform Plugin Template][template] to be notified about releases containing new features and fixes.
|
||||
@ -31,13 +31,6 @@ To keep everything working, do not remove `<!-- ... -->` sections.
|
||||
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "%NAME%"</kbd> >
|
||||
<kbd>Install</kbd>
|
||||
|
||||
- Using JetBrains Marketplace:
|
||||
|
||||
Go to [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/MARKETPLACE_ID) and install it by clicking the <kbd>Install to ...</kbd> button in case your IDE is running.
|
||||
|
||||
You can also download the [latest release](https://plugins.jetbrains.com/plugin/MARKETPLACE_ID/versions) from JetBrains Marketplace and install it manually using
|
||||
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>
|
||||
|
||||
- Manually:
|
||||
|
||||
Download the [latest release](https://github.com/%REPOSITORY%/releases/latest) and install it manually using
|
||||
|
10
.github/template-cleanup/gradle.properties
vendored
@ -7,21 +7,19 @@ pluginRepositoryUrl = https://github.com/%REPOSITORY%
|
||||
pluginVersion = 0.0.1
|
||||
|
||||
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
|
||||
pluginSinceBuild = 233
|
||||
pluginSinceBuild = 232
|
||||
pluginUntilBuild = 242.*
|
||||
|
||||
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
|
||||
platformType = IC
|
||||
platformVersion = 2023.3.8
|
||||
platformVersion = 2023.2.7
|
||||
|
||||
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
|
||||
# Example: platformPlugins = com.jetbrains.php:203.4449.22, org.intellij.scala:2023.3.27@EAP
|
||||
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
|
||||
platformPlugins =
|
||||
# Example: platformBundledPlugins = com.intellij.java
|
||||
platformBundledPlugins =
|
||||
|
||||
# Gradle Releases -> https://github.com/gradle/gradle/releases
|
||||
gradleVersion = 8.10.2
|
||||
gradleVersion = 8.9
|
||||
|
||||
# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib
|
||||
kotlin.stdlib.default.dependency = false
|
||||
|
21
.github/workflows/build.yml
vendored
@ -53,7 +53,9 @@ jobs:
|
||||
|
||||
# Setup Gradle
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
with:
|
||||
gradle-home-cache-cleanup: true
|
||||
|
||||
# Set environment variables
|
||||
- name: Export Properties
|
||||
@ -71,6 +73,8 @@ jobs:
|
||||
echo "$CHANGELOG" >> $GITHUB_OUTPUT
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier
|
||||
|
||||
# Build plugin
|
||||
- name: Build plugin
|
||||
run: ./gradlew buildPlugin
|
||||
@ -113,7 +117,9 @@ jobs:
|
||||
|
||||
# Setup Gradle
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
with:
|
||||
gradle-home-cache-cleanup: true
|
||||
|
||||
# Run tests
|
||||
- name: Run Tests
|
||||
@ -154,9 +160,6 @@ jobs:
|
||||
# Check out the current repository
|
||||
- name: Fetch Sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
|
||||
fetch-depth: 0 # a full history is required for pull request analysis
|
||||
|
||||
# Set up Java environment for the next steps
|
||||
- name: Setup Java
|
||||
@ -167,7 +170,7 @@ jobs:
|
||||
|
||||
# Run Qodana inspections
|
||||
- name: Qodana - Code Inspection
|
||||
uses: JetBrains/qodana-action@v2024.2
|
||||
uses: JetBrains/qodana-action@v2024.1.5
|
||||
with:
|
||||
cache-default-branch-only: true
|
||||
|
||||
@ -198,7 +201,9 @@ jobs:
|
||||
|
||||
# Setup Gradle
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
with:
|
||||
gradle-home-cache-cleanup: true
|
||||
|
||||
# Cache Plugin Verifier IDEs
|
||||
- name: Setup Plugin Verifier IDEs Cache
|
||||
@ -209,7 +214,7 @@ jobs:
|
||||
|
||||
# Run Verify Plugin task and IntelliJ Plugin Verifier tool
|
||||
- name: Run Plugin Verification tasks
|
||||
run: ./gradlew verifyPlugin -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
|
||||
run: ./gradlew runPluginVerifier -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
|
||||
|
||||
# Collect Plugin Verifier Result
|
||||
- name: Collect Plugin Verifier Result
|
||||
|
6
.github/workflows/release.yml
vendored
@ -33,7 +33,9 @@ jobs:
|
||||
|
||||
# Setup Gradle
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
with:
|
||||
gradle-home-cache-cleanup: true
|
||||
|
||||
# Set environment variables
|
||||
- name: Export Properties
|
||||
@ -49,7 +51,7 @@ jobs:
|
||||
echo "$CHANGELOG" >> $GITHUB_OUTPUT
|
||||
echo "EOF" >> $GITHUB_OUTPUT
|
||||
|
||||
# Update the Unreleased section with the current release note
|
||||
# Update Unreleased section with the current release note
|
||||
- name: Patch Changelog
|
||||
if: ${{ steps.properties.outputs.changelog != '' }}
|
||||
env:
|
||||
|
4
.github/workflows/run-ui-tests.yml
vendored
@ -44,7 +44,9 @@ jobs:
|
||||
|
||||
# Setup Gradle
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
with:
|
||||
gradle-home-cache-cleanup: true
|
||||
|
||||
# Run IDEA prepared for UI testing
|
||||
- name: Run IDE
|
||||
|
1
.gitignore
vendored
@ -1,5 +1,4 @@
|
||||
.gradle
|
||||
.idea
|
||||
.intellijPlatform
|
||||
.qodana
|
||||
build
|
||||
|
25
.run/Run IDE for UI Tests.run.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Run IDE for UI Tests" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" value="" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="runIdeForUiTests" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" />
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<RunAsTest>false</RunAsTest>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
@ -1,6 +1,6 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Run Plugin" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<log_file alias="IDE logs" path="$PROJECT_DIR$/build/idea-sandbox/*/log/idea.log" show_all="true" />
|
||||
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
@ -19,7 +19,6 @@
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<RunAsTest>false</RunAsTest>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
24
.run/Run Qodana.run.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Run Qodana" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" value="" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="qodanaScan" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" />
|
||||
</ExternalSystemSettings>
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<RunAsTest>false</RunAsTest>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
@ -11,7 +11,7 @@
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list>
|
||||
<option value="verifyPlugin" />
|
||||
<option value="runPluginVerifier" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="vmOptions" value="" />
|
||||
@ -19,7 +19,8 @@
|
||||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
|
||||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
|
||||
<DebugAllEnabled>false</DebugAllEnabled>
|
||||
<RunAsTest>false</RunAsTest>
|
||||
<method v="2" />
|
||||
<method v="2">
|
||||
<option name="Gradle.BeforeRunTask" enabled="true" tasks="clean" externalProjectPath="$PROJECT_DIR$" vmOptions="" scriptParameters="" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
48
CHANGELOG.md
@ -6,43 +6,6 @@
|
||||
|
||||
### Changed
|
||||
|
||||
- Upgrade Gradle Wrapper to `8.10.2`
|
||||
- Update `platformVersion` to `2023.3.8`
|
||||
- Dependencies - upgrade `org.jetbrains.intellij.platform` to `2.1.0`
|
||||
- Dependencies - upgrade `org.jetbrains.qodana` to `2024.2.3`
|
||||
- Dependencies (GitHub Actions) - upgrade `gradle/actions/setup-gradle` to `v4`
|
||||
- Add back the `org.gradle.toolchains.foojay-resolver-convention` Gradle settings plugin
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed _Run Plugin_ run configuration logs location
|
||||
|
||||
### Removed
|
||||
|
||||
- Removed _Run Qodana_ and _Run UI for UI Tests_ run configurations
|
||||
|
||||
## [2.0.1] - 2024-08-09
|
||||
|
||||
### Changed
|
||||
|
||||
- Update `platformVersion` to `2023.3.7`
|
||||
- Change since/until build to `233-242.*` (2023.3-2024.2.*)
|
||||
- Cleanup registering the `runIdeForUiTests` task
|
||||
- Dependencies - upgrade `org.jetbrains.intellij.platform` to `2.0.1`
|
||||
- Dependencies - upgrade `org.jetbrains.kotlin.jvm` to `1.9.25`
|
||||
- Dependencies - upgrade `org.jetbrains.kotlinx.kover` to `0.8.3`
|
||||
- Dependencies - upgrade `org.jetbrains.qodana` to `2024.1.9`
|
||||
|
||||
## [2.0.0] - 2024-07-30
|
||||
|
||||
### Changed
|
||||
|
||||
- Migrate to [IntelliJ Platform Gradle Plugin 2.0](https://blog.jetbrains.com/platform/2024/07/intellij-platform-gradle-plugin-2-0/).
|
||||
|
||||
## [1.14.2] - 2024-07-12
|
||||
|
||||
### Changed
|
||||
|
||||
- Upgrade Gradle Wrapper to `8.9`
|
||||
|
||||
### Removed
|
||||
@ -82,7 +45,7 @@
|
||||
|
||||
- Dependencies - upgrade `org.jetbrains.kotlin.jvm` to `1.9.23`
|
||||
- Dependencies - upgrade `org.jetbrains.kotlinx.kover` to `0.7.6`
|
||||
- Dependencies - upgrade `org.jetbrains.qodana` to `2023.3.2`
|
||||
- Dependencies - upgrade `org.jetbrains.qodana` to `2023.3.1`
|
||||
- Dependencies (GitHub Actions) - upgrade `actions/upload-artifact` to `4`
|
||||
- Dependencies (GitHub Actions) - upgrade `codecov/codecov-action` to `4`
|
||||
- Dependencies (GitHub Actions) - upgrade `gradle/wrapper-validation-action` to `2`
|
||||
@ -769,10 +732,7 @@
|
||||
- GitHub Actions to automate testing and deployment
|
||||
- Kotlin support
|
||||
|
||||
[Unreleased]: https://github.com/JetBrains/intellij-platform-plugin-template/compare/v2.0.1...HEAD
|
||||
[2.0.1]: https://github.com/JetBrains/intellij-platform-plugin-template/compare/v2.0.0...v2.0.1
|
||||
[2.0.0]: https://github.com/JetBrains/intellij-platform-plugin-template/compare/v1.14.2...v2.0.0
|
||||
[1.14.2]: https://github.com/JetBrains/intellij-platform-plugin-template/compare/v1.14.1...v1.14.2
|
||||
[Unreleased]: https://github.com/JetBrains/intellij-platform-plugin-template/compare/v1.14.1...HEAD
|
||||
[1.14.1]: https://github.com/JetBrains/intellij-platform-plugin-template/compare/v1.14.0...v1.14.1
|
||||
[1.14.0]: https://github.com/JetBrains/intellij-platform-plugin-template/compare/v1.13.0...v1.14.0
|
||||
[1.13.0]: https://github.com/JetBrains/intellij-platform-plugin-template/compare/v1.12.0...v1.13.0
|
||||
@ -813,5 +773,5 @@
|
||||
[0.3.0]: https://github.com/JetBrains/intellij-platform-plugin-template/compare/v0.2.0...v0.3.0
|
||||
[0.2.0]: https://github.com/JetBrains/intellij-platform-plugin-template/compare/v0.1.0...v0.2.0
|
||||
[0.1.0]: https://github.com/JetBrains/intellij-platform-plugin-template/compare/v0.0.2...v0.1.0
|
||||
[0.0.2]: https://github.com/JetBrains/intellij-platform-plugin-template/compare/v0.0.1...v0.0.2
|
||||
[0.0.1]: https://github.com/JetBrains/intellij-platform-plugin-template/commits/v0.0.1
|
||||
[0.0.2]: https://github.com/JetBrains/intellij-platform-plugin-template/commits/v0.0.2
|
||||
[0.0.1]: https://github.com/JetBrains/intellij-platform-plugin-template/commits
|
||||
|
133
README.md
@ -8,7 +8,8 @@
|
||||
![IntelliJ Platform Plugin Template][file:intellij-platform-plugin-template-dark]
|
||||
![IntelliJ Platform Plugin Template][file:intellij-platform-plugin-template-light]
|
||||
|
||||
> [!NOTE]
|
||||
> **Note**
|
||||
>
|
||||
> Click the <kbd>Use this template</kbd> button and clone it in IntelliJ IDEA.
|
||||
|
||||
<!-- Plugin description -->
|
||||
@ -21,7 +22,8 @@ The main goal of this template is to speed up the setup phase of plugin developm
|
||||
|
||||
If you're still not quite sure what this is all about, read our introduction: [What is the IntelliJ Platform?][docs:intro]
|
||||
|
||||
> [!NOTE]
|
||||
> **Note**
|
||||
>
|
||||
> Click the <kbd>Watch</kbd> button on the top to be notified about releases containing new features and fixes.
|
||||
|
||||
### Table of contents
|
||||
@ -46,7 +48,7 @@ In this README, we will highlight the following elements of template-project cre
|
||||
- [Changelog maintenance](#changelog-maintenance) with the Gradle Changelog Plugin
|
||||
- [Release flow](#release-flow) using GitHub Releases
|
||||
- [Plugin signing](#plugin-signing) with your private certificate
|
||||
- [Publishing the plugin](#publishing-the-plugin) with the IntelliJ Platform Gradle Plugin
|
||||
- [Publishing the plugin](#publishing-the-plugin) with the Gradle IntelliJ Plugin
|
||||
- [FAQ](#faq)
|
||||
- [Useful links](#useful-links)
|
||||
|
||||
@ -77,23 +79,25 @@ The next step, after opening your project in IntelliJ IDEA, is to set the proper
|
||||
For the last step, you have to manually review the configuration variables described in the [`gradle.properties`][file:gradle.properties] file and *optionally* move sources from the *com.github.username.repository* package to the one that works best for you.
|
||||
Then you can get to work implementing your ideas.
|
||||
|
||||
> [!NOTE]
|
||||
> **Note**
|
||||
>
|
||||
> To use Java in your plugin, create the `/src/main/java` directory.
|
||||
|
||||
|
||||
## Gradle configuration
|
||||
|
||||
The recommended method for plugin development involves using the [Gradle][gradle] setup with the [intellij-platform-gradle-plugin][gh:intellij-platform-gradle-plugin] installed.
|
||||
The IntelliJ Platform Gradle Plugin makes it possible to run the IDE with your plugin and publish your plugin to JetBrains Marketplace.
|
||||
The recommended method for plugin development involves using the [Gradle][gradle] setup with the [gradle-intellij-plugin][gh:gradle-intellij-plugin] installed.
|
||||
The `gradle-intellij-plugin` makes it possible to run the IDE with your plugin and publish your plugin to JetBrains Marketplace.
|
||||
|
||||
> [!NOTE]
|
||||
> Make sure to always upgrade to the latest version of IntelliJ Platform Gradle Plugin.
|
||||
> **Note**
|
||||
>
|
||||
> Make sure to always upgrade to the latest version of `gradle-intellij-plugin`.
|
||||
|
||||
A project built using the IntelliJ Platform Plugin Template includes a Gradle configuration already set up.
|
||||
Feel free to read through the [Using Gradle][docs:using-gradle] articles to understand your build better and learn how to customize it.
|
||||
|
||||
The most significant parts of the current configuration are:
|
||||
- Integration with the [intellij-platform-gradle-plugin][gh:intellij-platform-gradle-plugin] for smoother development.
|
||||
- Integration with the [gradle-intellij-plugin][gh:gradle-intellij-plugin] for smoother development.
|
||||
- Configuration written with [Gradle Kotlin DSL][gradle:kotlin-dsl].
|
||||
- Support for Kotlin and Java implementation.
|
||||
- Integration with the [gradle-changelog-plugin][gh:gradle-changelog-plugin], which automatically patches the change notes based on the `CHANGELOG.md` file.
|
||||
@ -105,21 +109,20 @@ For more details regarding Kotlin integration, please see [Kotlin for Plugin Dev
|
||||
|
||||
The project-specific configuration file [`gradle.properties`][file:gradle.properties] contains:
|
||||
|
||||
| Property name | Description |
|
||||
|--------------------------|------------------------------------------------------------------------------------------------------|
|
||||
| `pluginGroup` | Package name - after *using* the template, this will be set to `com.github.username.repo`. |
|
||||
| `pluginName` | Plugin name displayed in JetBrains Marketplace. |
|
||||
| `pluginRepositoryUrl` | Repository URL used for generating URLs by the [Gradle Changelog Plugin][gh:gradle-changelog-plugin] |
|
||||
| `pluginVersion` | The current version of the plugin in [SemVer][semver] format. |
|
||||
| `pluginSinceBuild` | The `since-build` attribute of the `<idea-version>` tag. |
|
||||
| `pluginUntilBuild` | The `until-build` attribute of the `<idea-version>` tag. |
|
||||
| `platformType` | The type of IDE distribution. |
|
||||
| `platformVersion` | The version of the IntelliJ Platform IDE will be used to build the plugin. |
|
||||
| `platformPlugins` | Comma-separated list of dependencies to the plugins from the Plugin Repositories. |
|
||||
| `platformBundledPlugins` | Comma-separated list of dependencies to the bundled IDE plugins. |
|
||||
| `gradleVersion` | Version of Gradle used for plugin development. |
|
||||
| Property name | Description |
|
||||
|-----------------------|-----------------------------------------------------------------------------------------------------------|
|
||||
| `pluginGroup` | Package name - after *using* the template, this will be set to `com.github.username.repo`. |
|
||||
| `pluginName` | Plugin name displayed in JetBrains Marketplace. |
|
||||
| `pluginRepositoryUrl` | Repository URL used for generating URLs by the [Gradle Changelog Plugin][gh:gradle-changelog-plugin] |
|
||||
| `pluginVersion` | The current version of the plugin in [SemVer][semver] format. |
|
||||
| `pluginSinceBuild` | The `since-build` attribute of the `<idea-version>` tag. |
|
||||
| `pluginUntilBuild` | The `until-build` attribute of the `<idea-version>` tag. |
|
||||
| `platformType` | The type of IDE distribution. |
|
||||
| `platformVersion` | The version of the IntelliJ Platform IDE will be used to build the plugin. |
|
||||
| `platformPlugins` | Comma-separated list of dependencies to the bundled IDE plugins and plugins from the Plugin Repositories. |
|
||||
| `gradleVersion` | Version of Gradle used for plugin development. |
|
||||
|
||||
The properties listed define the plugin itself or configure the [intellij-platform-gradle-plugin][gh:intellij-platform-gradle-plugin] – check its documentation for more details.
|
||||
The properties listed define the plugin itself or configure the [gradle-intellij-plugin][gh:gradle-intellij-plugin] – check its documentation for more details.
|
||||
|
||||
In addition, extra behaviors are configured through the [`gradle.properties`][file:gradle.properties] file, such as:
|
||||
|
||||
@ -133,7 +136,7 @@ In addition, extra behaviors are configured through the [`gradle.properties`][fi
|
||||
|
||||
Some values used for the Gradle configuration shouldn't be stored in files to avoid publishing them to the Version Control System.
|
||||
|
||||
To avoid that, environment variables are introduced, which can be provided within the *Run/Debug Configuration* within the IDE, or on the CI – like for GitHub: `⚙️ Settings > Secrets and variables > Actions`.
|
||||
To avoid that, environment variables are introduced, which can be provided within the *Run/Debug Configuration* within the IDE, or on the CI – like for GitHub: `⚙️ Settings > Secrets`.
|
||||
|
||||
Environment variables used by the current project are related to the [plugin signing](#plugin-signing) and [publishing](#publishing-the-plugin).
|
||||
|
||||
@ -146,7 +149,7 @@ Environment variables used by the current project are related to the [plugin sig
|
||||
|
||||
For more details on how to generate proper values, check the relevant sections mentioned above.
|
||||
|
||||
To configure GitHub secret environment variables, go to the `⚙️ Settings > Secrets and variables > Actions` section of your project repository:
|
||||
To configure GitHub secret environment variables, go to the `⚙️ Settings > Secrets` section of your project repository:
|
||||
|
||||
![Settings > Secrets][file:settings-secrets.png]
|
||||
|
||||
@ -183,7 +186,8 @@ A generated IntelliJ Platform Plugin Template repository contains the following
|
||||
|
||||
In addition to the configuration files, the most crucial part is the `src` directory, which contains our implementation and the manifest for our plugin – [plugin.xml][file:plugin.xml].
|
||||
|
||||
> [!NOTE]
|
||||
> **Note**
|
||||
>
|
||||
> To use Java in your plugin, create the `/src/main/java` directory.
|
||||
|
||||
|
||||
@ -235,16 +239,15 @@ These files are located in `src/main/kotlin`.
|
||||
This location indicates the language being used.
|
||||
So if you decide to use Java instead (or in addition to Kotlin), these sources should be located in the `src/main/java` directory.
|
||||
|
||||
> [!TIP]
|
||||
> It is possible to use the [IntelliJ Platform Icons](https://jb.gg/new-ui-icons) in your plugin.
|
||||
|
||||
To start with the actual implementation, you may check our [IntelliJ Platform SDK DevGuide][docs], which contains an introduction to the essential areas of the plugin development together with dedicated tutorials.
|
||||
|
||||
> [!WARNING]
|
||||
> Remember to remove all non-needed sample code files with their corresponding registration entries in `plugin.xml`.
|
||||
> **Warning**
|
||||
>
|
||||
> Don't forget to remove all non-needed sample code files with their corresponding registration entries in `plugin.xml`.
|
||||
|
||||
For those who value example codes the most, there are also available [IntelliJ SDK Code Samples][gh:code-samples] and [IntelliJ Platform Explorer][jb:ipe] – a search tool for browsing Extension Points inside existing implementations of open-source IntelliJ Platform plugins.
|
||||
|
||||
|
||||
## Testing
|
||||
|
||||
[Testing plugins][docs:testing-plugins] is an essential part of the plugin development to make sure that everything works as expected between IDE releases and plugin refactorings.
|
||||
@ -255,9 +258,10 @@ The IntelliJ Platform Plugin Template project provides integration of two testin
|
||||
Most of the IntelliJ Platform codebase tests are model-level, run in a headless environment using an actual IDE instance.
|
||||
The tests usually test a feature as a whole rather than individual functions that comprise its implementation, like in unit tests.
|
||||
|
||||
In `src/test/kotlin`, you will find a basic `MyPluginTest` test that utilizes `BasePlatformTestCase` and runs a few checks against the XML files to indicate an example operation of creating files on the fly or reading them from `src/test/testData/rename` test resources.
|
||||
In `src/test/kotlin`, you'll find a basic `MyPluginTest` test that utilizes `BasePlatformTestCase` and runs a few checks against the XML files to indicate an example operation of creating files on the fly or reading them from `src/test/testData/rename` test resources.
|
||||
|
||||
> [!NOTE]
|
||||
> **Note**
|
||||
>
|
||||
> Run your tests using predefined *Run Tests* configuration or by invoking the `./gradlew check` Gradle task.
|
||||
|
||||
### Code coverage
|
||||
@ -275,8 +279,9 @@ If your plugin provides complex user interfaces, you should consider covering th
|
||||
You can use the [XPath query language][xpath] to find components in the currently available IDE view.
|
||||
Once IDE with `robot-server` has started, you can open the `http://localhost:8082` page that presents the currently available IDEA UI components hierarchy in HTML format and use a simple `XPath` generator, which can help test your plugin's interface.
|
||||
|
||||
> [!NOTE]
|
||||
> Run IDE for UI tests by invoking the `./gradlew runIdeForUiTests` and `./gradlew check` Gradle tasks.
|
||||
> **Note**
|
||||
>
|
||||
> Run IDE for UI tests using predefined *Run IDE for UI Tests* and then *Run Tests* configurations or by invoking the `./gradlew runIdeForUiTests` and `./gradlew check` Gradle tasks.
|
||||
|
||||
Check the UI Test Example project you can use as a reference for setting up UI testing in your plugin: [intellij-ui-test-robot/ui-test-example][gh:ui-test-example].
|
||||
|
||||
@ -310,7 +315,8 @@ Qodana inspections are accessible within the project on two levels:
|
||||
|
||||
Qodana inspection is configured with the `qodana { ... }` section in the Gradle build file and [`qodana.yml`][file:qodana.yml] YAML configuration file.
|
||||
|
||||
> [!NOTE]
|
||||
> **Note**
|
||||
>
|
||||
> Qodana requires Docker to be installed and available in your environment.
|
||||
|
||||
To run inspections, you can use a predefined *Run Qodana* configuration, which will provide a full report on `http://localhost:8080`, or invoke the Gradle task directly with the `./gradlew runInspections` command.
|
||||
@ -326,13 +332,16 @@ Within the default project structure, there is a `.run` directory provided conta
|
||||
|
||||
![Run/Debug configurations][file:run-debug-configurations.png]
|
||||
|
||||
| Configuration name | Description |
|
||||
|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Run Plugin | Runs [`:runIde`][gh:intellij-platform-gradle-plugin-runIde] IntelliJ Platform Gradle Plugin task. Use the *Debug* icon for plugin debugging. |
|
||||
| Run Tests | Runs [`:test`][gradle:lifecycle-tasks] Gradle task. |
|
||||
| Run Verifications | Runs [`:verifyPlugin`][gh:intellij-platform-gradle-plugin-verifyPlugin] IntelliJ Platform Gradle Plugin task to check the plugin compatibility against the specified IntelliJ IDEs. |
|
||||
| Configuration name | Description |
|
||||
|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Run Plugin | Runs [`:runIde`][gh:gradle-intellij-plugin-runIde] Gradle IntelliJ Plugin task. Use the *Debug* icon for plugin debugging. |
|
||||
| Run Verifications | Runs [`:runPluginVerifier`][gh:gradle-intellij-plugin-runPluginVerifier] Gradle IntelliJ Plugin task to check the plugin compatibility against the specified IntelliJ IDEs. |
|
||||
| Run Tests | Runs [`:test`][gradle:lifecycle-tasks] Gradle task. |
|
||||
| Run IDE for UI Tests | Runs [`:runIdeForUiTests`][gh:intellij-ui-test-robot] Gradle IntelliJ Plugin task to allow for running UI tests within the IntelliJ IDE running instance. |
|
||||
| Run Qodana | Runs [`:runInspections`][gh:gradle-qodana-plugin] Gradle Qodana Plugin task. Starts Qodana inspections in a Docker container and serves generated report on `localhost:8080`. |
|
||||
|
||||
> [!NOTE]
|
||||
> **Note**
|
||||
>
|
||||
> You can find the logs from the running task in the `idea.log` tab.
|
||||
>
|
||||
> ![Run/Debug configuration logs][file:run-logs.png]
|
||||
@ -377,7 +386,8 @@ This Template project depends on Gradle plugins and external libraries – and d
|
||||
|
||||
All plugins and dependencies used by Gradle are managed with [Gradle version catalog][gradle:version-catalog], which defines versions and coordinates of your dependencies in the [`gradle/libs.versions.toml`][file:libs.versions.toml] file.
|
||||
|
||||
> [!NOTE]
|
||||
> **Note**
|
||||
>
|
||||
> To add a new dependency to the project, in the `dependencies { ... }` block, add:
|
||||
>
|
||||
> ```kotlin
|
||||
@ -399,7 +409,8 @@ Keeping the project in good shape and having all the dependencies up-to-date req
|
||||
|
||||
Dependabot is a bot provided by GitHub to check the build configuration files and review any outdated or insecure dependencies of yours – in case if any update is available, it creates a new pull request providing [the proper change][gh:dependabot-pr].
|
||||
|
||||
> [!NOTE]
|
||||
> **Note**
|
||||
>
|
||||
> Dependabot doesn't yet support checking of the Gradle Wrapper.
|
||||
> Check the [Gradle Releases][gradle:releases] page and update your `gradle.properties` file with:
|
||||
> ```properties
|
||||
@ -419,13 +430,13 @@ The changelog is a curated list that contains information about any new features
|
||||
When they're provided, these lists are available in a few different places:
|
||||
- the [CHANGELOG.md](./CHANGELOG.md) file,
|
||||
- the [Releases page][gh:releases],
|
||||
- the *What's new* section of the JetBrains Marketplace Plugin page,
|
||||
- the *What's new* section of JetBrains Marketplace Plugin page,
|
||||
- and inside the Plugin Manager's item details.
|
||||
|
||||
There are many methods for handling the project's changelog.
|
||||
The one used in the current template project is the [Keep a Changelog][keep-a-changelog] approach.
|
||||
|
||||
The [Gradle Changelog Plugin][gh:gradle-changelog-plugin] takes care of propagating information provided within the [CHANGELOG.md](./CHANGELOG.md) to the [IntelliJ Platform Gradle Plugin][gh:intellij-platform-gradle-plugin].
|
||||
The [Gradle Changelog Plugin][gh:gradle-changelog-plugin] takes care of propagating information provided within the [CHANGELOG.md](./CHANGELOG.md) to the [Gradle IntelliJ Plugin][gh:gradle-intellij-plugin].
|
||||
You only have to take care of writing down the actual changes in proper sections of the `[Unreleased]` section.
|
||||
|
||||
You start with an almost empty changelog:
|
||||
@ -457,7 +468,7 @@ GitHub Actions will swap it and provide you an empty section for the next releas
|
||||
- One annoying bug
|
||||
```
|
||||
|
||||
To configure how the Changelog plugin behaves, i.e., to create headers with the release date, see the [Gradle Changelog Plugin][gh:gradle-changelog-plugin] README file.
|
||||
To configure how the Changelog plugin behaves, i.e., to create headers with the release date, see [Gradle Changelog Plugin][gh:gradle-changelog-plugin] README file.
|
||||
|
||||
### Release flow
|
||||
|
||||
@ -486,25 +497,29 @@ All the configuration related to the signing should be provided using [environme
|
||||
|
||||
To find out how to generate signing certificates, check the [Plugin Signing][docs:plugin-signing] section in the IntelliJ Platform Plugin SDK documentation.
|
||||
|
||||
> [!NOTE]
|
||||
> **Note**
|
||||
>
|
||||
> Remember to encode your secret environment variables using `base64` encoding to avoid issues with multi-line values.
|
||||
|
||||
### Publishing the plugin
|
||||
|
||||
> [!TIP]
|
||||
> **Tip**
|
||||
>
|
||||
> Make sure to follow all guidelines listed in [Publishing a Plugin][docs:publishing] to follow all recommended and required steps.
|
||||
|
||||
Releasing a plugin to [JetBrains Marketplace](https://plugins.jetbrains.com) is a straightforward operation that uses the `publishPlugin` Gradle task provided by the [intellij-platform-gradle-plugin][gh:intellij-platform-gradle-plugin-docs].
|
||||
Releasing a plugin to [JetBrains Marketplace](https://plugins.jetbrains.com) is a straightforward operation that uses the `publishPlugin` Gradle task provided by the [gradle-intellij-plugin][gh:gradle-intellij-plugin-docs].
|
||||
In addition, the [Release](.github/workflows/release.yml) workflow automates this process by running the task when a new release appears in the GitHub Releases section.
|
||||
|
||||
> [!NOTE]
|
||||
> **Note**
|
||||
>
|
||||
> Set a suffix to the plugin version to publish it in the custom repository channel, i.e. `v1.0.0-beta` will push your plugin to the `beta` [release channel][docs:release-channel].
|
||||
|
||||
The authorization process relies on the `PUBLISH_TOKEN` secret environment variable, specified in the `⚙️ Settings > Secrets and variables > Actions` section of your project repository.
|
||||
The authorization process relies on the `PUBLISH_TOKEN` secret environment variable, specified in the _Secrets_ section of the repository _Settings_.
|
||||
|
||||
You can get that token in your JetBrains Marketplace profile dashboard in the [My Tokens][jb:my-tokens] tab.
|
||||
|
||||
> [!WARNING]
|
||||
> **Warning**
|
||||
>
|
||||
> Before using the automated deployment process, it is necessary to manually create a new plugin in JetBrains Marketplace to specify options like the license, repository URL, etc.
|
||||
> Please follow the [Publishing a Plugin][docs:publishing] instructions.
|
||||
|
||||
@ -522,7 +537,7 @@ You can still replace it or add the `/src/main/java` directory to start working
|
||||
Since February 2021, GitHub Actions [support the skip CI feature][github-actions-skip-ci].
|
||||
If the message contains one of the following strings: `[skip ci]`, `[ci skip]`, `[no ci]`, `[skip actions]`, or `[actions skip]` – workflows will not be triggered.
|
||||
|
||||
### Why does the draft release no longer contain a built plugin artifact?
|
||||
### Why draft release no longer contains built plugin artifact?
|
||||
|
||||
All the binaries created with each workflow are still available, but as an output artifact of each run together with tests and Qodana results.
|
||||
That approach gives more possibilities for testing and debugging pre-releases, for example, in your local environment.
|
||||
@ -530,7 +545,7 @@ That approach gives more possibilities for testing and debugging pre-releases, f
|
||||
## Useful links
|
||||
|
||||
- [IntelliJ Platform SDK Plugin SDK][docs]
|
||||
- [IntelliJ Platform Gradle Plugin Documentation][gh:intellij-platform-gradle-plugin-docs]
|
||||
- [Gradle IntelliJ Plugin Documentation][gh:gradle-intellij-plugin-docs]
|
||||
- [IntelliJ Platform Explorer][jb:ipe]
|
||||
- [JetBrains Marketplace Quality Guidelines][jb:quality-guidelines]
|
||||
- [IntelliJ Platform UI Guidelines][jb:ui-guidelines]
|
||||
@ -580,10 +595,10 @@ That approach gives more possibilities for testing and debugging pre-releases, f
|
||||
[gh:dependabot]: https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/keeping-your-dependencies-updated-automatically
|
||||
[gh:dependabot-pr]: https://github.com/JetBrains/intellij-platform-plugin-template/pull/73
|
||||
[gh:gradle-changelog-plugin]: https://github.com/JetBrains/gradle-changelog-plugin
|
||||
[gh:intellij-platform-gradle-plugin]: https://github.com/JetBrains/intellij-platform-gradle-plugin
|
||||
[gh:intellij-platform-gradle-plugin-docs]: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin.html
|
||||
[gh:intellij-platform-gradle-plugin-runIde]: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-tasks.html#runIde
|
||||
[gh:intellij-platform-gradle-plugin-verifyPlugin]: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-tasks.html#verifyPlugin
|
||||
[gh:gradle-intellij-plugin]: https://github.com/JetBrains/gradle-intellij-plugin
|
||||
[gh:gradle-intellij-plugin-docs]: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
|
||||
[gh:gradle-intellij-plugin-runIde]: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#tasks-runide
|
||||
[gh:gradle-intellij-plugin-runPluginVerifier]: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#tasks-runpluginverifier
|
||||
[gh:gradle-qodana-plugin]: https://github.com/JetBrains/gradle-qodana-plugin
|
||||
[gh:intellij-ui-test-robot]: https://github.com/JetBrains/intellij-ui-test-robot
|
||||
[gh:kover]: https://github.com/Kotlin/kotlinx-kover
|
||||
|
182
build.gradle.kts
@ -1,117 +1,50 @@
|
||||
import org.jetbrains.changelog.Changelog
|
||||
import org.jetbrains.changelog.markdownToHTML
|
||||
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
|
||||
|
||||
fun properties(key: String) = providers.gradleProperty(key)
|
||||
fun environment(key: String) = providers.environmentVariable(key)
|
||||
|
||||
plugins {
|
||||
id("java") // Java support
|
||||
alias(libs.plugins.kotlin) // Kotlin support
|
||||
alias(libs.plugins.intelliJPlatform) // IntelliJ Platform Gradle Plugin
|
||||
alias(libs.plugins.gradleIntelliJPlugin) // Gradle IntelliJ Plugin
|
||||
alias(libs.plugins.changelog) // Gradle Changelog Plugin
|
||||
alias(libs.plugins.qodana) // Gradle Qodana Plugin
|
||||
alias(libs.plugins.kover) // Gradle Kover Plugin
|
||||
}
|
||||
|
||||
group = providers.gradleProperty("pluginGroup").get()
|
||||
version = providers.gradleProperty("pluginVersion").get()
|
||||
group = properties("pluginGroup").get()
|
||||
version = properties("pluginVersion").get()
|
||||
|
||||
// Configure project's dependencies
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
|
||||
dependencies {
|
||||
// implementation(libs.exampleLibrary)
|
||||
}
|
||||
|
||||
// Set the JVM language level used to build the project.
|
||||
kotlin {
|
||||
jvmToolchain(17)
|
||||
}
|
||||
|
||||
// Configure project's dependencies
|
||||
repositories {
|
||||
mavenCentral()
|
||||
// Configure Gradle IntelliJ Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
|
||||
intellij {
|
||||
pluginName = properties("pluginName")
|
||||
version = properties("platformVersion")
|
||||
type = properties("platformType")
|
||||
|
||||
// IntelliJ Platform Gradle Plugin Repositories Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-repositories-extension.html
|
||||
intellijPlatform {
|
||||
defaultRepositories()
|
||||
}
|
||||
}
|
||||
|
||||
// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
|
||||
dependencies {
|
||||
testImplementation(libs.junit)
|
||||
|
||||
// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
|
||||
intellijPlatform {
|
||||
create(providers.gradleProperty("platformType"), providers.gradleProperty("platformVersion"))
|
||||
|
||||
// Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins.
|
||||
bundledPlugins(providers.gradleProperty("platformBundledPlugins").map { it.split(',') })
|
||||
|
||||
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file for plugin from JetBrains Marketplace.
|
||||
plugins(providers.gradleProperty("platformPlugins").map { it.split(',') })
|
||||
|
||||
instrumentationTools()
|
||||
pluginVerifier()
|
||||
zipSigner()
|
||||
testFramework(TestFrameworkType.Platform)
|
||||
}
|
||||
}
|
||||
|
||||
// Configure IntelliJ Platform Gradle Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html
|
||||
intellijPlatform {
|
||||
pluginConfiguration {
|
||||
version = providers.gradleProperty("pluginVersion")
|
||||
|
||||
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
|
||||
description = providers.fileContents(layout.projectDirectory.file("README.md")).asText.map {
|
||||
val start = "<!-- Plugin description -->"
|
||||
val end = "<!-- Plugin description end -->"
|
||||
|
||||
with(it.lines()) {
|
||||
if (!containsAll(listOf(start, end))) {
|
||||
throw GradleException("Plugin description section not found in README.md:\n$start ... $end")
|
||||
}
|
||||
subList(indexOf(start) + 1, indexOf(end)).joinToString("\n").let(::markdownToHTML)
|
||||
}
|
||||
}
|
||||
|
||||
val changelog = project.changelog // local variable for configuration cache compatibility
|
||||
// Get the latest available change notes from the changelog file
|
||||
changeNotes = providers.gradleProperty("pluginVersion").map { pluginVersion ->
|
||||
with(changelog) {
|
||||
renderItem(
|
||||
(getOrNull(pluginVersion) ?: getUnreleased())
|
||||
.withHeader(false)
|
||||
.withEmptySections(false),
|
||||
Changelog.OutputType.HTML,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
ideaVersion {
|
||||
sinceBuild = providers.gradleProperty("pluginSinceBuild")
|
||||
untilBuild = providers.gradleProperty("pluginUntilBuild")
|
||||
}
|
||||
}
|
||||
|
||||
signing {
|
||||
certificateChain = providers.environmentVariable("CERTIFICATE_CHAIN")
|
||||
privateKey = providers.environmentVariable("PRIVATE_KEY")
|
||||
password = providers.environmentVariable("PRIVATE_KEY_PASSWORD")
|
||||
}
|
||||
|
||||
publishing {
|
||||
token = providers.environmentVariable("PUBLISH_TOKEN")
|
||||
// The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
|
||||
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
|
||||
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
|
||||
channels = providers.gradleProperty("pluginVersion").map { listOf(it.substringAfter('-', "").substringBefore('.').ifEmpty { "default" }) }
|
||||
}
|
||||
|
||||
pluginVerification {
|
||||
ides {
|
||||
recommended()
|
||||
}
|
||||
}
|
||||
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
|
||||
plugins = properties("platformPlugins").map { it.split(',').map(String::trim).filter(String::isNotEmpty) }
|
||||
}
|
||||
|
||||
// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
|
||||
changelog {
|
||||
groups.empty()
|
||||
repositoryUrl = providers.gradleProperty("pluginRepositoryUrl")
|
||||
repositoryUrl = properties("pluginRepositoryUrl")
|
||||
}
|
||||
|
||||
// Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration
|
||||
@ -127,31 +60,62 @@ kover {
|
||||
|
||||
tasks {
|
||||
wrapper {
|
||||
gradleVersion = providers.gradleProperty("gradleVersion").get()
|
||||
gradleVersion = properties("gradleVersion").get()
|
||||
}
|
||||
|
||||
publishPlugin {
|
||||
dependsOn(patchChangelog)
|
||||
}
|
||||
}
|
||||
patchPluginXml {
|
||||
version = properties("pluginVersion")
|
||||
sinceBuild = properties("pluginSinceBuild")
|
||||
untilBuild = properties("pluginUntilBuild")
|
||||
|
||||
intellijPlatformTesting {
|
||||
runIde {
|
||||
register("runIdeForUiTests") {
|
||||
task {
|
||||
jvmArgumentProviders += CommandLineArgumentProvider {
|
||||
listOf(
|
||||
"-Drobot-server.port=8082",
|
||||
"-Dide.mac.message.dialogs.as.sheets=false",
|
||||
"-Djb.privacy.policy.text=<!--999.999-->",
|
||||
"-Djb.consents.confirmation.enabled=false",
|
||||
)
|
||||
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
|
||||
pluginDescription = providers.fileContents(layout.projectDirectory.file("README.md")).asText.map {
|
||||
val start = "<!-- Plugin description -->"
|
||||
val end = "<!-- Plugin description end -->"
|
||||
|
||||
with(it.lines()) {
|
||||
if (!containsAll(listOf(start, end))) {
|
||||
throw GradleException("Plugin description section not found in README.md:\n$start ... $end")
|
||||
}
|
||||
subList(indexOf(start) + 1, indexOf(end)).joinToString("\n").let(::markdownToHTML)
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
robotServerPlugin()
|
||||
val changelog = project.changelog // local variable for configuration cache compatibility
|
||||
// Get the latest available change notes from the changelog file
|
||||
changeNotes = properties("pluginVersion").map { pluginVersion ->
|
||||
with(changelog) {
|
||||
renderItem(
|
||||
(getOrNull(pluginVersion) ?: getUnreleased())
|
||||
.withHeader(false)
|
||||
.withEmptySections(false),
|
||||
Changelog.OutputType.HTML,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Configure UI tests plugin
|
||||
// Read more: https://github.com/JetBrains/intellij-ui-test-robot
|
||||
runIdeForUiTests {
|
||||
systemProperty("robot-server.port", "8082")
|
||||
systemProperty("ide.mac.message.dialogs.as.sheets", "false")
|
||||
systemProperty("jb.privacy.policy.text", "<!--999.999-->")
|
||||
systemProperty("jb.consents.confirmation.enabled", "false")
|
||||
}
|
||||
|
||||
signPlugin {
|
||||
certificateChain = environment("CERTIFICATE_CHAIN")
|
||||
privateKey = environment("PRIVATE_KEY")
|
||||
password = environment("PRIVATE_KEY_PASSWORD")
|
||||
}
|
||||
|
||||
publishPlugin {
|
||||
dependsOn("patchChangelog")
|
||||
token = environment("PUBLISH_TOKEN")
|
||||
// The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
|
||||
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
|
||||
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
|
||||
channels = properties("pluginVersion").map { listOf(it.substringAfter('-', "").substringBefore('.').ifEmpty { "default" }) }
|
||||
}
|
||||
}
|
||||
|
@ -4,24 +4,22 @@ pluginGroup = org.jetbrains.plugins.template
|
||||
pluginName = IntelliJ Platform Plugin Template
|
||||
pluginRepositoryUrl = https://github.com/JetBrains/intellij-platform-plugin-template
|
||||
# SemVer format -> https://semver.org
|
||||
pluginVersion = 2.0.2
|
||||
pluginVersion = 1.14.2
|
||||
|
||||
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
|
||||
pluginSinceBuild = 233
|
||||
pluginSinceBuild = 232
|
||||
pluginUntilBuild = 242.*
|
||||
|
||||
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
|
||||
platformType = IC
|
||||
platformVersion = 2023.3.8
|
||||
platformVersion = 2023.2.7
|
||||
|
||||
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
|
||||
# Example: platformPlugins = com.jetbrains.php:203.4449.22, org.intellij.scala:2023.3.27@EAP
|
||||
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
|
||||
platformPlugins =
|
||||
# Example: platformBundledPlugins = com.intellij.java
|
||||
platformBundledPlugins =
|
||||
|
||||
# Gradle Releases -> https://github.com/gradle/gradle/releases
|
||||
gradleVersion = 8.10.2
|
||||
gradleVersion = 8.9
|
||||
|
||||
# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib
|
||||
kotlin.stdlib.default.dependency = false
|
||||
|
@ -1,20 +1,20 @@
|
||||
[versions]
|
||||
# libraries
|
||||
junit = "4.13.2"
|
||||
exampleLibrary = "24.1.0"
|
||||
|
||||
# plugins
|
||||
changelog = "2.2.1"
|
||||
intelliJPlatform = "2.1.0"
|
||||
kotlin = "1.9.25"
|
||||
kover = "0.8.3"
|
||||
qodana = "2024.2.3"
|
||||
kotlin = "1.9.24"
|
||||
changelog = "2.2.0"
|
||||
gradleIntelliJPlugin = "1.17.4"
|
||||
qodana = "2024.1.5"
|
||||
kover = "0.8.1"
|
||||
|
||||
[libraries]
|
||||
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
||||
exampleLibrary = { group = "com.example", name = "exampleLibrary", version.ref = "exampleLibrary" }
|
||||
|
||||
[plugins]
|
||||
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
|
||||
intelliJPlatform = { id = "org.jetbrains.intellij.platform", version.ref = "intelliJPlatform" }
|
||||
gradleIntelliJPlugin = { id = "org.jetbrains.intellij", version.ref = "gradleIntelliJPlugin" }
|
||||
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
||||
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
|
||||
qodana = { id = "org.jetbrains.qodana", version.ref = "qodana" }
|
||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
@ -2,7 +2,7 @@
|
||||
# https://www.jetbrains.com/help/qodana/qodana-yaml.html
|
||||
|
||||
version: 1.0
|
||||
linter: jetbrains/qodana-jvm-community:2024.2
|
||||
linter: jetbrains/qodana-jvm-community:latest
|
||||
projectJDK: "17"
|
||||
profile:
|
||||
name: qodana.recommended
|
||||
|
@ -1,5 +1,5 @@
|
||||
rootProject.name = "IntelliJ Platform Plugin Template"
|
||||
|
||||
plugins {
|
||||
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
|
||||
}
|
||||
|
||||
rootProject.name = "IntelliJ Platform Plugin Template"
|
||||
|