diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5e62788..95a577a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,7 +46,7 @@ jobs: # Validate wrapper - name: Gradle Wrapper Validation - uses: gradle/wrapper-validation-action@v1.0.4 + uses: gradle/wrapper-validation-action@v1.0.5 # Setup Java 11 environment for the next steps - name: Setup Java @@ -77,7 +77,7 @@ jobs: # Run tests - name: Run Tests - run: ./gradlew test + run: ./gradlew check # Collect Tests Result of failed tests - name: Collect Tests Result @@ -87,6 +87,12 @@ jobs: name: tests-result path: ${{ github.workspace }}/build/reports/tests + # Upload Kover report to CodeCov + - name: Upload Code Coverage Report + uses: codecov/codecov-action@v3 + with: + files: ${{ github.workspace }}/build/reports/kover/xml/report.xml + # Cache Plugin Verifier IDEs - name: Setup Plugin Verifier IDEs Cache uses: actions/cache@v3 @@ -108,7 +114,7 @@ jobs: # Run Qodana inspections - name: Qodana - Code Inspection - uses: JetBrains/qodana-action@v2022.2.1 + uses: JetBrains/qodana-action@v2022.2.3 # Prepare plugin archive content for creating artifact - name: Prepare Plugin Artifact diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5a532c5..1a809dd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -77,6 +77,7 @@ jobs: run: | VERSION="${{ github.event.release.tag_name }}" BRANCH="changelog-update-$VERSION" + LABEL="release changelog" git config user.email "action@github.com" git config user.name "GitHub Action" @@ -84,9 +85,13 @@ jobs: git checkout -b $BRANCH git commit -am "Changelog update - $VERSION" git push --set-upstream origin $BRANCH + + gh label create "$LABEL" \ + --description "Pull requests with release changelog update" \ + || true gh pr create \ --title "Changelog update - \`$VERSION\`" \ --body "Current pull request contains patched \`CHANGELOG.md\` file for the \`$VERSION\` version." \ - --base main \ + --label "$LABEL" \ --head $BRANCH \ No newline at end of file diff --git a/.github/workflows/run-ui-tests.yml b/.github/workflows/run-ui-tests.yml index a307793..3b9001f 100644 --- a/.github/workflows/run-ui-tests.yml +++ b/.github/workflows/run-ui-tests.yml @@ -48,7 +48,7 @@ jobs: # Wait for IDEA to be started - name: Health Check - uses: jtalk/url-health-check-action@v2 + uses: jtalk/url-health-check-action@v3 with: url: http://127.0.0.1:8082 max-attempts: 15 diff --git a/CHANGELOG.md b/CHANGELOG.md index 591a18c..1510105 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,12 +3,15 @@ # easy-i18n Changelog ## [Unreleased] +### Changed +- Dropped support for IDE versions older than 2022.2 +- Updated dependencies ## [4.4.0] -### Added -- Support of path variables for the locales directory configuration @SIMULATAN +### Added +- Support of path variables for the locales directory configuration @SIMULATAN -### Changed +### Changed - Restructure form actions to improve user experience ## [4.3.1] diff --git a/build.gradle.kts b/build.gradle.kts index c4e2b3b..16accff 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,4 @@ +import org.jetbrains.changelog.Changelog import org.jetbrains.changelog.markdownToHTML fun properties(key: String) = project.findProperty(key).toString() @@ -6,13 +7,15 @@ plugins { // Java support id("java") // Kotlin support - id("org.jetbrains.kotlin.jvm") version "1.7.10" + id("org.jetbrains.kotlin.jvm") version "1.7.21" // Gradle IntelliJ Plugin - id("org.jetbrains.intellij") version "1.8.0" + id("org.jetbrains.intellij") version "1.10.1" // Gradle Changelog Plugin - id("org.jetbrains.changelog") version "1.3.1" + id("org.jetbrains.changelog") version "2.0.0" // Gradle Qodana Plugin id("org.jetbrains.qodana") version "0.1.13" + // Gradle Kover Plugin + id("org.jetbrains.kotlinx.kover") version "0.6.1" } group = properties("pluginGroup") @@ -27,11 +30,9 @@ dependencies { implementation("de.marhali:json5-java:2.0.0") } -// Set the JVM language level used to compile sources and generate files - Java 11 is required since 2020.3 +// Set the JVM language level used to build project. Use Java 11 for 2020.3+, and Java 17 for 2022.2+. kotlin { - jvmToolchain { - languageVersion.set(JavaLanguageVersion.of(11)) - } + jvmToolchain(17) } // Configure Gradle IntelliJ Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html @@ -46,18 +47,23 @@ intellij { // Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin changelog { - version.set(properties("pluginVersion")) groups.set(emptyList()) + repositoryUrl.set(properties("pluginRepositoryUrl")) } // Configure Gradle Qodana Plugin - read more: https://github.com/JetBrains/gradle-qodana-plugin qodana { - cachePath.set(projectDir.resolve(".qodana").canonicalPath) - reportPath.set(projectDir.resolve("build/reports/inspections").canonicalPath) + cachePath.set(file(".qodana").canonicalPath) + reportPath.set(file("build/reports/inspections").canonicalPath) saveReport.set(true) showReport.set(System.getenv("QODANA_SHOW_REPORT")?.toBoolean() ?: false) } +// Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration +kover.xmlReport { + onCheck.set(true) +} + tasks { wrapper { gradleVersion = properties("gradleVersion") @@ -70,22 +76,25 @@ tasks { // Extract the section from README.md and provide for the plugin's manifest pluginDescription.set( - projectDir.resolve("README.md").readText().lines().run { - val start = "" - val end = "" + file("README.md").readText().lines().run { + val start = "" + val end = "" - if (!containsAll(listOf(start, end))) { - throw GradleException("Plugin description section not found in README.md:\n$start ... $end") - } - subList(indexOf(start) + 1, indexOf(end)) - }.joinToString("\n").run { markdownToHTML(this) } + if (!containsAll(listOf(start, end))) { + throw GradleException("Plugin description section not found in README.md:\n$start ... $end") + } + subList(indexOf(start) + 1, indexOf(end)) + }.joinToString("\n").let { markdownToHTML(it) } ) // Get the latest available change notes from the changelog file changeNotes.set(provider { - changelog.run { - getOrNull(properties("pluginVersion")) ?: getLatest() - }.toHTML() + with(changelog) { + renderItem( + getOrNull(properties("pluginVersion")) ?: getLatest(), + Changelog.OutputType.HTML, + ) + } }) } diff --git a/gradle.properties b/gradle.properties index 935dfe8..b7e6971 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,4 @@ -# IntelliJ Platform Artifacts Repositories -# -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html +# IntelliJ Platform Artifacts Repositories -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html pluginGroup = de.marhali.easyi18n pluginName = easy-i18n @@ -8,21 +7,26 @@ pluginVersion = 4.4.0 # See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html # for insight into build numbers and IntelliJ Platform versions. -pluginSinceBuild = 203 +pluginSinceBuild = 222 pluginUntilBuild = 223.* # IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties platformType = IU -platformVersion = 2022.2 +platformVersion = 2022.3 # Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html # Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22 -platformPlugins = org.jetbrains.kotlin, JavaScriptLanguage, com.jetbrains.php:222.3345.118 +platformPlugins = org.jetbrains.kotlin, JavaScript, com.jetbrains.php:223.7571.182 # Gradle Releases -> https://github.com/gradle/gradle/releases gradleVersion = 7.5.1 -# Opt-out flag for bundling Kotlin standard library. -# See https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library for details. +# Opt-out flag for bundling Kotlin standard library -> https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library # suppress inspection "UnusedProperty" -kotlin.stdlib.default.dependency = false \ No newline at end of file +kotlin.stdlib.default.dependency = false + +# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html +org.gradle.unsafe.configuration-cache = true + +# Do we need this here? Receiving out of memory exception without +org.gradle.jvmargs=-Xmx4096m \ No newline at end of file