diff --git a/.github/template-cleanup/gradle.properties b/.github/template-cleanup/gradle.properties index 4fc8b265e..3c939925b 100644 --- a/.github/template-cleanup/gradle.properties +++ b/.github/template-cleanup/gradle.properties @@ -1,27 +1,7 @@ -# IntelliJ Platform Artifacts Repositories -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html +group = %GROUP% +version = 0.0.1 -pluginGroup = %GROUP% -pluginName = %NAME% pluginRepositoryUrl = https://github.com/%REPOSITORY% -# SemVer format -> https://semver.org -pluginVersion = 0.0.1 - -# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html -pluginSinceBuild = 252 - -# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension -platformVersion = 2025.2.6.1 - -# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html -# Example: platformPlugins = com.jetbrains.php:203.4449.22, org.intellij.scala:2023.3.27@EAP -platformPlugins = -# Example: platformBundledPlugins = com.intellij.java -platformBundledPlugins = -# Example: platformBundledModules = intellij.spellchecker -platformBundledModules = - -# Gradle Releases -> https://github.com/gradle/gradle/releases -gradleVersion = 9.4.1 # Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib kotlin.stdlib.default.dependency = false diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 97f0347eb..71654200e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,7 +1,6 @@ # GitHub Actions Workflow is created for testing and preparing the plugin release in the following steps: # - Validate Gradle Wrapper. # - Run 'test' and 'verifyPlugin' tasks. -# - Run Qodana inspections. # - Run the 'buildPlugin' task and prepare artifact for further tests. # - Run the 'runPluginVerifier' task. # - Create a draft release. @@ -119,51 +118,6 @@ jobs: name: tests-result path: ${{ github.workspace }}/build/reports/tests - # Upload the Kover report to CodeCov - - name: Upload Code Coverage Report - uses: codecov/codecov-action@v5 - with: - files: ${{ github.workspace }}/build/reports/kover/report.xml - token: ${{ secrets.CODECOV_TOKEN }} - - # Run Qodana inspections and provide a report - inspectCode: - name: Inspect code - needs: [ build ] - runs-on: ubuntu-latest - permissions: - contents: write - checks: write - pull-requests: write - steps: - - # Free GitHub Actions Environment Disk Space - - name: Maximize Build Space - uses: jlumbroso/free-disk-space@v1.3.1 - with: - tool-cache: false - large-packages: false - - # Check out the current repository - - name: Fetch Sources - uses: actions/checkout@v6 - with: - ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit - fetch-depth: 0 # a full history is required for pull request analysis - - # Set up the Java environment for the next steps - - name: Setup Java - uses: actions/setup-java@v5 - with: - distribution: zulu - java-version: 21 - - # Run Qodana inspections - - name: Qodana - Code Inspection - uses: JetBrains/qodana-action@v2025.1.1 - with: - cache-default-branch-only: true - # Run plugin structure verification along with IntelliJ Plugin Verifier verify: name: Verify plugin @@ -212,7 +166,7 @@ jobs: releaseDraft: name: Release draft if: github.event_name != 'pull_request' - needs: [ build, test, inspectCode, verify ] + needs: [ build, test, verify ] runs-on: ubuntu-latest permissions: contents: write @@ -242,7 +196,7 @@ jobs: run: | gh api repos/{owner}/{repo}/releases \ --jq '.[] | select(.draft == true) | .id' \ - | xargs -I '{}' gh api -X DELETE repos/{owner}/{repo}/releases/{} + | xargs -r -I '{}' gh api -X DELETE repos/{owner}/{repo}/releases/{} # Create a new release draft which is not publicly visible and requires manual acceptance - name: Create Release Draft diff --git a/.github/workflows/template-verify.yml b/.github/workflows/template-verify.yml index b0514d5c4..3485d0c86 100644 --- a/.github/workflows/template-verify.yml +++ b/.github/workflows/template-verify.yml @@ -31,9 +31,8 @@ jobs: echo "\`\`\`diff" >> $GITHUB_STEP_SUMMARY diff -U 0 \ - -I '^pluginVersion' \ - -I '^pluginGroup' \ - -I '^pluginName' \ + -I '^version' \ + -I '^group' \ -I '^pluginRepositoryUrl' \ --label .github/template-cleanup/gradle.properties \ --label gradle.properties \ diff --git a/.gitignore b/.gitignore index df6966a18..da7923a48 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,4 @@ .idea .intellijPlatform .kotlin -.qodana build diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f4285beb..fcc0b8808 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,41 @@ ## [Unreleased] +### Changed + +- Migrate IntelliJ Platform repository configuration to `settings.gradle.kts` +- Dependencies - upgrade `org.jetbrains.intellij.platform` to `2.14.0` +- Update `group` property in `gradle.properties` and remove redundant `pluginGroup` configuration from `build.gradle.kts` +- Update `version` property in `gradle.properties` and remove redundant `pluginVersion` configuration from `build.gradle.kts` +- Inline `junit` dependency version in `build.gradle.kts` and remove it from `libs.versions.toml`. +- Remove `platformVersion` property and inline its value in `build.gradle.kts` for cleaner configuration. +- Remove `libs.versions.toml` and inline plugin versions in build scripts for simpler configuration. + +### Removed + +- Remove (empty) plugin and module dependency configurations from `build.gradle.kts` and `gradle.properties`. +- Remove `opentest4j` dependency from `build.gradle.kts` and `libs.versions.toml`, redundant since IntelliJ Platform 251+ +- Remove `gradleVersion` property and wrapper configuration as Gradle Wrapper should be updated with `./gradlew wrapper --gradle-version=9.4.1 && ./gradlew wrapper` +- Remove Qodana configuration, dependencies, and related workflow steps. +- Remove Kover configuration, dependencies, and related workflow steps. +- Remove redundant Kotlin JVM toolchain configuration from `build.gradle.kts` +- Remove redundant `intellijPlatform.pluginConfiguration.ideaVersion.sinceBuild` configuration from `build.gradle.kts` +- Remove redundant `pluginSinceBuild` property from `gradle.properties` +- Remove redundant `intellijPlatform.signing` configuration from `build.gradle.kts` +- Remove redundant `intellijPlatform.publishing.token` configuration from `build.gradle.kts` +- Remove redundant `intellijPlatform.pluginVerification` configuration from `build.gradle.kts` +- Remove redundant `java` plugin declaration from `build.gradle.kts` +- Remove `pluginVersion` configuration from `build.gradle.kts`. +- Remove `pluginName` property from `gradle.properties` and `build.gradle.kts` as it is already set in the `plugin.xml` +- Remove `intellijPlatform.publishing.channels` configuration from `build.gradle.kts`. +- Remove `runIdeForUiTests` obsolete task from `build.gradle.kts`. + ## [2.4.1] - 2026-03-20 +### Fixed + +- GitHub Actions: handle empty releases list in draft cleanup step using `xargs -r` + ### Changed - Upgrade Gradle Wrapper to `9.4.1` diff --git a/build.gradle.kts b/build.gradle.kts index 447c872a7..ef8a4da0f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,50 +3,18 @@ import org.jetbrains.changelog.markdownToHTML import org.jetbrains.intellij.platform.gradle.TestFrameworkType plugins { - id("java") // Java support - alias(libs.plugins.kotlin) // Kotlin support - alias(libs.plugins.intelliJPlatform) // IntelliJ Platform Gradle Plugin - alias(libs.plugins.changelog) // Gradle Changelog Plugin - alias(libs.plugins.qodana) // Gradle Qodana Plugin - alias(libs.plugins.kover) // Gradle Kover Plugin -} - -group = providers.gradleProperty("pluginGroup").get() -version = providers.gradleProperty("pluginVersion").get() - -// Set the JVM language level used to build the project. -kotlin { - jvmToolchain(21) -} - -// Configure project's dependencies -repositories { - mavenCentral() - - // IntelliJ Platform Gradle Plugin Repositories Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-repositories-extension.html - intellijPlatform { - defaultRepositories() - } + id("org.jetbrains.kotlin.jvm") + id("org.jetbrains.intellij.platform") + id("org.jetbrains.changelog") } // Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/version_catalogs.html dependencies { - testImplementation(libs.junit) - testImplementation(libs.opentest4j) + testImplementation("junit:junit:4.13.2") // IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html intellijPlatform { - intellijIdea(providers.gradleProperty("platformVersion")) - - // Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins. - bundledPlugins(providers.gradleProperty("platformBundledPlugins").map { it.split(',') }) - - // Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file for plugin from JetBrains Marketplace. - plugins(providers.gradleProperty("platformPlugins").map { it.split(',') }) - - // Module Dependencies. Uses `platformBundledModules` property from the gradle.properties file for bundled IntelliJ Platform modules. - bundledModules(providers.gradleProperty("platformBundledModules").map { it.split(',') }) - + intellijIdea("2025.2.6.1") testFramework(TestFrameworkType.Platform) } } @@ -54,9 +22,6 @@ dependencies { // Configure IntelliJ Platform Gradle Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html intellijPlatform { pluginConfiguration { - name = providers.gradleProperty("pluginName") - version = providers.gradleProperty("pluginVersion") - // Extract the section from README.md and provide for the plugin's manifest description = providers.fileContents(layout.projectDirectory.file("README.md")).asText.map { val start = "" @@ -72,7 +37,7 @@ intellijPlatform { val changelog = project.changelog // local variable for configuration cache compatibility // Get the latest available change notes from the changelog file - changeNotes = providers.gradleProperty("pluginVersion").map { pluginVersion -> + changeNotes = version.map { pluginVersion -> with(changelog) { renderItem( (getOrNull(pluginVersion) ?: getUnreleased()) @@ -82,30 +47,6 @@ intellijPlatform { ) } } - - ideaVersion { - sinceBuild = providers.gradleProperty("pluginSinceBuild") - } - } - - signing { - certificateChain = providers.environmentVariable("CERTIFICATE_CHAIN") - privateKey = providers.environmentVariable("PRIVATE_KEY") - password = providers.environmentVariable("PRIVATE_KEY_PASSWORD") - } - - publishing { - token = providers.environmentVariable("PUBLISH_TOKEN") - // The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3 - // Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more: - // https://plugins.jetbrains.com/docs/intellij/publishing-plugin.html#specifying-a-release-channel - channels = providers.gradleProperty("pluginVersion").map { listOf(it.substringAfter('-', "").substringBefore('.').ifEmpty { "default" }) } - } - - pluginVerification { - ides { - recommended() - } } } @@ -116,44 +57,8 @@ changelog { versionPrefix = "" } -// Configure Gradle Kover Plugin - read more: https://kotlin.github.io/kotlinx-kover/gradle-plugin/#configuration-details -kover { - reports { - total { - xml { - onCheck = true - } - } - } -} - tasks { - wrapper { - gradleVersion = providers.gradleProperty("gradleVersion").get() - } - publishPlugin { dependsOn(patchChangelog) } } - -intellijPlatformTesting { - runIde { - register("runIdeForUiTests") { - task { - jvmArgumentProviders += CommandLineArgumentProvider { - listOf( - "-Drobot-server.port=8082", - "-Dide.mac.message.dialogs.as.sheets=false", - "-Djb.privacy.policy.text=", - "-Djb.consents.confirmation.enabled=false", - ) - } - } - - plugins { - robotServerPlugin() - } - } - } -} diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index f6e0f07f7..000000000 --- a/codecov.yml +++ /dev/null @@ -1,10 +0,0 @@ -coverage: - status: - project: - default: - informational: true - threshold: 0% - base: auto - patch: - default: - informational: true diff --git a/gradle.properties b/gradle.properties index f32341bf6..15903fb9f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,27 +1,7 @@ -# IntelliJ Platform Artifacts Repositories -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html +group = org.jetbrains.plugins.template +version = 2.5.0 -pluginGroup = org.jetbrains.plugins.template -pluginName = IntelliJ Platform Plugin Template pluginRepositoryUrl = https://github.com/JetBrains/intellij-platform-plugin-template -# SemVer format -> https://semver.org -pluginVersion = 2.4.1 - -# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html -pluginSinceBuild = 252 - -# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension -platformVersion = 2025.2.6.1 - -# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html -# Example: platformPlugins = com.jetbrains.php:203.4449.22, org.intellij.scala:2023.3.27@EAP -platformPlugins = -# Example: platformBundledPlugins = com.intellij.java -platformBundledPlugins = -# Example: platformBundledModules = intellij.spellchecker -platformBundledModules = - -# Gradle Releases -> https://github.com/gradle/gradle/releases -gradleVersion = 9.4.1 # Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib kotlin.stdlib.default.dependency = false diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml deleted file mode 100644 index 2d484a11e..000000000 --- a/gradle/libs.versions.toml +++ /dev/null @@ -1,22 +0,0 @@ -[versions] -# libraries -junit = "4.13.2" -opentest4j = "1.3.0" - -# plugins -changelog = "2.5.0" -intelliJPlatform = "2.13.1" -kotlin = "2.3.20" -kover = "0.9.7" -qodana = "2025.3.2" - -[libraries] -junit = { group = "junit", name = "junit", version.ref = "junit" } -opentest4j = { group = "org.opentest4j", name = "opentest4j", version.ref = "opentest4j" } - -[plugins] -changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" } -intelliJPlatform = { id = "org.jetbrains.intellij.platform", version.ref = "intelliJPlatform" } -kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } -kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" } -qodana = { id = "org.jetbrains.qodana", version.ref = "qodana" } diff --git a/qodana.yml b/qodana.yml deleted file mode 100644 index 81f13b900..000000000 --- a/qodana.yml +++ /dev/null @@ -1,12 +0,0 @@ -# Qodana configuration: -# https://www.jetbrains.com/help/qodana/qodana-yaml.html - -version: "1.0" -linter: jetbrains/qodana-jvm-community:2024.3 -projectJDK: "21" -profile: - name: qodana.recommended -exclude: - - name: All - paths: - - .qodana diff --git a/settings.gradle.kts b/settings.gradle.kts index 94a5f1efc..1301bbed8 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,5 +1,28 @@ +import org.jetbrains.intellij.platform.gradle.extensions.intellijPlatform + rootProject.name = "IntelliJ Platform Plugin Template" +pluginManagement { + plugins { + id("org.jetbrains.kotlin.jvm") version "2.1.20" + id("org.jetbrains.changelog") version "2.5.0" + } +} + plugins { id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0" + id("org.jetbrains.intellij.platform.settings") version "2.14.0" +} + +@Suppress("UnstableApiUsage") +dependencyResolutionManagement { + // Configure all projects' repositories + repositories { + mavenCentral() + + // IntelliJ Platform Gradle Plugin Repositories Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-repositories-extension.html + intellijPlatform { + defaultRepositories() + } + } }