Skip to content

Commit 7f5e528

Browse files
authored
Various fixes and version 0.8.0 (#96)
* Various fixes and version 8.0 * git ignore. * Cleanup * Fix * workflows * Apply suggestions from code review * More build updates. * Drop platform version * Apply suggestions from code review * Final tweak * Speed up verification * git ignore.
1 parent 0a08d52 commit 7f5e528

File tree

13 files changed

+162
-185
lines changed

13 files changed

+162
-185
lines changed

.github/workflows/build.yml

+18-32
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ on:
1919
# Trigger the workflow on any pull request
2020
pull_request:
2121

22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
24+
cancel-in-progress: true
25+
2226
jobs:
27+
2328
# Prepare environment and build the plugin
2429
build:
2530
name: Build
@@ -29,13 +34,14 @@ jobs:
2934
changelog: ${{ steps.properties.outputs.changelog }}
3035
pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }}
3136
steps:
32-
# Check out current repository
37+
38+
# Check out the current repository
3339
- name: Fetch Sources
3440
uses: actions/checkout@v4
3541

3642
# Validate wrapper
3743
- name: Gradle Wrapper Validation
38-
uses: gradle/wrapper-validation-action@v3
44+
uses: gradle/actions/wrapper-validation@v3
3945

4046
# Set up Java environment for the next steps
4147
- name: Setup Java
@@ -46,9 +52,7 @@ jobs:
4652

4753
# Setup Gradle
4854
- name: Setup Gradle
49-
uses: gradle/gradle-build-action@v3
50-
with:
51-
gradle-home-cache-cleanup: true
55+
uses: gradle/actions/setup-gradle@v4
5256

5357
# Set environment variables
5458
- name: Export Properties
@@ -59,16 +63,12 @@ jobs:
5963
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
6064
CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)"
6165
62-
echo "properties=PROPERTIES" >> $GITHUB_OUTPUT
6366
echo "version=$VERSION" >> $GITHUB_OUTPUT
6467
echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT
65-
6668
echo "changelog<<EOF" >> $GITHUB_OUTPUT
6769
echo "$CHANGELOG" >> $GITHUB_OUTPUT
6870
echo "EOF" >> $GITHUB_OUTPUT
6971
70-
./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier
71-
7272
# Build plugin
7373
- name: Build plugin
7474
run: ./gradlew buildPlugin
@@ -97,7 +97,8 @@ jobs:
9797
needs: [ build ]
9898
runs-on: ubuntu-latest
9999
steps:
100-
# Check out current repository
100+
101+
# Check out the current repository
101102
- name: Fetch Sources
102103
uses: actions/checkout@v4
103104

@@ -110,9 +111,7 @@ jobs:
110111

111112
# Setup Gradle
112113
- name: Setup Gradle
113-
uses: gradle/gradle-build-action@v3
114-
with:
115-
gradle-home-cache-cleanup: true
114+
uses: gradle/actions/setup-gradle@v4
116115

117116
# Run tests
118117
- name: Run Tests
@@ -126,26 +125,21 @@ jobs:
126125
name: tests-result
127126
path: ${{ github.workspace }}/build/reports/tests
128127

129-
# Upload the Kover report to CodeCov
130-
- name: Upload Code Coverage Report
131-
uses: codecov/codecov-action@v4
132-
with:
133-
files: ${{ github.workspace }}/build/reports/kover/report.xml
134-
135128
# Run plugin structure verification along with IntelliJ Plugin Verifier
136129
verify:
137130
name: Verify plugin
138131
needs: [ build ]
139132
runs-on: ubuntu-latest
140133
steps:
134+
141135
# Free GitHub Actions Environment Disk Space
142136
- name: Maximize Build Space
143137
uses: jlumbroso/free-disk-space@main
144138
with:
145139
tool-cache: false
146140
large-packages: false
147141

148-
# Check out current repository
142+
# Check out the current repository
149143
- name: Fetch Sources
150144
uses: actions/checkout@v4
151145

@@ -158,9 +152,7 @@ jobs:
158152

159153
# Setup Gradle
160154
- name: Setup Gradle
161-
uses: gradle/gradle-build-action@v3
162-
with:
163-
gradle-home-cache-cleanup: true
155+
uses: gradle/actions/setup-gradle@v4
164156

165157
# Cache Plugin Verifier IDEs
166158
- name: Setup Plugin Verifier IDEs Cache
@@ -171,7 +163,7 @@ jobs:
171163

172164
# Run Verify Plugin task and IntelliJ Plugin Verifier tool
173165
- name: Run Plugin Verification tasks
174-
run: ./gradlew runPluginVerifier -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
166+
run: ./gradlew verifyPlugin -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
175167

176168
# Collect Plugin Verifier Result
177169
- name: Collect Plugin Verifier Result
@@ -191,17 +183,11 @@ jobs:
191183
permissions:
192184
contents: write
193185
steps:
194-
# Check out current repository
186+
187+
# Check out the current repository
195188
- name: Fetch Sources
196189
uses: actions/checkout@v4
197190

198-
# Set up Java environment for the next steps
199-
- name: Setup Java
200-
uses: actions/setup-java@v4
201-
with:
202-
distribution: zulu
203-
java-version: 17
204-
205191
# Remove old release drafts by using the curl request for the available releases with a draft flag
206192
- name: Remove Old Release Drafts
207193
env:

.github/workflows/release.yml

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
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 the PUBLISH_TOKEN secret provided.
2+
# Running the publishPlugin task requires all 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
66
on:
77
release:
8-
types: [prereleased, released]
8+
types: [ prereleased, released ]
99

1010
jobs:
11+
1112
# Prepare and publish the plugin to JetBrains Marketplace repository
1213
release:
1314
name: Publish Plugin
@@ -16,7 +17,8 @@ jobs:
1617
contents: write
1718
pull-requests: write
1819
steps:
19-
# Check out current repository
20+
21+
# Check out the current repository
2022
- name: Fetch Sources
2123
uses: actions/checkout@v4
2224
with:
@@ -31,9 +33,7 @@ jobs:
3133

3234
# Setup Gradle
3335
- name: Setup Gradle
34-
uses: gradle/gradle-build-action@v3
35-
with:
36-
gradle-home-cache-cleanup: true
36+
uses: gradle/actions/setup-gradle@v4
3737

3838
# Set environment variables
3939
- name: Export Properties
@@ -44,12 +44,11 @@ jobs:
4444
${{ github.event.release.body }}
4545
EOM
4646
)"
47-
4847
echo "changelog<<EOF" >> $GITHUB_OUTPUT
4948
echo "$CHANGELOG" >> $GITHUB_OUTPUT
5049
echo "EOF" >> $GITHUB_OUTPUT
5150
52-
# Update Unreleased section with the current release note
51+
# Update the Unreleased section with the current release note
5352
- name: Patch Changelog
5453
if: ${{ steps.properties.outputs.changelog != '' }}
5554
env:
@@ -85,7 +84,6 @@ jobs:
8584
git checkout -b $BRANCH
8685
git commit -am "Changelog update - $VERSION"
8786
git push --set-upstream origin $BRANCH
88-
8987
gh label create "$LABEL" \
9088
--description "Pull requests with release changelog update" \
9189
--force \

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
.intellijPlatform
12
.gradle
23
.kotlin
34
.idea
45
build
6+
**/.DS_Store

CHANGELOG.md

+15-6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
## [Unreleased]
66

7+
- Removed json validation of config file
8+
- Set minimum versions to 2024
9+
- Updated to newer build tooling
10+
711
## 0.7.0 - 2024-07-20
812

913
- Fixed an issue where initialisation could get into an infinite loop.
@@ -23,8 +27,9 @@
2327

2428
- Add check for dead processes to warn users that the dprint daemon is not responding
2529
- Increase severity of logging in the event processes die or errors are seen in process communication
26-
- This may be a little noisy, and if so disabling the plugin is recommended unless the underlying issue with the process can be fixed
27-
- For intermittent or one off errors, just restart the dprint plugin via the `Restart dprint` action
30+
- This may be a little noisy, and if so disabling the plugin is recommended unless the underlying issue with the
31+
process can be fixed
32+
- For intermittent or one off errors, just restart the dprint plugin via the `Restart dprint` action
2833
- Upgrade dependencies
2934
- Attempt to fix changelog update on publish
3035

@@ -68,7 +73,8 @@
6873

6974
## 0.3.6
7075

71-
- Fix issue where using the IntelliJ formatter would result in a no-op on every second format, IntelliJ is reporting larger formatting ranges that content length and dprint would not format these files
76+
- Fix issue where using the IntelliJ formatter would result in a no-op on every second format, IntelliJ is reporting
77+
larger formatting ranges that content length and dprint would not format these files
7278
- Better handling of virtual files
7379
- Silence an error that is thrown when restarting dprint
7480
- Improve verbose logging in the console
@@ -82,7 +88,8 @@
8288

8389
- Reduce timeout when checking if a file can be formatted in the external formatter
8490
- Cache whether files can be formatted by dprint and create an action to clear this
85-
- Remove custom synchronization and move to an IntelliJ background task queue for dprint tasks (this appears to solve the hard to reproduce lock up issues)
91+
- Remove custom synchronization and move to an IntelliJ background task queue for dprint tasks (this appears to solve
92+
the hard to reproduce lock up issues)
8693

8794
## 0.3.3
8895

@@ -101,8 +108,10 @@
101108

102109
- Introduced support for v5 of the dprint schema
103110
- Added a dprint tool window to provide better output of the formatting process
104-
- Added the `Restart Dprint` action so the underlying editor service can be restarted without needed to go to preferences
105-
- Removed the default key command of `cmd/ctrl+shift+option+D`, it clashed with too many other key commands. Users can still map this manually should they want it.
111+
- Added the `Restart Dprint` action so the underlying editor service can be restarted without needed to go to
112+
preferences
113+
- Removed the default key command of `cmd/ctrl+shift+option+D`, it clashed with too many other key commands. Users can
114+
still map this manually should they want it.
106115

107116
## 0.2.3
108117

0 commit comments

Comments
 (0)