updated intelli platform, changed groupid/package

This commit is contained in:
Shautvast 2025-09-29 20:45:34 +02:00
parent c91c1a7d18
commit 8d0b306897
4 changed files with 13 additions and 38 deletions

View file

@ -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<JavaCompile> {
sourceCompatibility = "21"
targetCompatibility = "21"
}
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "21"
}
}

View file

@ -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)

View file

@ -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")
}
}

View file

@ -1,9 +1,9 @@
<idea-plugin>
<id>nl.top-squad.autoprefix-commit</id>
<id>com.github.shautvast.autoprefix-commit</id>
<name>Autoprefix Commit Messages</name>
<vendor url="https://www.top-squad.nl">TopSquad</vendor>
<vendor url="https://github.com/shautvast">my github profile</vendor>
<description><![CDATA[
Automatically adds the branch name to the git commit message.
@ -14,7 +14,6 @@
<depends>Git4Idea</depends>
<extensions defaultExtensionNs="com.intellij">
<!-- <postStartupActivity implementation="nl.topsquad.autoprefixcommit.APCProjectActivity"/>-->
<checkinHandlerFactory implementation="nl.topsquad.autoprefixcommit.BranchNameCheckinHandlerFactory"/>
<checkinHandlerFactory implementation="com.github.shautvast.autoprefixcommit.BranchNameCheckinHandlerFactory"/>
</extensions>
</idea-plugin>