Skip to content

Commit bf7fde9

Browse files
committed
Update workflows, dependencies, and configurations:
- Free up disk space in CI workflows using jlumbroso/free-disk-space@v1.3.1. - Enable read-only Gradle caching and adjust task dependencies. - Add `codecov.yml` for coverage reporting. - Update Qodana linter version and JDK to 21 in `qodana.yml`. - Remove `pluginUntilBuild` and introduce `platformBundledModules` property in Gradle. - Update plugin metadata in `plugin.xml` to version 2.1.0 and add resource-bundle entry. - Refactor release asset creation logic to streamline handling of changelogs and releases. - Fix licensing comments and adjust Gradle wrapper scripts. - Ignore `.DS_Store` and minor content fixes in `.gitignore`.
1 parent 198f7b9 commit bf7fde9

12 files changed

Lines changed: 90 additions & 81 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
{
22
"name": "Java",
33
"image": "mcr.microsoft.com/devcontainers/java:1-21",
44
"features": {

.github/workflows/build.yml

Lines changed: 37 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,24 @@ concurrency:
2626

2727
jobs:
2828

29-
# Prepare environment and build the plugin
29+
# Prepare the environment and build the plugin
3030
build:
3131
name: Build
3232
runs-on: ubuntu-latest
33-
outputs:
34-
version: ${{ steps.properties.outputs.version }}
35-
changelog: ${{ steps.properties.outputs.changelog }}
36-
pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }}
3733
steps:
3834

35+
# Free GitHub Actions Environment Disk Space
36+
- name: Maximize Build Space
37+
uses: jlumbroso/free-disk-space@v1.3.1
38+
with:
39+
tool-cache: false
40+
large-packages: false
41+
3942
# Check out the current repository
4043
- name: Fetch Sources
4144
uses: actions/checkout@v4
4245

43-
# Set up Java environment for the next steps
46+
# Set up the Java environment for the next steps
4447
- name: Setup Java
4548
uses: actions/setup-java@v4
4649
with:
@@ -51,22 +54,6 @@ jobs:
5154
- name: Setup Gradle
5255
uses: gradle/actions/setup-gradle@v4
5356

54-
# Set environment variables
55-
- name: Export Properties
56-
id: properties
57-
shell: bash
58-
run: |
59-
PROPERTIES="$(./gradlew properties --console=plain -q)"
60-
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
61-
CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)"
62-
63-
echo "version=$VERSION" >> $GITHUB_OUTPUT
64-
echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT
65-
66-
echo "changelog<<EOF" >> $GITHUB_OUTPUT
67-
echo "$CHANGELOG" >> $GITHUB_OUTPUT
68-
echo "EOF" >> $GITHUB_OUTPUT
69-
7057
# Build plugin
7158
- name: Build plugin
7259
run: ./gradlew buildPlugin
@@ -82,7 +69,7 @@ jobs:
8269
8370
echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT
8471
85-
# Store already-built plugin as an artifact for downloading
72+
# Store an already-built plugin as an artifact for downloading
8673
- name: Upload artifact
8774
uses: actions/upload-artifact@v4
8875
with:
@@ -96,11 +83,18 @@ jobs:
9683
runs-on: ubuntu-latest
9784
steps:
9885

86+
# Free GitHub Actions Environment Disk Space
87+
- name: Maximize Build Space
88+
uses: jlumbroso/free-disk-space@v1.3.1
89+
with:
90+
tool-cache: false
91+
large-packages: false
92+
9993
# Check out the current repository
10094
- name: Fetch Sources
10195
uses: actions/checkout@v4
10296

103-
# Set up Java environment for the next steps
97+
# Set up the Java environment for the next steps
10498
- name: Setup Java
10599
uses: actions/setup-java@v4
106100
with:
@@ -110,6 +104,8 @@ jobs:
110104
# Setup Gradle
111105
- name: Setup Gradle
112106
uses: gradle/actions/setup-gradle@v4
107+
with:
108+
cache-read-only: true
113109

114110
# Run tests
115111
- name: Run Tests
@@ -128,8 +124,9 @@ jobs:
128124
uses: codecov/codecov-action@v5
129125
with:
130126
files: ${{ github.workspace }}/build/reports/kover/report.xml
127+
token: ${{ secrets.CODECOV_TOKEN }}
131128

132-
# Run Qodana inspections and provide report
129+
# Run Qodana inspections and provide a report
133130
inspectCode:
134131
name: Inspect code
135132
needs: [ build ]
@@ -142,7 +139,7 @@ jobs:
142139

143140
# Free GitHub Actions Environment Disk Space
144141
- name: Maximize Build Space
145-
uses: jlumbroso/free-disk-space@main
142+
uses: jlumbroso/free-disk-space@v1.3.1
146143
with:
147144
tool-cache: false
148145
large-packages: false
@@ -154,7 +151,7 @@ jobs:
154151
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
155152
fetch-depth: 0 # a full history is required for pull request analysis
156153

157-
# Set up Java environment for the next steps
154+
# Set up the Java environment for the next steps
158155
- name: Setup Java
159156
uses: actions/setup-java@v4
160157
with:
@@ -163,7 +160,7 @@ jobs:
163160

164161
# Run Qodana inspections
165162
- name: Qodana - Code Inspection
166-
uses: JetBrains/qodana-action@v2025.1
163+
uses: JetBrains/qodana-action@v2025.1.1
167164
env:
168165
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} # read the steps about it below
169166
with:
@@ -179,7 +176,7 @@ jobs:
179176

180177
# Free GitHub Actions Environment Disk Space
181178
- name: Maximize Build Space
182-
uses: jlumbroso/free-disk-space@main
179+
uses: jlumbroso/free-disk-space@v1.3.1
183180
with:
184181
tool-cache: false
185182
large-packages: false
@@ -188,7 +185,7 @@ jobs:
188185
- name: Fetch Sources
189186
uses: actions/checkout@v4
190187

191-
# Set up Java environment for the next steps
188+
# Set up the Java environment for the next steps
192189
- name: Setup Java
193190
uses: actions/setup-java@v4
194191
with:
@@ -198,17 +195,12 @@ jobs:
198195
# Setup Gradle
199196
- name: Setup Gradle
200197
uses: gradle/actions/setup-gradle@v4
201-
202-
# Cache Plugin Verifier IDEs
203-
- name: Setup Plugin Verifier IDEs Cache
204-
uses: actions/cache@v4
205198
with:
206-
path: ${{ needs.build.outputs.pluginVerifierHomeDir }}/ides
207-
key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }}
199+
cache-read-only: true
208200

209201
# Run Verify Plugin task and IntelliJ Plugin Verifier tool
210202
- name: Run Plugin Verification tasks
211-
run: ./gradlew verifyPlugin -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
203+
run: ./gradlew verifyPlugin
212204

213205
# Collect Plugin Verifier Result
214206
- name: Collect Plugin Verifier Result
@@ -219,7 +211,7 @@ jobs:
219211
path: ${{ github.workspace }}/build/reports/pluginVerifier
220212

221213
# Prepare a draft release for GitHub Releases page for the manual verification
222-
# If accepted and published, release workflow would be triggered
214+
# If accepted and published, the release workflow would be triggered
223215
releaseDraft:
224216
name: Release draft
225217
if: github.event_name != 'pull_request'
@@ -247,10 +239,11 @@ jobs:
247239
env:
248240
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
249241
run: |
250-
gh release create "v${{ needs.build.outputs.version }}" \
242+
VERSION=$(./gradlew properties --property version --quiet --console=plain | tail -n 1 | cut -f2- -d ' ')
243+
RELEASE_NOTE="./build/tmp/release_note.txt"
244+
./gradlew getChangelog --unreleased --no-header --quiet --console=plain --output-file=$RELEASE_NOTE
245+
246+
gh release create $VERSION \
251247
--draft \
252-
--title "v${{ needs.build.outputs.version }}" \
253-
--notes "$(cat << 'EOM'
254-
${{ needs.build.outputs.changelog }}
255-
EOM
256-
)"
248+
--title $VERSION \
249+
--notes-file $RELEASE_NOTE

.github/workflows/release.yml

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# GitHub Actions Workflow created for handling the release process based on the draft release prepared with the Build workflow.
2-
# Running the publishPlugin task requires all following secrets to be provided: PUBLISH_TOKEN, PRIVATE_KEY, PRIVATE_KEY_PASSWORD, CERTIFICATE_CHAIN.
2+
# Running the publishPlugin task requires all the following secrets to be provided: PUBLISH_TOKEN, PRIVATE_KEY, PRIVATE_KEY_PASSWORD, CERTIFICATE_CHAIN.
33
# See https://plugins.jetbrains.com/docs/intellij/plugin-signing.html for more information.
44

55
name: Release
@@ -18,13 +18,20 @@ jobs:
1818
pull-requests: write
1919
steps:
2020

21+
# Free GitHub Actions Environment Disk Space
22+
- name: Maximize Build Space
23+
uses: jlumbroso/free-disk-space@v1.3.1
24+
with:
25+
tool-cache: false
26+
large-packages: false
27+
2128
# Check out the current repository
2229
- name: Fetch Sources
2330
uses: actions/checkout@v4
2431
with:
2532
ref: ${{ github.event.release.tag_name }}
2633

27-
# Set up Java environment for the next steps
34+
# Set up the Java environment for the next steps
2835
- name: Setup Java
2936
uses: actions/setup-java@v4
3037
with:
@@ -34,28 +41,20 @@ jobs:
3441
# Setup Gradle
3542
- name: Setup Gradle
3643
uses: gradle/actions/setup-gradle@v4
37-
38-
# Set environment variables
39-
- name: Export Properties
40-
id: properties
41-
shell: bash
42-
run: |
43-
CHANGELOG="$(cat << 'EOM' | sed -e 's/^[[:space:]]*$//g' -e '/./,$!d'
44-
${{ github.event.release.body }}
45-
EOM
46-
)"
47-
48-
echo "changelog<<EOF" >> $GITHUB_OUTPUT
49-
echo "$CHANGELOG" >> $GITHUB_OUTPUT
50-
echo "EOF" >> $GITHUB_OUTPUT
44+
with:
45+
cache-read-only: true
5146

5247
# Update the Unreleased section with the current release note
5348
- name: Patch Changelog
54-
if: ${{ steps.properties.outputs.changelog != '' }}
49+
if: ${{ github.event.release.body != '' }}
5550
env:
56-
CHANGELOG: ${{ steps.properties.outputs.changelog }}
51+
CHANGELOG: ${{ github.event.release.body }}
5752
run: |
58-
./gradlew patchChangelog --release-note="$CHANGELOG"
53+
RELEASE_NOTE="./build/tmp/release_note.txt"
54+
mkdir -p "$(dirname "$RELEASE_NOTE")"
55+
echo "$CHANGELOG" > $RELEASE_NOTE
56+
57+
./gradlew patchChangelog --release-note-file=$RELEASE_NOTE
5958
6059
# Publish the plugin to JetBrains Marketplace
6160
- name: Publish Plugin
@@ -66,7 +65,7 @@ jobs:
6665
PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }}
6766
run: ./gradlew publishPlugin
6867

69-
# Upload artifact as a release asset
68+
# Upload an artifact as a release asset
7069
- name: Upload Release Asset
7170
env:
7271
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/run-ui-tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Fetch Sources
3636
uses: actions/checkout@v4
3737

38-
# Set up Java environment for the next steps
38+
# Set up the Java environment for the next steps
3939
- name: Setup Java
4040
uses: actions/setup-java@v4
4141
with:
@@ -45,6 +45,8 @@ jobs:
4545
# Setup Gradle
4646
- name: Setup Gradle
4747
uses: gradle/actions/setup-gradle@v4
48+
with:
49+
cache-read-only: true
4850

4951
# Run IDEA prepared for UI testing
5052
- name: Run IDE

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.DS_Store
12
.gradle
23
.idea
34
build

build.gradle.kts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ repositories {
3232
// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
3333
dependencies {
3434
testImplementation(libs.junit)
35+
testImplementation(libs.opentest4j)
3536

3637
// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
3738
intellijPlatform {
@@ -43,16 +44,17 @@ dependencies {
4344
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file for plugin from JetBrains Marketplace.
4445
plugins(providers.gradleProperty("platformPlugins").map { it.split(',') })
4546

46-
instrumentationTools()
47-
pluginVerifier()
48-
zipSigner()
47+
// Module Dependencies. Uses `platformBundledModules` property from the gradle.properties file for bundled IntelliJ Platform modules.
48+
bundledModules(providers.gradleProperty("platformBundledModules").map { it.split(',') })
49+
4950
testFramework(TestFrameworkType.Platform)
5051
}
5152
}
5253

5354
// Configure IntelliJ Platform Gradle Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html
5455
intellijPlatform {
5556
pluginConfiguration {
57+
name = providers.gradleProperty("pluginName")
5658
version = providers.gradleProperty("pluginVersion")
5759

5860
// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
@@ -83,7 +85,6 @@ intellijPlatform {
8385

8486
ideaVersion {
8587
sinceBuild = providers.gradleProperty("pluginSinceBuild")
86-
untilBuild = providers.gradleProperty("pluginUntilBuild")
8788
}
8889
}
8990

@@ -102,7 +103,6 @@ intellijPlatform {
102103
}
103104

104105
pluginVerification {
105-
freeArgs = providers.gradleProperty("pluginVerifierArgs").map { it.split(' ') }
106106
ides {
107107
recommended()
108108
}

codecov.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
informational: true
6+
threshold: 0%
7+
base: auto
8+
patch:
9+
default:
10+
informational: true

gradle.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ pluginVersion = 2.1.0
88

99
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
1010
pluginSinceBuild = 243
11-
pluginUntilBuild = 252.*
1211

1312
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
1413
platformType = PS
@@ -19,6 +18,9 @@ platformVersion = 2025.2
1918
platformPlugins = com.dmarcotte.handlebars:252.23892.201
2019
# Example: platformBundledPlugins = com.intellij.java
2120
platformBundledPlugins = com.jetbrains.php, JavaScript, org.jetbrains.plugins.less, org.jetbrains.plugins.sass
21+
# Example: platformBundledModules = intellij.spellchecker
22+
platformBundledModules =
23+
2224
# Gradle Releases -> https://github.com/gradle/gradle/releases
2325
gradleVersion = 9.0.0
2426

0 commit comments

Comments
 (0)