Skip to content

Commit eb45216

Browse files
committed
some changes, major in description change to adapt jetbrains's rule
1 parent b22021a commit eb45216

File tree

4 files changed

+18
-21
lines changed

4 files changed

+18
-21
lines changed

build.gradle.kts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ dependencies {
1919
implementation("org.freemarker:freemarker:2.3.32")
2020
}
2121

22-
2322
intellij {
2423
version.set("2023.1.5")
2524

@@ -29,8 +28,8 @@ intellij {
2928
"Kotlin"
3029
)
3130

32-
pluginName = "Taboo Integration"
33-
updateSinceUntilBuild = true
31+
pluginName.set("Taboo Integration")
32+
updateSinceUntilBuild.set(true)
3433
}
3534

3635
kotlin {
@@ -49,11 +48,6 @@ tasks {
4948
relocate("okhttp3", "org.tabooproject.intellij.okhttp3")
5049
}
5150

52-
patchPluginXml {
53-
sinceBuild.set(properties("pluginSinceBuild"))
54-
untilBuild.set(properties("pluginUntilBuild"))
55-
}
56-
5751
withType<JavaCompile> {
5852
sourceCompatibility = "17"
5953
targetCompatibility = "17"

gradle.properties

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
kotlin.stdlib.default.dependency=false
2-
3-
pluginSinceBuild = 222
4-
pluginUntilBuild = 241.*
2+
pluginSinceBuild=222
53
version=1.0.1-SNAPSHOT
6-
74
kotlin.code.style=official
85
kotlin.experimental.tryK2=true
96
kapt.use.k2=true

src/main/kotlin/org/tabooproject/intellij/step/ConfigurationPropertiesStep.kt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class ConfigurationPropertiesStep(val context: WizardContext) : ModuleWizardStep
132132
}
133133

134134
override fun updateStep() {
135-
if (property.name == null){
135+
if (property.name == null) {
136136
property.name = context.projectName
137137
}
138138
}
@@ -152,11 +152,11 @@ class ConfigurationPropertiesStep(val context: WizardContext) : ModuleWizardStep
152152
*
153153
* @param text 要替换到主类名中的新文本。
154154
*/
155-
private fun autoChangeMainClass(text:String) {
156-
// 如果 mainClassTextField 未初始化则直接返回
155+
private fun autoChangeMainClass(text: String) {
156+
// 如果 mainClassTextField 未初始化, 则直接返回
157157
if (mainClassTextField == null) return
158158

159-
// 提取重复的字符串操作减少代码重复并提高性能
159+
// 提取重复的字符串操作, 减少代码重复并提高性能
160160
var baseClass = property.mainClass.substringBeforeLast(".")
161161
val currentLastPart = property.mainClass.substringAfterLast(".")
162162

@@ -168,11 +168,10 @@ class ConfigurationPropertiesStep(val context: WizardContext) : ModuleWizardStep
168168
else -> currentLastPart
169169
}
170170

171-
172171
val lastGroup = baseClass.substringAfterLast(".").let {
173-
if (it.lowercase() == property.name?.lowercase()){
172+
if (it.lowercase() == property.name?.lowercase()) {
174173
return@let text.lowercase()
175-
}else{
174+
} else {
176175
it
177176
}
178177
}
@@ -181,6 +180,5 @@ class ConfigurationPropertiesStep(val context: WizardContext) : ModuleWizardStep
181180

182181
// 更新 mainClassTextField 的文本
183182
mainClassTextField!!.text = "$baseClass.$lastGroup.$newLastPart"
184-
185183
}
186184
}

src/main/resources/META-INF/plugin.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,17 @@
55
<vendor>TabooLib</vendor>
66

77
<description><![CDATA[ plugin
8-
IntelliJ integration of TabooLib, Provides a project builder for quickly creating TabooLib projects.
8+
<a href="https://github.com/TabooLib/taboolib"TabooLib</a> is a cross-platform plugin development framework for Minecraft (Java Edition),
9+
designed to replace repetitive tasks and solve some frustrating issues.
10+
11+
This IntelliJ plugin provides a Project Builder for TabooLib, enabling quick creation of TabooLib projects,
12+
with potential future integrations of more support specifically tailored for TabooLib projects.
913
]]></description>
1014

15+
<change-notes><![CDATA[
16+
Please report issues to <a href="https://github.com/TabooLib/taboolib-intellij/issues">the issue tracker</a>!
17+
]]></change-notes>
18+
1119

1220
<depends>com.intellij.modules.platform</depends>
1321
<depends>com.intellij.modules.java</depends>

0 commit comments

Comments
 (0)