From 8d0b306897fdd35e2e05b3953e324e1adb990865 Mon Sep 17 00:00:00 2001 From: Shautvast Date: Mon, 29 Sep 2025 20:45:34 +0200 Subject: [PATCH] updated intelli platform, changed groupid/package --- build.gradle.kts | 24 ++++--------------- .../BranchNameCheckinHandler.kt | 8 ++++--- .../autoprefixcommit/APCProjectActivity.kt | 12 ---------- src/main/resources/META-INF/plugin.xml | 7 +++--- 4 files changed, 13 insertions(+), 38 deletions(-) rename src/main/kotlin/{nl/topsquad => com/github/shautvast}/autoprefixcommit/BranchNameCheckinHandler.kt (88%) delete mode 100644 src/main/kotlin/nl/topsquad/autoprefixcommit/APCProjectActivity.kt diff --git a/build.gradle.kts b/build.gradle.kts index 3175ee1..9bbdeb4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,11 +1,11 @@ plugins { id("java") - id("org.jetbrains.kotlin.jvm") version "1.9.20" - id("org.jetbrains.intellij.platform") version "2.3.0" + id("org.jetbrains.kotlin.jvm") version "2.2.0" + id("org.jetbrains.intellij.platform") version "2.9.0" } group = "com.github.shautvast" -version = "1.0" +version = "1.1" repositories { mavenCentral() @@ -14,13 +14,9 @@ repositories { } } -kotlin { - jvmToolchain(17) -} - dependencies { intellijPlatform { - create("IC", "2024.2.5") + create("IC", "2025.2.2") testFramework(org.jetbrains.intellij.platform.gradle.TestFrameworkType.Platform) bundledPlugin("Git4Idea") } @@ -31,7 +27,7 @@ dependencies { intellijPlatform { pluginConfiguration { ideaVersion { - sinceBuild = "242" + sinceBuild = "252" } changeNotes = """ @@ -40,13 +36,3 @@ intellijPlatform { } } -tasks { - // Set the JVM compatibility versions - withType { - sourceCompatibility = "21" - targetCompatibility = "21" - } - withType { - kotlinOptions.jvmTarget = "21" - } -} diff --git a/src/main/kotlin/nl/topsquad/autoprefixcommit/BranchNameCheckinHandler.kt b/src/main/kotlin/com/github/shautvast/autoprefixcommit/BranchNameCheckinHandler.kt similarity index 88% rename from src/main/kotlin/nl/topsquad/autoprefixcommit/BranchNameCheckinHandler.kt rename to src/main/kotlin/com/github/shautvast/autoprefixcommit/BranchNameCheckinHandler.kt index e8f957e..cf721fd 100644 --- a/src/main/kotlin/nl/topsquad/autoprefixcommit/BranchNameCheckinHandler.kt +++ b/src/main/kotlin/com/github/shautvast/autoprefixcommit/BranchNameCheckinHandler.kt @@ -1,10 +1,12 @@ -package nl.topsquad.autoprefixcommit +package com.github.shautvast.autoprefixcommit import com.intellij.openapi.vcs.CheckinProjectPanel import com.intellij.openapi.vcs.changes.CommitContext import com.intellij.openapi.vcs.checkin.CheckinHandler import com.intellij.openapi.vcs.checkin.CheckinHandlerFactory import git4idea.repo.GitRepositoryManager +import java.awt.event.FocusAdapter +import java.awt.event.FocusEvent /** * Handles Git branch name injection into commit messages when the commit dialog is opened @@ -14,8 +16,8 @@ class BranchNameCheckinHandlerFactory : CheckinHandlerFactory() { override fun createHandler(panel: CheckinProjectPanel, commitContext: CommitContext): CheckinHandler { return object : CheckinHandler() { init { - (panel.preferredFocusedComponent)?.addFocusListener(object : java.awt.event.FocusAdapter() { - override fun focusGained(e: java.awt.event.FocusEvent?) { + (panel.preferredFocusedComponent)?.addFocusListener(object : FocusAdapter() { + override fun focusGained(e: FocusEvent?) { // update commit message val currentMessage = panel.commitMessage val modifiedMessage = modifyCommitMessage(currentMessage) diff --git a/src/main/kotlin/nl/topsquad/autoprefixcommit/APCProjectActivity.kt b/src/main/kotlin/nl/topsquad/autoprefixcommit/APCProjectActivity.kt deleted file mode 100644 index a7d9db4..0000000 --- a/src/main/kotlin/nl/topsquad/autoprefixcommit/APCProjectActivity.kt +++ /dev/null @@ -1,12 +0,0 @@ -package nl.topsquad.autoprefixcommit - -import com.intellij.openapi.diagnostic.thisLogger -import com.intellij.openapi.project.Project -import com.intellij.openapi.startup.ProjectActivity - -class APCProjectActivity: ProjectActivity { - - override suspend fun execute(project : Project){ - thisLogger().warn("Autoprefix-commit plugin is active") - } -} \ No newline at end of file diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index b000183..949b247 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -1,9 +1,9 @@ - nl.top-squad.autoprefix-commit + com.github.shautvast.autoprefix-commit Autoprefix Commit Messages - TopSquad + my github profile Git4Idea - - +