Skip to content
This repository was archived by the owner on Dec 8, 2023. It is now read-only.

Commit e5c9571

Browse files
authored
Merge pull request #40 from MarioAriasC/0.2.5
0.2.5
2 parents acc9650 + 29e6def commit e5c9571

24 files changed

+270
-265
lines changed

.github/workflows/build.yml

Lines changed: 106 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ name: Build
1616
on:
1717
# Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g. for dependabot pull requests)
1818
push:
19-
branches: [main]
19+
branches: [ main ]
2020
# Trigger the workflow on any pull request
2121
pull_request:
2222

@@ -31,6 +31,7 @@ jobs:
3131
outputs:
3232
version: ${{ steps.properties.outputs.version }}
3333
changelog: ${{ steps.properties.outputs.changelog }}
34+
pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }}
3435
steps:
3536
- name: Maximize Build Space
3637
run: |
@@ -53,6 +54,9 @@ jobs:
5354
distribution: zulu
5455
java-version: 17
5556

57+
- name: Setup Gradle
58+
uses: gradle/gradle-build-action@v2
59+
5660
# Set environment variables
5761
- name: Export Properties
5862
id: properties
@@ -71,7 +75,47 @@ jobs:
7175
echo "$CHANGELOG" >> $GITHUB_OUTPUT
7276
echo "EOF" >> $GITHUB_OUTPUT
7377
./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier
78+
# Build plugin
79+
- name: Build plugin
80+
run: ./gradlew buildPlugin
81+
82+
# Prepare plugin archive content for creating artifact
83+
- name: Prepare Plugin Artifact
84+
id: artifact
85+
shell: bash
86+
run: |
87+
cd ${{ github.workspace }}/build/distributions
88+
FILENAME=`ls *.zip`
89+
unzip "$FILENAME" -d content
90+
echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT
91+
# Store already-built plugin as an artifact for downloading
92+
- name: Upload artifact
93+
uses: actions/upload-artifact@v3
94+
with:
95+
name: ${{ steps.artifact.outputs.filename }}
96+
path: ./build/distributions/content/*/*
97+
98+
# Run tests and upload a code coverage report
99+
test:
100+
name: Test
101+
needs: [ build ]
102+
runs-on: ubuntu-latest
103+
steps:
104+
105+
# Check out current repository
106+
- name: Fetch Sources zza
107+
uses: actions/checkout@v3
74108

109+
# Setup Java environment for the next steps
110+
- name: Setup Java
111+
uses: actions/setup-java@v3
112+
with:
113+
distribution: zulu
114+
java-version: 17
115+
116+
# Setup Gradle
117+
- name: Setup Gradle
118+
uses: gradle/gradle-build-action@v2
75119
# Run tests
76120
- name: Run Tests
77121
run: ./gradlew check
@@ -88,16 +132,66 @@ jobs:
88132
uses: codecov/codecov-action@v3
89133
with:
90134
files: ${{ github.workspace }}/build/reports/kover/xml/report.xml
135+
# Run Qodana inspections and provide report
136+
inspectCode:
137+
name: Inspect code
138+
needs: [ build ]
139+
runs-on: ubuntu-latest
140+
permissions:
141+
contents: write
142+
checks: write
143+
pull-requests: write
144+
steps:
145+
146+
# Check out current repository
147+
- name: Fetch Sources
148+
uses: actions/checkout@v3
149+
150+
# Setup Java environment for the next steps
151+
- name: Setup Java
152+
uses: actions/setup-java@v3
153+
with:
154+
distribution: zulu
155+
java-version: 17
156+
157+
# Run Qodana inspections
158+
- name: Qodana - Code Inspection
159+
uses: JetBrains/[email protected]
160+
with:
161+
cache-default-branch-only: true
162+
163+
# Run plugin structure verification along with IntelliJ Plugin Verifier
164+
verify:
165+
name: Verify plugin
166+
needs: [ build, test, inspectCode ]
167+
runs-on: ubuntu-latest
168+
steps:
169+
170+
# Check out current repository
171+
- name: Fetch Sources
172+
uses: actions/checkout@v3
173+
174+
# Setup Java environment for the next steps
175+
- name: Setup Java
176+
uses: actions/setup-java@v3
177+
with:
178+
distribution: zulu
179+
java-version: 17
180+
181+
# Setup Gradle
182+
- name: Setup Gradle
183+
uses: gradle/gradle-build-action@v2
184+
91185
# Cache Plugin Verifier IDEs
92186
- name: Setup Plugin Verifier IDEs Cache
93187
uses: actions/cache@v3
94188
with:
95-
path: ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides
189+
path: ${{ needs.build.outputs.pluginVerifierHomeDir }}/ides
96190
key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }}
97191

98192
# Run Verify Plugin task and IntelliJ Plugin Verifier tool
99193
- name: Run Plugin Verification tasks
100-
run: ./gradlew runPluginVerifier -Dplugin.verifier.home.dir=${{ steps.properties.outputs.pluginVerifierHomeDir }}
194+
run: ./gradlew runPluginVerifier -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
101195

102196
# Collect Plugin Verifier Result
103197
- name: Collect Plugin Verifier Result
@@ -107,34 +201,12 @@ jobs:
107201
name: pluginVerifier-result
108202
path: ${{ github.workspace }}/build/reports/pluginVerifier
109203

110-
# Run Qodana inspections
111-
- name: Qodana - Code Inspection
112-
uses: JetBrains/[email protected]
113-
114-
# Prepare plugin archive content for creating artifact
115-
- name: Prepare Plugin Artifact
116-
id: artifact
117-
shell: bash
118-
run: |
119-
cd ${{ github.workspace }}/build/distributions
120-
FILENAME=`ls *.zip`
121-
unzip "$FILENAME" -d content
122-
123-
echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT
124-
125-
# Store already-built plugin as an artifact for downloading
126-
- name: Upload artifact
127-
uses: actions/upload-artifact@v3
128-
with:
129-
name: ${{ steps.artifact.outputs.filename }}
130-
path: ./build/distributions/content/*/*
131-
132204
# Prepare a draft release for GitHub Releases page for the manual verification
133205
# If accepted and published, release workflow would be triggered
134206
releaseDraft:
135-
name: Release Draft
207+
name: Release draft
136208
if: github.event_name != 'pull_request'
137-
needs: build
209+
needs: [ build, verify ]
138210
runs-on: ubuntu-latest
139211
permissions:
140212
contents: write
@@ -144,6 +216,13 @@ jobs:
144216
- name: Fetch Sources
145217
uses: actions/checkout@v3
146218

219+
# Setup Java environment for the next steps
220+
- name: Setup Java
221+
uses: actions/setup-java@v3
222+
with:
223+
distribution: zulu
224+
java-version: 17
225+
147226
# Remove old release drafts by using the curl request for the available releases with draft flag
148227
- name: Remove Old Release Drafts
149228
env:

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,18 @@ jobs:
2323
with:
2424
ref: ${{ github.event.release.tag_name }}
2525

26-
# Setup Java 11 environment for the next steps
26+
# Setup Java environment for the next steps
2727
- name: Setup Java
2828
uses: actions/setup-java@v2
2929
with:
3030
distribution: zulu
3131
java-version: 17
3232
cache: gradle
3333

34+
# Setup Gradle
35+
- name: Setup Gradle
36+
uses: gradle/gradle-build-action@v2
37+
3438
# Set environment variables
3539
- name: Export Properties
3640
id: properties

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ jobs:
4141
with:
4242
distribution: zulu
4343
java-version: 17
44-
cache: gradle
44+
# Setup Gradle
45+
- name: Setup Gradle
46+
uses: gradle/gradle-build-action@v2
4547

4648
# Run IDEA prepared for UI testing
4749
- name: Run IDE

.run/Run IDE for UI Tests.run.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414
<option value="runIdeForUiTests" />
1515
</list>
1616
</option>
17-
<option name="vmOptions" value="" />
17+
<option name="vmOptions" value="-Xmx8G" />
1818
</ExternalSystemSettings>
1919
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
2020
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
2121
<DebugAllEnabled>false</DebugAllEnabled>
22+
<ForceTestExec>false</ForceTestExec>
2223
<method v="2" />
2324
</configuration>
2425
</component>
File renamed without changes.
File renamed without changes.

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
## [Unreleased]
66

7+
### Added
8+
- Support for the new IDEA platform version 2023.2
9+
- Updated to the latest JetBrain's IntelliJ platform plugin version.
10+
711
## [0.2.4] - 2023-04-08
812

913
### Added

build.gradle.kts

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,12 @@ fun environment(key: String) = providers.environmentVariable(key)
1111
plugins {
1212
// Java support
1313
id("java")
14-
// Kotlin support
15-
id("org.jetbrains.kotlin.jvm") version "1.8.10"
16-
// Gradle IntelliJ Plugin
17-
id("org.jetbrains.intellij") version "1.13.2"
18-
// Gradle Changelog Plugin
19-
id("org.jetbrains.changelog") version "2.0.0"
20-
// Gradle Qodana Plugin
21-
id("org.jetbrains.qodana") version "0.1.13"
22-
// Gradle Kover Plugin
23-
id("org.jetbrains.kotlinx.kover") version "0.6.1"
24-
// Grammar Kit
25-
id("org.jetbrains.grammarkit") version "2021.2.2"
14+
alias(libs.plugins.kotlin)
15+
alias(libs.plugins.gradleIntelliJPlugin)
16+
alias(libs.plugins.changelog)
17+
alias(libs.plugins.qodana)
18+
alias(libs.plugins.kover)
19+
alias(libs.plugins.grammarkit)
2620
}
2721

2822
group = properties("pluginGroup").get()
@@ -70,21 +64,25 @@ qodana {
7064
showReport.set(environment("QODANA_SHOW_REPORT").map(String::toBoolean).getOrElse(false))
7165
}
7266

73-
kover.xmlReport {
74-
onCheck.set(true)
67+
koverReport {
68+
defaults {
69+
xml {
70+
onCheck = true
71+
}
72+
}
7573
}
7674

7775
// generate code
7876
val generateZigParser = task<GenerateParserTask>("generateZigParser") {
79-
source.set("src/main/kotlin/org/ziglang/jb/grammar/zig.bnf")
77+
sourceFile.set(file("src/main/kotlin/org/ziglang/jb/grammar/zig.bnf"))
8078
targetRoot.set("src/main/gen")
8179
pathToParser.set("/org/ziglang/jb/psi/parser/ZigParser.java")
8280
pathToPsiRoot.set("org/ziglang/jb/psi")
8381
purgeOldFiles.set(true)
8482
}
8583

8684
val generateZigLexer = task<GenerateLexerTask>("generateZigLexer") {
87-
source.set("src/main/kotlin/org/ziglang/jb/grammar/zig.flex")
85+
sourceFile.set(file("src/main/kotlin/org/ziglang/jb/grammar/zig.flex"))
8886
targetDir.set("src/main/gen/org/ziglang/jb/lexer")
8987
targetClass.set("ZigLexer")
9088
purgeOldFiles.set(true)

gradle.properties

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
pluginGroup = com.github.marioariasc.zigsupport
55
pluginName = zig-support
66
pluginRepositoryUrl = https://github.com/MarioAriasC/zig-support
7-
pluginVersion = 0.2.4
7+
pluginVersion = 0.2.5
88

99
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
1010
# for insight into build numbers and IntelliJ Platform versions.
1111
pluginSinceBuild = 223
12-
pluginUntilBuild = 231.*
12+
pluginUntilBuild = 232.*
1313

1414

1515
platformType = IU
@@ -22,12 +22,16 @@ platformPlugins =
2222
# Java language level used to compile sources and to generate the files for - Java 11 is required since 2020.3
2323
javaVersion = 17
2424

25-
gradleVersion = 8.0.2
25+
gradleVersion = 8.2.1
2626

2727
# Opt-out flag for bundling Kotlin standard library.
2828
# See https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library for details.
2929
# suppress inspection "UnusedProperty"
3030
kotlin.stdlib.default.dependency = false
3131

3232
# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html
33-
org.gradle.unsafe.configuration-cache = true
33+
org.gradle.unsafe.configuration-cache = true
34+
35+
org.gradle.caching = true
36+
37+
systemProp.org.gradle.unsafe.kotlin.assignment = true

gradle/libs.versions.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[versions]
2+
# libraries
3+
annotations = "24.0.1"
4+
5+
# plugins
6+
kotlin = "1.9.0"
7+
changelog = "2.1.2"
8+
gradleIntelliJPlugin = "1.15.0"
9+
qodana = "0.1.13"
10+
kover = "0.7.2"
11+
grammarkit = "2022.3.1"
12+
13+
[libraries]
14+
annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" }
15+
16+
[plugins]
17+
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
18+
gradleIntelliJPlugin = { id = "org.jetbrains.intellij", version.ref = "gradleIntelliJPlugin" }
19+
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
20+
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
21+
qodana = { id = "org.jetbrains.qodana", version.ref = "qodana" }
22+
grammarkit = { id = "org.jetbrains.grammarkit", version.ref = "grammarkit"}

0 commit comments

Comments
 (0)