From 81f4eb18d2d071cc0a8d5e079944a2d6cd96a92f Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Thu, 25 Aug 2022 08:26:29 +0200 Subject: [PATCH 01/42] Dependencies - upgrade `org.jetbrains.intellij` to `1.8.1` --- CHANGELOG.md | 4 ++++ build.gradle.kts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9ef5bd..14bd2ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ # IntelliJ Platform Plugin Template Changelog ## [Unreleased] +### Changed +- Dependencies - upgrade `org.jetbrains.intellij` to `1.8.1` + +## [1.2.0] ### Added - Use JVM toolchain for configuring source/target compilation compatibility - Make sure GitHub Actions release jobs have write permissions diff --git a/build.gradle.kts b/build.gradle.kts index 49dda43..3b99b21 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ plugins { // Kotlin support id("org.jetbrains.kotlin.jvm") version "1.7.10" // Gradle IntelliJ Plugin - id("org.jetbrains.intellij") version "1.8.0" + id("org.jetbrains.intellij") version "1.8.1" // Gradle Changelog Plugin id("org.jetbrains.changelog") version "1.3.1" // Gradle Qodana Plugin From 095c2cb3787f9b77f23ac6ad4f84ad5559f77c07 Mon Sep 17 00:00:00 2001 From: KotlinIsland <65446343+KotlinIsland@users.noreply.github.com> Date: Thu, 8 Sep 2022 18:17:29 +1000 Subject: [PATCH 02/42] Fix a link in the gradle.properties (#292) Co-authored-by: kotlinisland --- CHANGELOG.md | 3 +++ gradle.properties | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14bd2ad..b87ea6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ ### Changed - Dependencies - upgrade `org.jetbrains.intellij` to `1.8.1` +### Fixed +- Update broken link in `gradle.properties` + ## [1.2.0] ### Added - Use JVM toolchain for configuring source/target compilation compatibility diff --git a/gradle.properties b/gradle.properties index e4de6a6..2d4518b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ pluginVersion = 1.2.0 pluginSinceBuild = 213 pluginUntilBuild = 222.* -# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#intellij-extension +# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension platformType = IC platformVersion = 2021.3.3 From fb31f95d067536211eb9dabd8c990bad0a15bc55 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Mon, 19 Sep 2022 11:18:36 +0200 Subject: [PATCH 03/42] GitHub Actions: introduce Template Verify workflow that verifies if the template repository is consistent with all provided content --- .github/workflows/template-cleanup.yml | 1 + .github/workflows/template-verify.yml | 40 ++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 .github/workflows/template-verify.yml diff --git a/.github/workflows/template-cleanup.yml b/.github/workflows/template-cleanup.yml index 47c414b..54f212b 100644 --- a/.github/workflows/template-cleanup.yml +++ b/.github/workflows/template-cleanup.yml @@ -59,6 +59,7 @@ jobs: .github/readme \ .github/template-cleanup \ .github/workflows/template-cleanup.yml \ + .github/workflows/template-verify.yml \ .idea/icon.png \ src/main/kotlin/org \ src/test/kotlin/org \ diff --git a/.github/workflows/template-verify.yml b/.github/workflows/template-verify.yml new file mode 100644 index 0000000..89f4b79 --- /dev/null +++ b/.github/workflows/template-verify.yml @@ -0,0 +1,40 @@ +# GitHub Actions Workflow verifies if the template repository is consistent with all provided content. + +name: Template Verify +on: + # Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g. for dependabot pull requests) + push: + branches: [main] + # Trigger the workflow on any pull request + pull_request: + +jobs: + + build: + name: Template Verify + if: github.event.repository.name == 'intellij-platform-plugin-template' + runs-on: ubuntu-latest + outputs: + version: ${{ steps.properties.outputs.version }} + changelog: ${{ steps.properties.outputs.changelog }} + steps: + + # Check out current repository + - name: Fetch Sources + uses: actions/checkout@v3 + + # Compare `gradle.properties` with `.github/template-cleanup/gradle.properties` + - name: Verify gradle.properties + run: | + echo "\`\`\`diff" >> $GITHUB_STEP_SUMMARY + + diff -U 0 \ + -I '^pluginVersion' \ + -I '^pluginGroup' \ + -I '^pluginName' \ + --label .github/template-cleanup/gradle.properties \ + --label gradle.properties \ + .github/template-cleanup/gradle.properties gradle.properties \ + >> $GITHUB_STEP_SUMMARY + + echo "\`\`\`" >> $GITHUB_STEP_SUMMARY From 93d76063c2588679b6820b227a66ac990ed315ed Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Mon, 19 Sep 2022 11:27:17 +0200 Subject: [PATCH 04/42] GitHub Actions: limit Template Verify workflow to `**/gradle.properties` --- .github/workflows/template-verify.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/template-verify.yml b/.github/workflows/template-verify.yml index 89f4b79..c35e60e 100644 --- a/.github/workflows/template-verify.yml +++ b/.github/workflows/template-verify.yml @@ -5,8 +5,10 @@ on: # Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g. for dependabot pull requests) push: branches: [main] + paths: ['**/gradle.properties'] # Trigger the workflow on any pull request pull_request: + paths: ['**/gradle.properties'] jobs: From f345bcdb330a14e4d3c6090b4a01edb65795f746 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Mon, 19 Sep 2022 11:28:03 +0200 Subject: [PATCH 05/42] Synchronize `gradle.properties` files --- .github/template-cleanup/gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/template-cleanup/gradle.properties b/.github/template-cleanup/gradle.properties index 74b981e..aa07385 100644 --- a/.github/template-cleanup/gradle.properties +++ b/.github/template-cleanup/gradle.properties @@ -9,7 +9,7 @@ pluginVersion = 0.0.1 pluginSinceBuild = 213 pluginUntilBuild = 222.* -# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#intellij-extension +# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension platformType = IC platformVersion = 2021.3.3 From ba4a3344148b5b2fe9c27696c99ade5b37a5e677 Mon Sep 17 00:00:00 2001 From: Alexandre Boyer <33391039+ng-galien@users.noreply.github.com> Date: Mon, 19 Sep 2022 12:12:57 +0200 Subject: [PATCH 06/42] Changelog PR to default branch and add label (#296) * Changelog PR to default branch and add label * CHANGELOG.md: add notes for #296 Co-authored-by: Alexandre Boyer Co-authored-by: Jakub Chrzanowski --- .github/workflows/release.yml | 7 ++++++- CHANGELOG.md | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fb8f261..715d3f1 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 diff --git a/CHANGELOG.md b/CHANGELOG.md index b87ea6d..3819c43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,24 @@ ### Fixed - Update broken link in `gradle.properties` +## [1.2.0] +### Added +- GitHub Actions - mark the pull request created with _Publish Plugin_ workflow with `release changelog` label + +### Changed +- Dependencies - upgrade `org.jetbrains.intellij` to `1.8.1` + +### Fixed +- Update broken link in `gradle.properties` +- GitHub Actions - use `$BRANCH` for creating changelog pull request + +## [1.2.0] +### Added +- GitHub Actions - mark the pull request created with _Publish Plugin_ workflow with `release changelog` label + +### Fixed +- GitHub Actions - use `$BRANCH` for creating changelog pull request + ## [1.2.0] ### Added - Use JVM toolchain for configuring source/target compilation compatibility From e60c373f553da78cb1fc6e0cab2a8df7bad89019 Mon Sep 17 00:00:00 2001 From: KotlinIsland <65446343+KotlinIsland@users.noreply.github.com> Date: Mon, 19 Sep 2022 20:21:15 +1000 Subject: [PATCH 07/42] =?UTF-8?q?(=F0=9F=8E=81)=20Use=20`file`=20instead?= =?UTF-8?q?=20of=20`projectDir.resolve`=20(#293)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Use `file` instead of `projectDir.resolve` * CHANGELOG.md update Co-authored-by: KotlinIsland Co-authored-by: Jakub Chrzanowski --- CHANGELOG.md | 8 ++++++++ build.gradle.kts | 6 +++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3819c43..995b08d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,16 @@ # IntelliJ Platform Plugin Template Changelog ## [Unreleased] +### Added +- GitHub Actions - mark the pull request created with _Publish Plugin_ workflow with `release changelog` label + ### Changed - Dependencies - upgrade `org.jetbrains.intellij` to `1.8.1` +- Use `file` instead of `projectDir.resolve` in Gradle configuration file + +### Fixed +- Update broken link in `gradle.properties` +- GitHub Actions - use `$BRANCH` for creating changelog pull request ### Fixed - Update broken link in `gradle.properties` diff --git a/build.gradle.kts b/build.gradle.kts index 3b99b21..dd510ac 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -48,8 +48,8 @@ changelog { // 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) } @@ -66,7 +66,7 @@ tasks { // Extract the section from README.md and provide for the plugin's manifest pluginDescription.set( - projectDir.resolve("README.md").readText().lines().run { + file("README.md").readText().lines().run { val start = "" val end = "" From 8fd687867d553ae28f3995f3ffc8dd65610aa5d2 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Mon, 19 Sep 2022 12:22:57 +0200 Subject: [PATCH 08/42] Dependencies - upgrade `org.jetbrains.intellij` to `1.9.0` --- CHANGELOG.md | 2 +- build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 995b08d..e4748c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ - GitHub Actions - mark the pull request created with _Publish Plugin_ workflow with `release changelog` label ### Changed -- Dependencies - upgrade `org.jetbrains.intellij` to `1.8.1` +- Dependencies - upgrade `org.jetbrains.intellij` to `1.9.0` ### Fixed - Update broken link in `gradle.properties` diff --git a/build.gradle.kts b/build.gradle.kts index dd510ac..18c9621 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ plugins { // Kotlin support id("org.jetbrains.kotlin.jvm") version "1.7.10" // Gradle IntelliJ Plugin - id("org.jetbrains.intellij") version "1.8.1" + id("org.jetbrains.intellij") version "1.9.0" // Gradle Changelog Plugin id("org.jetbrains.changelog") version "1.3.1" // Gradle Qodana Plugin From 7dfde7761f27838434803e74cc20f063a5bd5ab2 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Mon, 19 Sep 2022 13:42:48 +0200 Subject: [PATCH 09/42] template-cleanup.yml: cleanup --- .github/workflows/template-cleanup.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/template-cleanup.yml b/.github/workflows/template-cleanup.yml index 54f212b..6e246d7 100644 --- a/.github/workflows/template-cleanup.yml +++ b/.github/workflows/template-cleanup.yml @@ -5,18 +5,17 @@ name: Template Cleanup on: push: - branches: - - main + branches: [main] jobs: - # Run cleaning process only if workflow is triggered by the non-JetBrains/intellij-platform-plugin-template repository. + # Run cleaning process only if workflow is triggered by the non-"intellij-platform-plugin-template" repository. template-cleanup: name: Template Cleanup runs-on: ubuntu-latest + if: github.event.repository.name != 'intellij-platform-plugin-template' permissions: contents: write - if: github.event.repository.name != 'intellij-platform-plugin-template' steps: # Check out current repository From e8ebb74ac23aec58a02910dcfa6d0d8934a80e0c Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Mon, 19 Sep 2022 13:43:13 +0200 Subject: [PATCH 10/42] plugin.xml: Change the plugin name to pass Plugin Verifier check --- src/main/resources/META-INF/plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index d68e7ef..b5fe257 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -1,7 +1,7 @@ org.jetbrains.plugins.template - Template + IntelliJ Platform Plugin Template JetBrains com.intellij.modules.platform From b9899689ae4a694f0277553bb310fbf1cf008834 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Mon, 19 Sep 2022 22:08:26 +0200 Subject: [PATCH 11/42] Enable [Gradle Configuration Cache](https://docs.gradle.org/current/userguide/configuration_cache.html) in `gradle.proeprties` --- CHANGELOG.md | 1 + README.md | 30 ++++++++++++++++++++---------- gradle.properties | 3 +++ 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4748c2..a9f79c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ## [Unreleased] ### Added - GitHub Actions - mark the pull request created with _Publish Plugin_ workflow with `release changelog` label +- Enable [Gradle Configuration Cache](https://docs.gradle.org/current/userguide/configuration_cache.html) in `gradle.proeprties` ### Changed - Dependencies - upgrade `org.jetbrains.intellij` to `1.8.1` diff --git a/README.md b/README.md index fe1e114..7d2ac8b 100644 --- a/README.md +++ b/README.md @@ -92,17 +92,17 @@ The most significant parts of the current configuration are: - Integration with the [gradle-intellij-plugin][gh:gradle-intellij-plugin] for smoother development. - [Plugin publishing][docs:publishing] using the token. -For more details regarding Kotlin integration, please see [Kotlin for Plugin Developers][kotlin-for-plugin-developers] section in the IntelliJ Platform Plugin SDK documentation. +For more details regarding Kotlin integration, please see [Kotlin for Plugin Developers][docs:kotlin] section in the IntelliJ Platform Plugin SDK documentation. ### Gradle properties -The project-specific configuration file [gradle.properties][file:gradle.properties] contains: +The project-specific configuration file [`gradle.properties`][file:gradle.properties] contains: | Property name | Description | |---------------------------|-----------------------------------------------------------------------------------------------------------| | `pluginGroup` | Package name - after *using* the template, this will be set to `com.github.username.repo`. | | `pluginName` | Plugin name displayed in the JetBrains Marketplace and the Plugins Repository. | -| `pluginVersion` | The current version of the plugin in [SemVer](https://semver.org/) format. | +| `pluginVersion` | The current version of the plugin in [SemVer][semver] format. | | `pluginSinceBuild` | The `since-build` attribute of the `` tag. | | `pluginUntilBuild` | The `until-build` attribute of the `` tag. | | `platformType` | The type of IDE distribution. | @@ -112,6 +112,13 @@ The project-specific configuration file [gradle.properties][file:gradle.properti The properties listed define the plugin itself or configure the [gradle-intellij-plugin][gh:gradle-intellij-plugin] – check its documentation for more details. +In addition, extra behaviours are configured through the [`gradle.properties`][file:gradle.properties] file, such as: + +| Property name | Value | Description | +|-----------------------------------------|---------|-------------------------------------------------------------------------| +| `kotlin.stdlib.default.dependency` | `false` | Opt-out flag for bundling [Kotlin standard library][docs:kotlin-stdlib] | +| `org.gradle.unsafe.configuration-cache` | `true` | Enable [Gradle Configuration Cache][gradle-configuration-cache] | + ### Environment variables Some values used for the Gradle configuration shouldn't be stored in files to avoid publishing them to the Version Control System. @@ -273,13 +280,13 @@ Due to its optional nature, this workflow isn't set as an automatic one, but thi ## Qodana integration -To increase the project value, the IntelliJ Platform Plugin Template got integrated with [Qodana][docs:qodana], a code quality monitoring platform that allows you to check the condition of your implementation and find any possible problems that may require enhancing. +To increase the project value, the IntelliJ Platform Plugin Template got integrated with [Qodana][jb:qodana], a code quality monitoring platform that allows you to check the condition of your implementation and find any possible problems that may require enhancing. Qodana brings into your CI/CD pipelines all the smart features you love in the JetBrains IDEs and generates an HTML report with the actual inspection status. Qodana inspections are accessible within the project on two levels: -- using the [Qodana IntelliJ GitHub Action][docs:qodana-github-action], run automatically within the [Build](.github/workflows/build.yml) workflow, +- using the [Qodana IntelliJ GitHub Action][jb:qodana-github-action], run automatically within the [Build](.github/workflows/build.yml) workflow, - with the [Gradle Qodana Plugin][gh:gradle-qodana-plugin], so you can use it on the local environment or any CI other than GitHub Actions. Qodana inspection is configured with the `qodana { ... }` section in the Gradle build file and [`qodana.yml`][file:qodana.yml] YAML configuration file. @@ -501,14 +508,14 @@ That approach gives more possibilities for testing and debugging pre-releases, f [docs]: https://plugins.jetbrains.com/docs/intellij?from=IJPluginTemplate [docs:intro]: https://plugins.jetbrains.com/docs/intellij/intellij-platform.html?from=IJPluginTemplate [docs:kotlin-ui-dsl]: https://plugins.jetbrains.com/docs/intellij/kotlin-ui-dsl.html?from=IJPluginTemplate +[docs:kotlin]: https://plugins.jetbrains.com/docs/intellij/kotlin.html?from=IJPluginTemplate +[docs:kotlin-stdlib]: https://plugins.jetbrains.com/docs/intellij/kotlin.html?from=IJPluginTemplate#kotlin-standard-library [docs:plugin.xml]: https://plugins.jetbrains.com/docs/intellij/plugin-configuration-file.html?from=IJPluginTemplate [docs:publishing]: https://plugins.jetbrains.com/docs/intellij/publishing-plugin.html?from=IJPluginTemplate [docs:release-channel]: https://plugins.jetbrains.com/docs/intellij/deployment.html?from=IJPluginTemplate#specifying-a-release-channel [docs:using-gradle]: https://plugins.jetbrains.com/docs/intellij/gradle-build-system.html?from=IJPluginTemplate [docs:plugin-signing]: https://plugins.jetbrains.com/docs/intellij/plugin-signing.html?from=IJPluginTemplate -[docs:testing-plugins]: https://plugins.jetbrains.com/docs/intellij/testing-plugins.html -[docs:qodana]: https://www.jetbrains.com/help/qodana -[docs:qodana-github-action]: https://www.jetbrains.com/help/qodana/qodana-intellij-github-action.html +[docs:testing-plugins]: https://plugins.jetbrains.com/docs/intellij/testing-plugins.html?from=IJPluginTemplate [file:use-this-template.png]: .github/readme/use-this-template.png [file:draft-release.png]: .github/readme/draft-release.png @@ -544,6 +551,8 @@ That approach gives more possibilities for testing and debugging pre-releases, f [jb:ipe]: https://plugins.jetbrains.com/intellij-platform-explorer [jb:my-tokens]: https://plugins.jetbrains.com/author/me/tokens [jb:paid-plugins]: https://plugins.jetbrains.com/docs/marketplace/paid-plugins-marketplace.html +[jb:qodana]: https://www.jetbrains.com/help/qodana +[jb:qodana-github-action]: https://www.jetbrains.com/help/qodana/qodana-intellij-github-action.html [jb:quality-guidelines]: https://plugins.jetbrains.com/docs/marketplace/quality-guidelines.html [jb:slack]: https://plugins.jetbrains.com/slack [jb:twitter]: https://twitter.com/JBPlatform @@ -553,8 +562,9 @@ That approach gives more possibilities for testing and debugging pre-releases, f [keep-a-changelog-how]: https://keepachangelog.com/en/1.0.0/#how [github-actions-skip-ci]: https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/ [gradle]: https://gradle.org -[gradle-releases]: https://gradle.org/releases +[gradle-configuration-cache]: https://docs.gradle.org/current/userguide/configuration_cache.html [gradle-kotlin-dsl]: https://docs.gradle.org/current/userguide/kotlin_dsl.html [gradle-lifecycle-tasks]: https://docs.gradle.org/current/userguide/java_plugin.html#lifecycle_tasks -[kotlin-for-plugin-developers]: https://plugins.jetbrains.com/docs/intellij/kotlin.html#adding-kotlin-support +[gradle-releases]: https://gradle.org/releases +[semver]: https://semver.org [xpath]: https://www.w3.org/TR/xpath-21/ diff --git a/gradle.properties b/gradle.properties index 2d4518b..a6762db 100644 --- a/gradle.properties +++ b/gradle.properties @@ -23,3 +23,6 @@ gradleVersion = 7.5.1 # 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 + +# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html +org.gradle.unsafe.configuration-cache = true From 4921c83f03de29c219a863d4e99ca2953f77285b Mon Sep 17 00:00:00 2001 From: kotlinisland Date: Tue, 20 Sep 2022 20:11:24 +1000 Subject: [PATCH 12/42] =?UTF-8?q?(=F0=9F=8E=81)=20Adopt=20kotlinx-kover?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yml | 8 +++++++- build.gradle.kts | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a1a2e38..b443a60 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 + - uses: codecov/codecov-action@v3 + with: + files: ${{ github.workspace }}/build/reports/kover/xml/report.xml + fail_ci_if_error: true + # Cache Plugin Verifier IDEs - name: Setup Plugin Verifier IDEs Cache uses: actions/cache@v3 diff --git a/build.gradle.kts b/build.gradle.kts index 18c9621..49d69b0 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,6 +13,8 @@ plugins { id("org.jetbrains.changelog") version "1.3.1" // Gradle Qodana Plugin id("org.jetbrains.qodana") version "0.1.13" + // Gradle Kover Plugin + id("org.jetbrains.kotlinx.kover") version "0.6.0" } group = properties("pluginGroup") @@ -54,6 +56,11 @@ qodana { 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") From 3eeadf587891420719c445c059c673cc5d684458 Mon Sep 17 00:00:00 2001 From: Jakub Chrzanowski Date: Tue, 20 Sep 2022 14:47:00 +0200 Subject: [PATCH 13/42] README.md: Code coverage sections --- .run/Run Plugin Tests.run.xml | 2 +- README.md | 44 +++++++++++++++++++++-------------- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/.run/Run Plugin Tests.run.xml b/.run/Run Plugin Tests.run.xml index ae9ae13..132d9ad 100644 --- a/.run/Run Plugin Tests.run.xml +++ b/.run/Run Plugin Tests.run.xml @@ -11,7 +11,7 @@