From b198d06dd023e665c68e38a6788293f4b4bc93be Mon Sep 17 00:00:00 2001 From: Stephane Bouchet Date: Tue, 22 Oct 2024 12:25:39 +0200 Subject: [PATCH 1/6] chore: Support IC-2024.2+ Signed-off-by: Stephane Bouchet --- .github/workflows/IJ-latest.yml | 34 +++++ .github/workflows/IJ.yml | 31 +--- .github/workflows/ci.yml | 72 +++++---- .github/workflows/conventionalCheck.yml | 2 +- .gitignore | 1 + build.gradle | 99 ------------ build.gradle.kts | 141 ++++++++++++++++++ gradle.properties | 23 ++- gradle/libs.versions.toml | 27 ++++ gradle/wrapper/gradle-wrapper.properties | 2 +- settings.gradle | 6 - settings.gradle.kts | 1 + .../configuration/limits/EventCounts.java | 4 +- .../telemetry/core/util/BasicGlobPattern.java | 4 +- .../telemetry/core/util/FileUtils.java | 4 +- 15 files changed, 282 insertions(+), 169 deletions(-) create mode 100644 .github/workflows/IJ-latest.yml delete mode 100644 build.gradle create mode 100644 build.gradle.kts create mode 100644 gradle/libs.versions.toml delete mode 100644 settings.gradle create mode 100644 settings.gradle.kts diff --git a/.github/workflows/IJ-latest.yml b/.github/workflows/IJ-latest.yml new file mode 100644 index 00000000..f6cb6ef4 --- /dev/null +++ b/.github/workflows/IJ-latest.yml @@ -0,0 +1,34 @@ +# This workflow will build a Java project with Gradle +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Latest IJ + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: 'temurin' + cache: 'gradle' + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: | + LATEST-EAP-SNAPSHOT=$(./gradlew printProductsReleases | grep 'IC-' | head -n 1 | cut -d'-' -f2) + ./gradlew build --continue -PideaVersion=$LATEST-EAP-SNAPSHOT + - uses: actions/upload-artifact@v4 + if: always() + with: + name: test-reports + path: | + build/test-results/**/*.xml diff --git a/.github/workflows/IJ.yml b/.github/workflows/IJ.yml index 31aac29c..b4890314 100644 --- a/.github/workflows/IJ.yml +++ b/.github/workflows/IJ.yml @@ -15,8 +15,6 @@ jobs: strategy: matrix: include: - - IJ: IC-2020.3 - jvm: 11 - IJ: IC-2021.1 jvm: 17 - IJ: IC-2021.2 @@ -35,11 +33,13 @@ jobs: jvm: 17 - IJ: IC-2023.3 jvm: 17 + - IJ: IC-2024.1 + jvm: 17 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up JDK ${{ matrix.jvm }} - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: ${{ matrix.jvm }} distribution: 'temurin' @@ -48,26 +48,11 @@ jobs: run: chmod +x gradlew - name: Build with Gradle run: ./gradlew build -PideaVersion=${{ matrix.IJ }} - - verify: - runs-on: ubuntu-latest - - steps: - - name: Checkout Code - uses: actions/checkout@v2 - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: 17 - distribution: 'temurin' - cache: 'gradle' - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Build with Gradle - run: ./gradlew runPluginVerifier -PideaVersion=IC-2022.3 + - name: Validate with Gradle + run: ./gradlew verifyPlugin -PideaVersion=${{ matrix.IJ }} - name: Upload report - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: always() with: - name: verifier-report + name: ${{ matrix.IJ }}-verifier-report path: build/reports/pluginVerifier diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a0e9ff4..d3641551 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,40 +14,58 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - java-version: 11 - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Build with Gradle - run: ./gradlew build + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: 'temurin' + cache: 'gradle' + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew build + - uses: actions/upload-artifact@v4 + with: + name: linux-test-reports + path: build/reports build-macos: runs-on: macos-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - java-version: 11 - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Build with Gradle - run: ./gradlew build + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: 'temurin' + cache: 'gradle' + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew build + - uses: actions/upload-artifact@v4 + with: + name: macos-test-reports + path: build/reports build-windows: runs-on: windows-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - java-version: 11 - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Build with Gradle - run: ./gradlew build + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: 'temurin' + cache: 'gradle' + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew build + - uses: actions/upload-artifact@v4 + with: + name: windows-test-reports + path: build/reports \ No newline at end of file diff --git a/.github/workflows/conventionalCheck.yml b/.github/workflows/conventionalCheck.yml index 78bbb25c..6ebfb411 100644 --- a/.github/workflows/conventionalCheck.yml +++ b/.github/workflows/conventionalCheck.yml @@ -11,6 +11,6 @@ jobs: main: runs-on: ubuntu-latest steps: - - uses: amannn/action-semantic-pull-request@d2ab30dcffc66150340abb5b947d518a3c3ce9cb #v3.1.0 + - uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 #v5.5.3 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 930e76df..9c0e704b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ target build .gradle out +/.intellijPlatform/ diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 8553f2b1..00000000 --- a/build.gradle +++ /dev/null @@ -1,99 +0,0 @@ -plugins { - id "org.jetbrains.intellij" version "${intellijPluginVersion}" - id "idea" -} - -runIde { - systemProperties['com.redhat.devtools.intellij.telemetry.mode'] = 'debug' -} - -runIdeForUiTests { - systemProperties['com.redhat.devtools.intellij.telemetry.mode'] = 'debug' -} - -intellij { - version = ideaVersion //for a full list of Jetbrains IDEA releases please see https://www.jetbrains.com/intellij-repository/releases - pluginName = 'Telemetry by Red Hat' - updateSinceUntilBuild = false -} - -patchPluginXml { - sinceBuild = sinceIdeaBuild - version = projectVersion -} - -runPluginVerifier { - ideVersions = [ideaVersion] -} - -publishPlugin { - token = jetBrainsToken - channels = [jetBrainsChannel] -} - -dependencies { - implementation('com.segment.analytics.java:analytics:3.4.0') { - exclude group: 'org.jetbrains.kotlin' - exclude group: 'com.squareup.retrofit2', module: 'retrofit-mock' - exclude group: 'com.google.auto.value', module: 'auto-value-annotations' - } - implementation('com.squareup.okio:okio:3.6.0') { - exclude group: 'org.jetbrains.kotlin' - } - implementation( - 'com.google.code.gson:gson:2.10.1' - ) - testImplementation( - "org.junit.jupiter:junit-jupiter:5.9.1", - "org.junit.platform:junit-platform-launcher:1.9.1", - "org.assertj:assertj-core:3.24.2", - "org.mockito:mockito-inline:4.5.1" - ) - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine' -} - -test { - // Discover and execute all other JUnit5-based tests - useJUnitPlatform() - afterSuite { desc, result -> - if (!desc.parent) - println("${result.resultType} " + - "(${result.testCount} tests, " + - "${result.successfulTestCount} successes, " + - "${result.failedTestCount} failures, " + - "${result.skippedTestCount} skipped)") - } -} - -tasks.register('platformTests', Test) { - // Discover and execute JUnit4-based EventCountsTest - useJUnit() - description = 'Runs the platform tests.' - group = 'verification' - outputs.upToDateWhen { false } - mustRunAfter test -} - -configurations { - implementation { - exclude group: 'org.slf4j', module: 'slf4j-api' - } - compileOptions { - sourceCompatibility = 11 - targetCompatibility = 11 - } -} - -java { - withSourcesJar() -} - -repositories { - mavenCentral() - mavenLocal() - maven { url 'https://repository.jboss.org' } -} - -group 'com.redhat.devtools.intellij' -version projectVersion -//buildSearchableOptions.enabled = false diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 00000000..482ebb45 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,141 @@ +import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType +import org.jetbrains.intellij.platform.gradle.TestFrameworkType +import org.jetbrains.intellij.platform.gradle.models.ProductRelease + +plugins { + alias(libs.plugins.gradleIntelliJPlugin) // Gradle IntelliJ Plugin + id("idea") +} + +group = "com.redhat.devtools.intellij" +version = providers.gradleProperty("projectVersion").get() // Plugin version +val platformVersion = providers.gradleProperty("ideaVersion").get() +val javaVersion = 17 + +// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-tasks.html#runIdeForUiTests +val runIdeForUiTests by intellijPlatformTesting.runIde.registering { + task { + jvmArgumentProviders += CommandLineArgumentProvider { + listOf( + "-Dide.mac.message.dialogs.as.sheets=false", + "-Djb.privacy.policy.text=", + "-Djb.consents.confirmation.enabled=false", + "-Duser.language=en -Duser.country=US" + ) + } + + systemProperty("robot-server.port", System.getProperty("robot-server.port")) + systemProperties["com.redhat.devtools.intellij.telemetry.mode"] = "debug" + } + + plugins { + robotServerPlugin() + } +} + +intellijPlatform { + + pluginConfiguration { + ideaVersion { + sinceBuild = providers.gradleProperty("sinceIdeaBuild") + untilBuild = provider { null } + } + } + + publishing { + token = providers.gradleProperty("jetBrainsToken") + channels = providers.gradleProperty("jetBrainsChannel").map { listOf(it) } + } + + pluginVerification { + ides { + ide(IntelliJPlatformType.IntellijIdeaCommunity, platformVersion) + } + freeArgs = listOf( + "-mute", + "TemplateWordInPluginId,TemplateWordInPluginName" + ) + } +} + +dependencies { + intellijPlatform { + create(IntelliJPlatformType.IntellijIdeaCommunity, platformVersion) + + instrumentationTools() + + pluginVerifier() + + testFramework(TestFrameworkType.Platform) + } + implementation(libs.analytics) { + exclude(group = "org.jetbrains.kotlin") + exclude(group = "com.squareup.retrofit2", module = "retrofit-mock") + exclude(group = "com.google.auto.value", module = "auto-value-annotations") + } + implementation(libs.okio) { + exclude(group = "org.jetbrains.kotlin") + } + implementation(libs.gson) + + testImplementation(libs.junit) + testImplementation(libs.junit.jupiter) + testImplementation(libs.junit.platform.launcher) + testImplementation(libs.assertj.core) + testImplementation(libs.mockito.inline) + + testRuntimeOnly(libs.junit.jupiter.engine) +} + +val platformTests by intellijPlatformTesting.testIde.registering { + task { + // Discover and execute JUnit4-based EventCountsTest + useJUnit() + description = "Runs the platform tests." + group = "verification" + outputs.upToDateWhen { false } + shouldRunAfter(tasks["test"]) + } +} + +tasks { + wrapper { + gradleVersion = providers.gradleProperty("gradleVersion").get() + } + + runIde { + systemProperty("com.redhat.devtools.intellij.telemetry.mode", "debug") + } + + test { + useJUnitPlatform() + } + + printProductsReleases { + channels = listOf(ProductRelease.Channel.EAP) + types = listOf(IntelliJPlatformType.IntellijIdeaCommunity) + untilBuild = provider { null } + } +} + +configurations.all { + exclude(group = "org.slf4j", module = "slf4j-api") +} + +java { + toolchain { + languageVersion = JavaLanguageVersion.of(javaVersion) + } + sourceCompatibility = JavaVersion.toVersion(javaVersion) + targetCompatibility = JavaVersion.toVersion(javaVersion) + withSourcesJar() +} + +repositories { + mavenLocal() + maven { url = uri("https://repository.jboss.org") } + mavenCentral() + intellijPlatform { + defaultRepositories() + } +} diff --git a/gradle.properties b/gradle.properties index ee0f0bb9..00d600e5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,13 +1,24 @@ -ideaVersion = IC-2022.1 -# build number ranges -# https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html -sinceIdeaBuild=211 projectVersion=1.2.2-SNAPSHOT -intellijPluginVersion=1.16.1 jetBrainsToken=invalid jetBrainsChannel=stable nexusUser=invalid nexusPassword=invalid -# https://plugins.jetbrains.com/docs/intellij/using-kotlin.html#kotlin-standard-library +# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html +sinceIdeaBuild=211 + +# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension +ideaVersion=2024.2 + +# Gradle Releases -> https://github.com/gradle/gradle/releases +gradleVersion=8.5 + +# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib kotlin.stdlib.default.dependency=false + +# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html +org.gradle.configuration-cache=true + +# Enable Gradle Build Cache -> https://docs.gradle.org/current/userguide/build_cache.html +org.gradle.caching=true + diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 00000000..25a9d34a --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,27 @@ +[versions] +# libraries +junit = "4.13.2" +assertj-core = "3.22.0" +mockito-inline = "4.5.1" +junit-platform = "1.10.3" +junit-jupiter = "5.10.3" +gson = "2.10.1" +analytics = "3.4.0" +okio = "3.6.0" + +# plugins +gradleIntelliJPlugin = "2.1.0" + +[libraries] +junit = { group = "junit", name = "junit", version.ref = "junit" } +assertj-core = { group = "org.assertj", name = "assertj-core", version.ref = "assertj-core" } +mockito-inline = { group = "org.mockito", name = "mockito-inline", version.ref = "mockito-inline" } +junit-platform-launcher = { group = "org.junit.platform", name = "junit-platform-launcher", version.ref = "junit-platform" } +junit-jupiter = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junit-jupiter" } +junit-jupiter-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junit-jupiter" } +gson = { group = "com.google.code.gson", name = "gson", version.ref = "gson" } +analytics = { group = "com.segment.analytics.java", name = "analytics", version.ref = "analytics" } +okio = { group = "com.squareup.okio", name = "okio", version.ref = "okio" } + +[plugins] +gradleIntelliJPlugin = { id = "org.jetbrains.intellij.platform", version.ref = "gradleIntelliJPlugin" } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e6aba251..1af9e093 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index 3359780c..00000000 --- a/settings.gradle +++ /dev/null @@ -1,6 +0,0 @@ -pluginManagement { - plugins { - id "org.jetbrains.intellij" version "${intellijPluginVersion}" - } -} -rootProject.name = 'intellij-redhat-telemetry' diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 00000000..f1d0c913 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1 @@ +rootProject.name = "intellij-redhat-telemetry" diff --git a/src/main/java/com/redhat/devtools/intellij/telemetry/core/configuration/limits/EventCounts.java b/src/main/java/com/redhat/devtools/intellij/telemetry/core/configuration/limits/EventCounts.java index 0c50ba5f..f5e6536c 100644 --- a/src/main/java/com/redhat/devtools/intellij/telemetry/core/configuration/limits/EventCounts.java +++ b/src/main/java/com/redhat/devtools/intellij/telemetry/core/configuration/limits/EventCounts.java @@ -15,9 +15,9 @@ import com.intellij.openapi.components.Service; import com.intellij.openapi.components.State; import com.intellij.openapi.components.Storage; +import com.intellij.openapi.util.text.StringUtil; import com.intellij.util.xmlb.XmlSerializerUtil; import com.redhat.devtools.intellij.telemetry.core.service.Event; -import org.apache.commons.lang.StringUtils; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -107,7 +107,7 @@ private Count createOrUpdateCount(Event event) { } private Count toCount(String string) { - if (StringUtils.isEmpty(string)) { + if (StringUtil.isEmpty(string)) { return null; } String[] split = string.split(COUNT_VALUES_SEPARATOR); diff --git a/src/main/java/com/redhat/devtools/intellij/telemetry/core/util/BasicGlobPattern.java b/src/main/java/com/redhat/devtools/intellij/telemetry/core/util/BasicGlobPattern.java index 2e41db30..e001334f 100644 --- a/src/main/java/com/redhat/devtools/intellij/telemetry/core/util/BasicGlobPattern.java +++ b/src/main/java/com/redhat/devtools/intellij/telemetry/core/util/BasicGlobPattern.java @@ -29,7 +29,7 @@ ******************************************************************************/ package com.redhat.devtools.intellij.telemetry.core.util; -import org.apache.commons.lang.StringUtils; +import com.intellij.openapi.util.text.StringUtil; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; @@ -60,7 +60,7 @@ private BasicGlobPattern(Pattern globPattern) { } public boolean matches(String toMatch) { - if (StringUtils.isEmpty(toMatch)) { + if (StringUtil.isEmpty(toMatch)) { return false; } return globPattern.matcher(toMatch).matches(); diff --git a/src/main/java/com/redhat/devtools/intellij/telemetry/core/util/FileUtils.java b/src/main/java/com/redhat/devtools/intellij/telemetry/core/util/FileUtils.java index 13eab394..1c8eaf89 100644 --- a/src/main/java/com/redhat/devtools/intellij/telemetry/core/util/FileUtils.java +++ b/src/main/java/com/redhat/devtools/intellij/telemetry/core/util/FileUtils.java @@ -10,7 +10,7 @@ ******************************************************************************/ package com.redhat.devtools.intellij.telemetry.core.util; -import org.apache.commons.lang.StringUtils; +import com.intellij.openapi.util.text.StringUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -60,7 +60,7 @@ public static void write(String content, Path file) throws IOException { } public static boolean isFileUrl(String url) { - return !StringUtils.isEmpty(url) + return !StringUtil.isEmpty(url) && url.startsWith(FILE_URL_PREFIX); } From c04b96a58957cb9b8f6c6980552f4179c9da2d76 Mon Sep 17 00:00:00 2001 From: Stephane Bouchet Date: Tue, 22 Oct 2024 12:27:13 +0200 Subject: [PATCH 2/6] chore: Support IC-2024.2+ Signed-off-by: Stephane Bouchet --- .github/workflows/IJ.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/IJ.yml b/.github/workflows/IJ.yml index b4890314..b3ac6ab7 100644 --- a/.github/workflows/IJ.yml +++ b/.github/workflows/IJ.yml @@ -35,7 +35,8 @@ jobs: jvm: 17 - IJ: IC-2024.1 jvm: 17 - + - IJ: IC-2024.2 + jvm: 17 steps: - uses: actions/checkout@v4 - name: Set up JDK ${{ matrix.jvm }} From ee0da14f240d2fd450bc820231a9f3dd025e4d52 Mon Sep 17 00:00:00 2001 From: Stephane Bouchet Date: Tue, 22 Oct 2024 14:26:30 +0200 Subject: [PATCH 3/6] chore: Support IC-2024.2+ Signed-off-by: Stephane Bouchet --- .github/workflows/IJ.yml | 22 +++++++++++----------- .github/workflows/ci.yml | 6 +++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/IJ.yml b/.github/workflows/IJ.yml index b3ac6ab7..542383a9 100644 --- a/.github/workflows/IJ.yml +++ b/.github/workflows/IJ.yml @@ -15,27 +15,27 @@ jobs: strategy: matrix: include: - - IJ: IC-2021.1 + - IJ: 2021.1 jvm: 17 - - IJ: IC-2021.2 + - IJ: 2021.2 jvm: 17 - - IJ: IC-2021.3 + - IJ: 2021.3 jvm: 17 - - IJ: IC-2022.1 + - IJ: 2022.1 jvm: 17 - - IJ: IC-2022.2 + - IJ: 2022.2 jvm: 17 - - IJ: IC-2022.3 + - IJ: 2022.3 jvm: 17 - - IJ: IC-2023.1 + - IJ: 2023.1 jvm: 17 - - IJ: IC-2023.2 + - IJ: 2023.2 jvm: 17 - - IJ: IC-2023.3 + - IJ: 2023.3 jvm: 17 - - IJ: IC-2024.1 + - IJ: 2024.1 jvm: 17 - - IJ: IC-2024.2 + - IJ: 2024.2 jvm: 17 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d3641551..5e839e31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle - run: ./gradlew build + run: ./gradlew build --continue - uses: actions/upload-artifact@v4 with: name: linux-test-reports @@ -44,7 +44,7 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle - run: ./gradlew build + run: ./gradlew build --continue - uses: actions/upload-artifact@v4 with: name: macos-test-reports @@ -64,7 +64,7 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle - run: ./gradlew build + run: ./gradlew build --continue - uses: actions/upload-artifact@v4 with: name: windows-test-reports From 5dbf5f8df4e2d20ce33b824e9576b0b282d33fab Mon Sep 17 00:00:00 2001 From: Stephane Bouchet Date: Tue, 22 Oct 2024 14:31:17 +0200 Subject: [PATCH 4/6] chore: Support IC-2024.2+ Signed-off-by: Stephane Bouchet --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e839e31..5337667d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,8 +24,9 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle - run: ./gradlew build --continue + run: ./gradlew build - uses: actions/upload-artifact@v4 + if: always() with: name: linux-test-reports path: build/reports @@ -44,8 +45,9 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle - run: ./gradlew build --continue + run: ./gradlew build - uses: actions/upload-artifact@v4 + if: always() with: name: macos-test-reports path: build/reports @@ -64,8 +66,9 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle - run: ./gradlew build --continue + run: ./gradlew build - uses: actions/upload-artifact@v4 + if: always() with: name: windows-test-reports path: build/reports \ No newline at end of file From ff0eb3336b7984b0986bed18db4b94427761e939 Mon Sep 17 00:00:00 2001 From: Stephane Bouchet Date: Tue, 22 Oct 2024 14:42:23 +0200 Subject: [PATCH 5/6] chore: Support IC-2024.2+ Signed-off-by: Stephane Bouchet --- build.gradle.kts | 4 ++-- gradle/libs.versions.toml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 482ebb45..fbf3a6a8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -82,7 +82,7 @@ dependencies { testImplementation(libs.junit.jupiter) testImplementation(libs.junit.platform.launcher) testImplementation(libs.assertj.core) - testImplementation(libs.mockito.inline) + testImplementation(libs.mockito.core) testRuntimeOnly(libs.junit.jupiter.engine) } @@ -94,7 +94,7 @@ val platformTests by intellijPlatformTesting.testIde.registering { description = "Runs the platform tests." group = "verification" outputs.upToDateWhen { false } - shouldRunAfter(tasks["test"]) + mustRunAfter(tasks["test"]) } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 25a9d34a..7bd08d15 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,7 @@ # libraries junit = "4.13.2" assertj-core = "3.22.0" -mockito-inline = "4.5.1" +mockito-core = "5.14.2" junit-platform = "1.10.3" junit-jupiter = "5.10.3" gson = "2.10.1" @@ -15,7 +15,7 @@ gradleIntelliJPlugin = "2.1.0" [libraries] junit = { group = "junit", name = "junit", version.ref = "junit" } assertj-core = { group = "org.assertj", name = "assertj-core", version.ref = "assertj-core" } -mockito-inline = { group = "org.mockito", name = "mockito-inline", version.ref = "mockito-inline" } +mockito-core = { group = "org.mockito", name = "mockito-core", version.ref = "mockito-core" } junit-platform-launcher = { group = "org.junit.platform", name = "junit-platform-launcher", version.ref = "junit-platform" } junit-jupiter = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junit-jupiter" } junit-jupiter-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junit-jupiter" } From 4ab148a08bee12085bad437df1053c7b546a8c39 Mon Sep 17 00:00:00 2001 From: Stephane Bouchet Date: Tue, 22 Oct 2024 17:18:04 +0200 Subject: [PATCH 6/6] chore: Support IC-2024.2+ Signed-off-by: Stephane Bouchet --- .github/workflows/IJ.yml | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/.github/workflows/IJ.yml b/.github/workflows/IJ.yml index 542383a9..258f985c 100644 --- a/.github/workflows/IJ.yml +++ b/.github/workflows/IJ.yml @@ -14,35 +14,13 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - include: - - IJ: 2021.1 - jvm: 17 - - IJ: 2021.2 - jvm: 17 - - IJ: 2021.3 - jvm: 17 - - IJ: 2022.1 - jvm: 17 - - IJ: 2022.2 - jvm: 17 - - IJ: 2022.3 - jvm: 17 - - IJ: 2023.1 - jvm: 17 - - IJ: 2023.2 - jvm: 17 - - IJ: 2023.3 - jvm: 17 - - IJ: 2024.1 - jvm: 17 - - IJ: 2024.2 - jvm: 17 + IJ: [ 2022.3, 2023.1, 2023.2, 2023.3, 2024.1, 2024.2 ] steps: - uses: actions/checkout@v4 - - name: Set up JDK ${{ matrix.jvm }} + - name: Set up JDK 17 uses: actions/setup-java@v4 with: - java-version: ${{ matrix.jvm }} + java-version: 17 distribution: 'temurin' cache: 'gradle' - name: Grant execute permission for gradlew