Skip to content

Commit 22cfdd2

Browse files
authored
Specify both platformType and platformVersion to correctly "distinguish between IntelliJ IDEA and IntelliJ IDEA Ultimate when parsing IU code"; set concurrency group for build.yaml GHA workflow.; Use single-string notation instead of group: String, name: String, version: String for junit (#529)
* Specify both `platformType` and `platformVersion` to correctly "distinguish between IntelliJ IDEA and IntelliJ IDEA Ultimate when parsing IU code"; set concurrency group for `build.yaml` GHA workflow. * Use single-string notation instead of `group: String, name: String, version: String` for `junit`
1 parent bef630d commit 22cfdd2

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ on:
2121
# Trigger the workflow on any pull request
2222
pull_request:
2323

24+
# The concurrency group is configured to run the workflow on the latest iteration of a PR
25+
# (and cancel workflows for older iterations).
26+
concurrency:
27+
group: ${{ github.workflow }}-${{ github.head_ref }}-${{ github.base_ref }}
28+
cancel-in-progress: true
29+
2430
jobs:
2531
files-changed:
2632
uses: ./.github/workflows/files-changed.yaml

buildSrc/src/main/kotlin/build-standard-jetbrains-plugin-build.gradle.kts

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ dependencies {
6060
intellijPlatform {
6161
val isSnapshot = platformVersion.endsWith("-SNAPSHOT")
6262
create(
63-
type = IntelliJPlatformType.fromCode(platformType),
63+
// Specify both `platformType` and `platformVersion` to correctly "distinguish between IntelliJ IDEA and
64+
// IntelliJ IDEA Ultimate when parsing IU code". This can likely be removed after all plugins updated to
65+
// 2025.3.* RELEASE. See below commit & method impl for details:
66+
// - https://github.com/JetBrains/intellij-platform-gradle-plugin/commit/79f8625f6411ca9cacb3b7db32cbcde7a159e1ad
67+
// - https://github.com/JetBrains/intellij-platform-gradle-plugin/blob/4abe312ff252b9f013451d82844ef4cc9dcc0807/src/main/kotlin/org/jetbrains/intellij/platform/gradle/IntelliJPlatformType.kt#L151-L197
68+
type = IntelliJPlatformType.fromCode(platformType, platformVersion),
6469
version = platformVersion,
6570
) {
6671
// `useInstaller` needs to be set to 'false' (aka, `isSnapshot` = 'true') to resolve EAP releases.
@@ -83,7 +88,7 @@ dependencies {
8388
testFramework(TestFrameworkType.Platform)
8489
}
8590

86-
testImplementation(group = "junit", name = "junit", version = "4.13.2")
91+
testImplementation("junit:junit:4.13.2")
8792
testImplementation("org.testng:testng:7.10.2")
8893
testImplementation("org.mockito:mockito-core:5.12.0")
8994
}
@@ -220,7 +225,15 @@ intellijPlatform {
220225
failureLevel.set(failureLevels)
221226
ides {
222227
logger.lifecycle("Verifying against IntelliJ Platform $platformType $platformVersion")
223-
create(IntelliJPlatformType.fromCode(platformType), platformVersion) {
228+
create(
229+
// Specify both `platformType` and `platformVersion` to correctly "distinguish between IntelliJ IDEA and
230+
// IntelliJ IDEA Ultimate when parsing IU code". This can likely be removed after all plugins updated to
231+
// 2025.3.* RELEASE. See below commit & method impl for details:
232+
// - https://github.com/JetBrains/intellij-platform-gradle-plugin/commit/79f8625f6411ca9cacb3b7db32cbcde7a159e1ad
233+
// - https://github.com/JetBrains/intellij-platform-gradle-plugin/blob/4abe312ff252b9f013451d82844ef4cc9dcc0807/src/main/kotlin/org/jetbrains/intellij/platform/gradle/IntelliJPlatformType.kt#L151-L197
234+
type = IntelliJPlatformType.fromCode(platformType, platformVersion),
235+
version = platformVersion,
236+
) {
224237
useCache = true
225238
}
226239

0 commit comments

Comments
 (0)