Skip to content

Commit 157379b

Browse files
committed
sync build files with IntelliJ plugins template
1 parent 46503ac commit 157379b

File tree

4 files changed

+33
-27
lines changed

4 files changed

+33
-27
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: Build
2-
32
on:
3+
# Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g., for dependabot pull requests)
44
push:
55
branches: [ master ]
6+
# Trigger the workflow on any pull request
67
pull_request:
78

89
concurrency:
@@ -11,21 +12,27 @@ concurrency:
1112

1213
jobs:
1314

14-
# Prepare environment and build the plugin
15+
# Prepare the environment and build the plugin
1516
build:
1617
name: Build
1718
runs-on: ubuntu-latest
1819
outputs:
1920
version: ${{ steps.properties.outputs.version }}
2021
changelog: ${{ steps.properties.outputs.changelog }}
21-
pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }}
2222
steps:
2323

24+
# Free GitHub Actions Environment Disk Space
25+
- name: Maximize Build Space
26+
uses: jlumbroso/[email protected]
27+
with:
28+
tool-cache: false
29+
large-packages: false
30+
2431
# Check out the current repository
2532
- name: Fetch Sources
2633
uses: actions/checkout@v4
2734

28-
# Set up Java environment for the next steps
35+
# Set up the Java environment for the next steps
2936
- name: Setup Java
3037
uses: actions/setup-java@v4
3138
with:
@@ -46,8 +53,6 @@ jobs:
4653
CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)"
4754
4855
echo "version=$VERSION" >> $GITHUB_OUTPUT
49-
echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT
50-
5156
echo "changelog<<EOF" >> $GITHUB_OUTPUT
5257
echo "$CHANGELOG" >> $GITHUB_OUTPUT
5358
echo "EOF" >> $GITHUB_OUTPUT
@@ -56,7 +61,7 @@ jobs:
5661
- name: Build plugin
5762
run: ./gradlew buildPlugin
5863

59-
# Run tests
64+
# Run tests and upload a code coverage report
6065
test:
6166
name: Test (${{ matrix.os }})
6267
needs: [ build ]
@@ -69,11 +74,19 @@ jobs:
6974
- macos-latest
7075
steps:
7176

77+
# Free GitHub Actions Environment Disk Space
78+
- name: Maximize Build Space
79+
uses: jlumbroso/[email protected]
80+
if: runner.os == 'Linux'
81+
with:
82+
tool-cache: false
83+
large-packages: false
84+
7285
# Check out the current repository
7386
- name: Fetch Sources
7487
uses: actions/checkout@v4
7588

76-
# Set up Java environment for the next steps
89+
# Set up the Java environment for the next steps
7790
- name: Setup Java
7891
uses: actions/setup-java@v4
7992
with:
@@ -83,6 +96,8 @@ jobs:
8396
# Setup Gradle
8497
- name: Setup Gradle
8598
uses: gradle/actions/setup-gradle@v4
99+
with:
100+
cache-read-only: true
86101

87102
# Run tests
88103
- name: Run Tests
@@ -105,7 +120,7 @@ jobs:
105120

106121
# Free GitHub Actions Environment Disk Space
107122
- name: Maximize Build Space
108-
uses: jlumbroso/free-disk-space@main
123+
uses: jlumbroso/free-disk-space@v1.3.1
109124
with:
110125
tool-cache: false
111126
large-packages: false
@@ -114,7 +129,7 @@ jobs:
114129
- name: Fetch Sources
115130
uses: actions/checkout@v4
116131

117-
# Set up Java environment for the next steps
132+
# Set up the Java environment for the next steps
118133
- name: Setup Java
119134
uses: actions/setup-java@v4
120135
with:
@@ -124,17 +139,12 @@ jobs:
124139
# Setup Gradle
125140
- name: Setup Gradle
126141
uses: gradle/actions/setup-gradle@v4
127-
128-
# Cache Plugin Verifier IDEs
129-
- name: Setup Plugin Verifier IDEs Cache
130-
uses: actions/cache@v4
131142
with:
132-
path: ${{ needs.build.outputs.pluginVerifierHomeDir }}/ides
133-
key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }}
143+
cache-read-only: true
134144

135145
# Run Verify Plugin task and IntelliJ Plugin Verifier tool
136146
- name: Run Plugin Verification tasks
137-
run: ./gradlew verifyPlugin -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
147+
run: ./gradlew verifyPlugin
138148

139149
# Collect Plugin Verifier Result
140150
- name: Collect Plugin Verifier Result

build.gradle.kts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,14 @@ dependencies {
3434

3535
// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
3636
intellijPlatform {
37-
create(
38-
providers.gradleProperty("platformType"),
39-
providers.gradleProperty("platformVersion")
40-
)
37+
create(providers.gradleProperty("platformType"), providers.gradleProperty("platformVersion"))
38+
4139
// Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins.
4240
bundledPlugins(providers.gradleProperty("platformBundledPlugins").map { it.split(',') })
4341

4442
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file for plugin from JetBrains Marketplace.
4543
plugins(providers.gradleProperty("platformPlugins").map { it.split(',') })
4644

47-
phpstorm("2025.1")
4845
testFramework(TestFrameworkType.Platform)
4946
}
5047
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ platformPlugins =
2222
platformBundledPlugins = com.jetbrains.php, org.jetbrains.plugins.yaml, Git4Idea
2323

2424
# Gradle Releases -> https://github.com/gradle/gradle/releases
25-
gradleVersion = 8.13
25+
gradleVersion = 8.14.3
2626

2727
# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib
2828
kotlin.stdlib.default.dependency = false

gradle/libs.versions.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,15 @@ junit = "4.13.2"
44
opentest4j = "1.3.0"
55

66
# plugins
7-
changelog = "2.2.1"
8-
intelliJPlatform = "2.5.0"
9-
kotlin = "2.1.20"
7+
changelog = "2.3.0"
8+
intelliJPlatform = "2.7.0"
9+
kotlin = "2.2.0"
1010
kover = "0.9.1"
1111

1212
[libraries]
1313
junit = { group = "junit", name = "junit", version.ref = "junit" }
1414
opentest4j = { group = "org.opentest4j", name = "opentest4j", version.ref = "opentest4j" }
1515

16-
1716
[plugins]
1817
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
1918
intelliJPlatform = { id = "org.jetbrains.intellij.platform", version.ref = "intelliJPlatform" }

0 commit comments

Comments
 (0)