Skip to content

Commit 533c9d2

Browse files
authored
chore: fix Latest IJ workflow (#979)
* chore: update to intellij gradle plugin 2.2.0 Signed-off-by: Stephane Bouchet <[email protected]> * chore: fix latest IJ workflow Signed-off-by: Stephane Bouchet <[email protected]> * chore: fix latest IJ workflow Signed-off-by: Stephane Bouchet <[email protected]> * chore: fix latest IJ workflow Signed-off-by: Stephane Bouchet <[email protected]> * chore: fix latest IJ workflow Signed-off-by: Stephane Bouchet <[email protected]> * chore: fix latest IJ workflow Signed-off-by: Stephane Bouchet <[email protected]> --------- Signed-off-by: Stephane Bouchet <[email protected]>
1 parent d73cec4 commit 533c9d2

File tree

5 files changed

+44
-48
lines changed

5 files changed

+44
-48
lines changed

.github/workflows/IJ-latest.yml

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
- name: Build with Gradle
2626
run: |
2727
LATEST_EAP_SNAPSHOT=$(./gradlew printProductsReleases | grep 'IC-' | head -n 1 | cut -d'-' -f2)
28+
echo "building using latest EAP version $LATEST_EAP_SNAPSHOT"
2829
./gradlew build --continue -PplatformVersion=$LATEST_EAP_SNAPSHOT
2930
- uses: actions/upload-artifact@v4
3031
if: always()

.github/workflows/validate_IJ_versions.yml

+8-7
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ on:
77
jobs:
88
validate:
99
runs-on: ubuntu-latest
10-
strategy:
11-
matrix:
12-
IJ: [ 2023.1, 2023.2, 2023.3, 2024.1, 2024.2, 2024.3 ]
1310

1411
steps:
12+
# Free GitHub Actions Environment Disk Space
13+
- name: Maximize Build Space
14+
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # main
15+
with:
16+
tool-cache: false
17+
large-packages: false
1518
- name: Checkout Code
1619
uses: actions/checkout@v4
1720
- name: Set up JDK 17
@@ -22,14 +25,12 @@ jobs:
2225
cache: 'gradle'
2326
- name: Grant execute permission for gradlew
2427
run: chmod +x gradlew
25-
- name: Build with Gradle
26-
run: ./gradlew build -PplatformVersion=${{ matrix.IJ }}
2728
- name: Verify with Gradle
28-
run: ./gradlew verifyPlugin -PplatformVersion=${{ matrix.IJ }}
29+
run: ./gradlew verifyPlugin
2930
- name: Upload report
3031
uses: actions/upload-artifact@v4
3132
if: always()
3233
with:
33-
name: ${{ matrix.IJ }}-verifier-report
34+
name: verifier-report
3435
path: build/reports/pluginVerifier
3536
if-no-files-found: ignore

build.gradle.kts

+30-35
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent
33
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
44
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
55
import org.jetbrains.intellij.platform.gradle.models.ProductRelease
6+
import org.jetbrains.intellij.platform.gradle.tasks.VerifyPluginTask.FailureLevel.*
7+
import org.jetbrains.intellij.platform.gradle.tasks.VerifyPluginTask.VerificationReportsFormats.MARKDOWN
8+
import org.jetbrains.intellij.platform.gradle.tasks.VerifyPluginTask.VerificationReportsFormats.PLAIN
69

710
plugins {
811
id("idea")
@@ -34,7 +37,7 @@ repositories {
3437

3538
dependencies {
3639
intellijPlatform {
37-
create(IntelliJPlatformType.IntellijIdeaCommunity, ideaVersion)
40+
intellijIdeaCommunity(ideaVersion)
3841

3942
// Bundled Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins.
4043
bundledPlugins(providers.gradleProperty("platformBundledPlugins").map { it.split(',') })
@@ -47,8 +50,6 @@ dependencies {
4750

4851
pluginVerifier()
4952

50-
instrumentationTools()
51-
5253
testFramework(TestFrameworkType.Platform)
5354
}
5455

@@ -68,7 +69,6 @@ dependencies {
6869
implementation(libs.jjwt.impl)
6970
implementation(libs.jjwt.jackson)
7071
implementation(libs.converter.jackson)
71-
implementation(libs.annotations) // to build against platform <= 2023.2
7272

7373
// for unit tests
7474
testImplementation(libs.junit)
@@ -106,8 +106,10 @@ intellijPlatform {
106106
}
107107

108108
pluginVerification {
109+
failureLevel = listOf(INVALID_PLUGIN, COMPATIBILITY_PROBLEMS, MISSING_DEPENDENCIES)
110+
verificationReportsFormats = listOf(MARKDOWN, PLAIN)
109111
ides {
110-
ide(IntelliJPlatformType.IntellijIdeaCommunity, ideaVersion)
112+
recommended()
111113
}
112114
freeArgs = listOf(
113115
"-mute",
@@ -121,16 +123,8 @@ tasks {
121123
gradleVersion = providers.gradleProperty("gradleVersion").get()
122124
}
123125

124-
fun supportsEnhancedClassRedefinition(): Boolean {
125-
val platformVersion = findProperty("platformVersion").toString().toFloatOrNull()
126-
return platformVersion != null
127-
&& platformVersion >= 2024.1
128-
}
129-
130126
runIde {
131-
if (supportsEnhancedClassRedefinition()) {
132-
jvmArgs("-XX:+AllowEnhancedClassRedefinition", "-XX:HotswapAgent=fatjar")
133-
}
127+
jvmArgs("-XX:+AllowEnhancedClassRedefinition", "-XX:HotswapAgent=fatjar")
134128
systemProperty("com.redhat.devtools.intellij.telemetry.mode", "debug")
135129
findProperty("tools.dl.path")?.let { systemProperty("tools.dl.path", it) }
136130
//systemProperty("jboss.sandbox.api.endpoint", "http://localhost:3000") // enable when running sandbox locally, see below
@@ -194,19 +188,20 @@ tasks {
194188
sourceSets {
195189
create("it") {
196190
description = "integrationTest"
191+
java.srcDir("src/it/java")
192+
resources.srcDir("src/it/resources")
197193
compileClasspath += sourceSets.main.get().compileClasspath + sourceSets.test.get().compileClasspath
198-
runtimeClasspath += output + compileClasspath
194+
runtimeClasspath += output + compileClasspath + sourceSets.test.get().runtimeClasspath
199195
}
200196
}
201197

202-
configurations.all {
203-
exclude(group = "org.slf4j", module = "slf4j-api")
204-
exclude(group = "bundledPlugin", module = "Docker") // suppress multiple SLF4J providers
198+
configurations {
199+
runtimeClasspath {
200+
exclude(group = "org.slf4j", module = "slf4j-api")
201+
exclude(group = "bundledPlugin", module = "Docker") // suppress multiple SLF4J providers
202+
}
205203
}
206204

207-
configurations["itRuntimeOnly"].extendsFrom(configurations.testRuntimeOnly.get())
208-
configurations["itImplementation"].extendsFrom(configurations.testImplementation.get())
209-
210205
val integrationTest by intellijPlatformTesting.testIde.registering {
211206
task {
212207
systemProperty("com.redhat.devtools.intellij.telemetry.mode", "disabled")
@@ -222,24 +217,14 @@ val integrationTest by intellijPlatformTesting.testIde.registering {
222217
showStandardStreams = false
223218
}
224219
jvmArgs("-Djava.awt.headless=true")
225-
useJUnitPlatform {
226-
includeEngines("junit-vintage")
227-
excludeEngines("junit-jupiter")
228-
}
229220
shouldRunAfter(tasks["test"])
230221
}
231222

232223
dependencies {
233-
testRuntimeOnly(libs.junit.vintage.engine)
234-
testImplementation(libs.junit.platform.launcher)
235-
testImplementation(libs.junit.platform.suite)
236-
testImplementation(libs.junit.jupiter)
237-
testImplementation(libs.junit.jupiter.api)
238-
testImplementation(libs.junit.jupiter.engine)
239224
testImplementation(devtoolsCommonForTests)
240-
testImplementation(libs.devtools.common.ui.test)
241225
testImplementation(libs.awaitility)
242226
}
227+
243228
}
244229

245230
val integrationUITest by intellijPlatformTesting.testIde.registering {
@@ -267,10 +252,14 @@ val integrationUITest by intellijPlatformTesting.testIde.registering {
267252
shouldRunAfter(tasks["test"])
268253
}
269254

270-
plugins {
271-
robotServerPlugin()
255+
dependencies {
256+
testRuntimeOnly(libs.junit.jupiter.engine)
257+
testImplementation(libs.junit.platform.suite)
258+
testImplementation(libs.junit.platform.launcher)
259+
testImplementation(libs.junit.jupiter.api)
260+
testImplementation(libs.devtools.common.ui.test)
272261
}
273-
262+
/*
274263
dependencies {
275264
testImplementation(libs.junit.platform.launcher)
276265
testImplementation(libs.junit.platform.suite)
@@ -281,6 +270,8 @@ val integrationUITest by intellijPlatformTesting.testIde.registering {
281270
testImplementation(libs.devtools.common.ui.test)
282271
testImplementation(libs.awaitility)
283272
}
273+
*/
274+
284275
}
285276

286277
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-tasks.html#runIdeForUiTests
@@ -293,7 +284,11 @@ val runIdeForUiTests by intellijPlatformTesting.runIde.registering {
293284
"-Djb.consents.confirmation.enabled=false",
294285
)
295286
}
287+
288+
systemProperty("robot-server.port", System.getProperty("robot-server.port"))
289+
systemProperty("com.redhat.devtools.intellij.telemetry.mode", "disabled")
296290
}
291+
297292
plugins {
298293
robotServerPlugin()
299294
}

gradle.properties

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ jetBrainsToken=invalid
33
jetBrainsChannel=stable
44

55
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
6-
# platformType = IC (not needed as hard-coded in gradle build directly)
7-
platformVersion=2024.3
6+
platformVersion=2024.1
87

98
# Gradle Releases -> https://github.com/gradle/gradle/releases
109
gradleVersion=8.5

gradle/libs.versions.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ retrofit2 = "2.11.0"
99
mockito = "5.12.0"
1010
easytesting = "1.4"
1111
mockserver = "5.15.0"
12-
junit-platform = "1.10.3"
13-
junit-jupiter = "5.10.3"
14-
devtools-common-ui-test = "0.4.3"
12+
junit-platform = "1.11.3"
13+
junit-jupiter = "5.11.3"
14+
devtools-common-ui-test = "0.4.4-SNAPSHOT"
1515
awaitility = "4.2.2"
1616
annotations = "24.0.0"
1717

1818
# plugins
19-
gradleIntelliJPlugin = "2.0.1"
19+
gradleIntelliJPlugin = "2.2.0"
2020
sonarqube = "5.1.0.4882"
2121

2222
[libraries]

0 commit comments

Comments
 (0)