Skip to content

Commit 7fda822

Browse files
authored
Merge pull request #108 from openfga/release/v0.1.6
release: v0.1.6
2 parents 54a3220 + 30a1ff1 commit 7fda822

File tree

5 files changed

+129
-41
lines changed

5 files changed

+129
-41
lines changed

.github/workflows/main.yaml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
env:
1616
PLUGIN_ARTIFACT_NAME: 'openfga_intellij_plugin'
1717
DIST_FOLDER: 'build/distributions'
18+
JAVA_VERSION: '17'
1819

1920
jobs:
2021
build:
@@ -24,10 +25,10 @@ jobs:
2425
- name: Check out repository
2526
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2627

27-
- name: Setup Java 17
28+
- name: Setup Java
2829
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
2930
with:
30-
java-version: 17
31+
java-version: ${{ env.JAVA_VERSION }}
3132
distribution: 'temurin'
3233

3334
- name: Build the plugin using Gradle
@@ -41,40 +42,36 @@ jobs:
4142

4243

4344
test_compatibility:
44-
name: Test plugin compatibility with IntelliJ Platform 2024.1
45+
name: Test plugin compatibility with IntelliJ Platform
4546
needs:
4647
- build
4748
runs-on: ubuntu-latest
48-
strategy:
49-
matrix:
50-
ide-version:
51-
- clion:2024.3
52-
- goland:2024.3
53-
- ideaIC:2024.3
54-
- ideaIU:2024.3
55-
- phpstorm:2024.3
56-
- pycharmPC:2024.3
57-
- pycharmPY:2024.3
58-
- riderRD:2024.3
59-
- webstorm:2024.3
60-
# - ideaIC:LATEST-EAP-SNAPSHOT - Removed from testing as no YAML plugin exists yet
6149
steps:
6250
- name: Check out repository
6351
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6452

53+
- name: Setup Java
54+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
55+
with:
56+
java-version: ${{ env.JAVA_VERSION }}
57+
distribution: 'temurin'
58+
6559
- name: Download built plugin artifact
6660
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
6761
with:
6862
name: ${{ env.PLUGIN_ARTIFACT_NAME }}
6963
path: ${{ env.DIST_FOLDER }}
7064

65+
- name: Generate the IntelliJ Platform IDE versions list for the plugin verifier
66+
run: ./gradlew generateIdeVersionsList
67+
7168
- name: Verify Plugin on IntelliJ Platforms
7269
id: verify
7370
uses: ChrisCarini/intellij-platform-plugin-verifier-action@9e042b5f5996a37ac60ea718afb53a5ca1a6bb78 # v2.0.2
7471
env:
7572
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7673
with:
77-
ide-versions: ${{ matrix.ide-version }}
74+
ide-versions: build/verifier-plugin/intellij-platform-plugin-verifier-action-ide-versions-file.txt
7875
plugin-location: '${{ env.DIST_FOLDER }}/*.zip'
7976

8077
- name: Get log file path and print contents

CHANGELOG.md

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,31 @@
1-
## v0.1.5
1+
# Changelog
22

3-
### [0.1.5](https://github.com/openfga/intellij-plugin/compare/v0.1.4...v0.1.5) (2025-03-03)
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/)
6+
and this project adheres to [Semantic Versioning](https://semver.org/).
7+
8+
## [Unreleased]
9+
10+
## [0.1.6] - 2025-08-07
411

512
Added
6-
- add support for 2025.* based IDEs ([#80](https://github.com/openfga/intellij-plugin/pull/80))
13+
- add support for 2025.2.* based IDEs ([#108](https://github.com/openfga/intellij-plugin/pull/108))
714

8-
## v0.1.4
15+
## [0.1.5] - 2025-03-03
16+
17+
Added
18+
- add support for 2025.* based IDEs ([#80](https://github.com/openfga/intellij-plugin/pull/80))
919

10-
### [0.1.4](https://github.com/openfga/intellij-plugin/compare/v0.1.3...v0.1.4) (2024-12-02)
20+
## [0.1.4] - 2024-12-02
1121

1222
Added
1323
- add support for IDEs based on IntelliJ IDEA 2024.3.* (https://github.com/openfga/intellij-plugin/pull/65) - thanks @edlundin
1424

15-
## v0.1.3
16-
17-
### [0.1.3](https://github.com/openfga/intellij-plugin/compare/v0.1.2...v0.1.3) (2024-09-06)
25+
## [0.1.3] - 2024-09-06
1826

1927
Added
20-
* add support for 2024.2.* based IDEs
28+
- add support for 2024.2.* based IDEs
2129

2230
Fixed
2331
- `tupleuserset-not-direct` is now prioritized above `no-entrypoint` error (inherited from https://github.com/openfga/language/releases/tag/pkg%2Fjava%2Fv0.2.0-beta.2)
@@ -26,27 +34,29 @@ Fixed
2634
Removed
2735
- Remove UI theme (we now only offer an editor theme) (#30)
2836

29-
## v0.1.2
30-
31-
### [0.1.2](https://github.com/openfga/intellij-plugin/compare/v0.1.1...v0.1.2) (2024-06-13)
32-
33-
* No functional changes
37+
## [0.1.2] - 2024-06-13
3438

35-
## v0.1.1
39+
- No functional changes
3640

37-
### [0.1.1](https://github.com/openfga/intellij-plugin/compare/v0.1.0...v0.1.1) (2024-05-31)
41+
## [0.1.1] - 2024-05-31
3842

3943
- feat: validation for OpenFGA model files
4044
- feat: validation for OpenFGA models in store files
4145

42-
## v0.1.0
43-
44-
### [0.1.0](https://github.com/openfga/intellij-plugin/releases/tag/v0.1.0) (2024-05-10)
46+
## [0.1.0] - 2024-05-10
4547

4648
Initial Release
47-
4849
- feat: custom OpenFGA dark theme
4950
- feat: DSL syntax support and validation
5051
- feat: authorization model dsl file and live templates
5152
- feat: generate json file from DSL (requires OpenFGA CLI to be installed)
5253
- feat: configure servers in OpenFGA tool window
54+
55+
[Unreleased]: https://github.com/openfga/intellij-plugin/compare/v0.1.6...HEAD
56+
[0.1.6]: https://github.com/openfga/intellij-plugin/compare/v0.1.5...v0.1.6
57+
[0.1.5]: https://github.com/openfga/intellij-plugin/compare/v0.1.4...v0.1.5
58+
[0.1.4]: https://github.com/openfga/intellij-plugin/compare/v0.1.3...v0.1.4
59+
[0.1.3]: https://github.com/openfga/intellij-plugin/compare/v0.1.2...v0.1.3
60+
[0.1.2]: https://github.com/openfga/intellij-plugin/compare/v0.1.1...v0.1.2
61+
[0.1.1]: https://github.com/openfga/intellij-plugin/compare/v0.1.0...v0.1.1
62+
[0.1.0]: https://github.com/openfga/intellij-plugin/releases/tag/v0.1.0

build.gradle.kts

Lines changed: 80 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ plugins {
1010
}
1111

1212
group = "dev.openfga.intellijplugin"
13-
version = "0.1.5"
13+
version = "0.1.6"
1414
sourceSets["main"].java.srcDirs("src/main/java", "src/generated/java")
1515

1616
repositories {
@@ -118,8 +118,8 @@ tasks {
118118
}
119119

120120
patchPluginXml {
121-
sinceBuild.set("233")
122-
untilBuild.set("251.*")
121+
sinceBuild.set(providers.gradleProperty("plugin.sinceBuild"))
122+
untilBuild.set(providers.gradleProperty("plugin.untilBuild"))
123123
}
124124

125125
signPlugin {
@@ -131,5 +131,82 @@ tasks {
131131
publishPlugin {
132132
token.set(System.getenv("PUBLISH_TOKEN"))
133133
}
134+
135+
register("generateIdeVersionsList") {
136+
group = "verification"
137+
description = "Generate IDE versions list for plugin verifier"
138+
139+
val outputFile = layout.buildDirectory.file("verifier-plugin/intellij-platform-plugin-verifier-action-ide-versions-file.txt")
140+
outputs.file(outputFile)
141+
142+
val sinceBuildValue = providers.gradleProperty("plugin.sinceBuild")
143+
val untilBuildValue = providers.gradleProperty("plugin.untilBuild")
144+
// Enable incremental builds / caching
145+
inputs.property("plugin.sinceBuild", sinceBuildValue)
146+
inputs.property("plugin.untilBuild", untilBuildValue)
147+
148+
doLast {
149+
val BASE_YEAR = 2000
150+
151+
fun buildNumberToVersion(buildNumber: Int): String? {
152+
val buildStr = buildNumber.toString()
153+
if (buildStr.length < 3) return null
154+
155+
val year = BASE_YEAR + buildStr.substring(0, 2).toInt()
156+
val version = buildStr.last().toString().toInt()
157+
158+
if (version > 3) return null
159+
160+
return "$year.$version"
161+
}
162+
163+
fun generateOptimizedVersions(since: Int, until: Int): List<String> {
164+
val sinceYear = BASE_YEAR + since.toString().substring(0, 2).toInt()
165+
val untilYear = BASE_YEAR + until.toString().substring(0, 2).toInt()
166+
167+
val versions = mutableSetOf<String>()
168+
169+
// Always include the exact since version
170+
buildNumberToVersion(since)?.let { versions.add(it) }
171+
172+
// For intermediary years, only include the latest version (.3)
173+
// We do this to reduce the number of versions while still covering all major releases
174+
// Otherwise, we would run out of space on default GitHub Actions runners
175+
for (year in (sinceYear + 1) until untilYear) {
176+
val yearCode = year - BASE_YEAR
177+
val latestBuildNumber = yearCode * 10 + 3 // Always .3 for intermediary years
178+
buildNumberToVersion(latestBuildNumber)?.let { versions.add(it) }
179+
}
180+
181+
// Always include the exact until version (if different from since)
182+
if (until != since) {
183+
buildNumberToVersion(until)?.let { versions.add(it) }
184+
}
185+
186+
return versions.sorted()
187+
}
188+
189+
val sinceVersion = sinceBuildValue.get().replace(".*", "").toInt()
190+
val untilVersion = untilBuildValue.get().replace(".*", "").toInt()
191+
192+
println("Optimizing versions from build $sinceVersion to $untilVersion")
193+
194+
val versions = generateOptimizedVersions(sinceVersion, untilVersion)
195+
196+
val ideVersions = buildList {
197+
versions.forEach { version ->
198+
add("ideaIC:$version")
199+
add("ideaIU:$version")
200+
}
201+
}.sorted()
202+
203+
outputFile.get().asFile.parentFile.mkdirs()
204+
outputFile.get().asFile.writeText(ideVersions.joinToString("\n"))
205+
206+
println("Generated optimized ${ideVersions.size} IDE versions (reduced from potential ${(untilVersion - sinceVersion + 1) * 2})")
207+
println("Versions: ${versions.joinToString(", ")}")
208+
println("Output: ${outputFile.get().asFile}")
209+
}
210+
}
134211
}
135212

gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ kotlin.stdlib.default.dependency=false
44
org.gradle.configuration-cache=true
55
# Enable Gradle Build Cache -> https://docs.gradle.org/current/userguide/build_cache.html
66
org.gradle.caching=true
7+
8+
# Plugin compatibility
9+
plugin.sinceBuild=233
10+
plugin.untilBuild=252.*

src/main/resources/META-INF/plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<change-notes><![CDATA[
2121
<h2>New Features</h2>
2222
<ul>
23-
<li>add support for 2025.* based IDEs</li>
23+
<li>add support for 2025.2.* based IDEs.</li>
2424
</ul>
2525
]]></change-notes>
2626

0 commit comments

Comments
 (0)