Skip to content

Commit aa43dab

Browse files
authored
Update idea plugin (#454)
* Update plugin dependencies, gradle version and remove old targets * Remove obsolete source set * Update gradle version for tests project as well * Remove detekt because it throws way too many issues for what its worth it * Set target version to java 17 and document this requirement * Remove module check extraction * Update import to non deprecated one * Replace all usages of deprecated `type` extension function with our own * Replace all usages of deprecated `resolve` extension function with our own * Suppress unnecessary warning * Replace `toLowerCase` with `lowercase` * Convert project manager listener to startup activity * Update to ide plugin ui dsl version 2 * Suppress needless warning * Update import * Update notification * Remove unused labels * Add plugin description section again * Make extra source dir optional * Remove remaining useless additional source set * Update imports * Replace deprecated string manipulation functions * Update workflows * Indent ui * Make gradle wrapper executable
1 parent c273de5 commit aa43dab

42 files changed

Lines changed: 203 additions & 246 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/check-pr-intellij-plugin.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ jobs:
88
build-intellij-plugin:
99
strategy:
1010
matrix:
11-
ij_sdk: [ IJ213, IJ221, IJ222 ]
11+
ij_sdk: [ IJ223 ]
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Clone Godot JVM module.
1515
uses: actions/checkout@v2
1616
with:
1717
submodules: recursive
18-
- name: Set up JDK 11
18+
- name: Set up JDK 17
1919
uses: actions/setup-java@v1
2020
with:
21-
java-version: 11
21+
java-version: 17
2222
- name: Build intellij plugin
2323
uses: eskatos/gradle-command-action@v1
2424
with:

.github/workflows/deploy-intellij-plugin.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ jobs:
1010
deploy_godot_intellij_plugin:
1111
strategy:
1212
matrix:
13-
ij_sdk: [ IJ213, IJ221, IJ222 ]
13+
ij_sdk: [ IJ223 ]
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Clone Godot JVM module.
1717
uses: actions/checkout@v2
1818
with:
1919
submodules: recursive
20-
- name: Set up JDK 11
20+
- name: Set up JDK 17
2121
uses: actions/setup-java@v1
2222
with:
23-
java-version: 11
23+
java-version: 17
2424
- uses: eskatos/gradle-command-action@v1
2525
with:
2626
wrapper-directory: kt/
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

kt/buildSrc/src/main/kotlin/plugins/intellij/BuildConfig.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package plugins.intellij
33
data class BuildConfig(
44
val sdk: String,
55
val prefix: String,
6-
val extraSource: String,
76
val version: VersionRange,
87
val ideVersionsForVerifierTask: List<String>,
9-
val deps: List<String> = emptyList()
8+
val deps: List<String> = emptyList(),
9+
val extraSource: String? = null,
1010
)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,38 @@
11
# godot-kotlin-idea-plugin
22

3-
![Build](https://github.com/chippmann/godot-kotlin-idea-plugin/workflows/Build/badge.svg)
43
[![Version](https://img.shields.io/jetbrains/plugin/v/com.utopia-rise.godotjvmideaplugin.svg)](https://plugins.jetbrains.com/plugin/com.utopia-rise.godotjvmideaplugin)
54
[![Downloads](https://img.shields.io/jetbrains/plugin/d/com.utopia-rise.godotjvmideaplugin.svg)](https://plugins.jetbrains.com/plugin/com.utopia-rise.godotjvmideaplugin)
65

7-
## Template ToDo list
8-
- [x] Create a new [IntelliJ Platform Plugin Template][template] project.
9-
- [x] Verify the [pluginGroup](/gradle.properties), [plugin ID](/src/main/resources/META-INF/plugin.xml) and [sources package](/src/main/kotlin).
10-
- [ ] Review the [Legal Agreements](https://plugins.jetbrains.com/docs/marketplace/legal-agreements.html).
11-
- [ ] [Publish a plugin manually](https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/publishing_plugin.html) for the first time.
12-
- [x] Set the Plugin ID in the above README badges.
13-
- [x] Set the [Deployment Token](https://plugins.jetbrains.com/docs/marketplace/plugin-upload.html).
14-
- [ ] Click the <kbd>Watch</kbd> button on the top of the [IntelliJ Platform Plugin Template][template] to be notified about releases containing new features and fixes.
6+
7+
## Development
8+
To develop for the IDE plugin you have to use and compile the plugin with Java 17!
9+
1510

1611
## Description
1712
[comment]: <> (To keep everything working, do not remove `<!-- ... -->` sections. These are added to the plugin description through gradle during build)
1813
<!-- Plugin description -->
19-
Adds additional source code checks specific to Godot-Kotlin-Jvm.
14+
Adds additional source code checks specific to Godot-Kotlin-Jvm.
2015

2116
Features:
22-
- Adds code insight checks for registering classes, properties, functions and signals
23-
- Adds quick fixes for common registration problems
24-
- Adds code insight checks for basic `rpc` and `call` usage
25-
- Adds gutter icons and dialogs for in editor connected signals throughout the whole project (not only the currently opened scene)
26-
- Adds refactor support for scene files (when classes are moved/renamed)
27-
- Adds project wizard to create new godot kotlin jvm projects
17+
- Adds code insight checks for registering classes, properties, functions and signals
18+
- Adds quick fixes for common registration problems
19+
- Adds code insight checks for basic `rpc` and `call` usage
20+
- Adds gutter icons and dialogs for in editor connected signals throughout the whole project (not only the currently opened scene)
21+
- Adds refactor support for scene files (when classes are moved/renamed)
22+
- Adds project wizard to create new godot kotlin jvm projects
2823
<!-- Plugin description end -->
2924

3025
## Installation
3126

3227
- Using IDE built-in plugin system:
33-
28+
3429
<kbd>Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "godot-kotlin-idea-plugin"</kbd> >
3530
<kbd>Install Plugin</kbd>
36-
31+
3732
- Manually:
3833

3934
Download the [latest release](https://github.com/chippmann/godot-kotlin-idea-plugin/releases/latest) and install it manually using
4035
<kbd>Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>
4136

4237

4338
---
44-
Plugin based on the [IntelliJ Platform Plugin Template][template].
45-
46-
[template]: https://github.com/JetBrains/intellij-platform-plugin-template

kt/plugins/godot-intellij-plugin/build.gradle.kts

Lines changed: 10 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,19 @@ plugins {
88
// Kotlin support
99
id("org.jetbrains.kotlin.jvm")
1010
// gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
11-
id("org.jetbrains.intellij") version "1.7.0"
11+
id("org.jetbrains.intellij") version "1.13.2"
1212
// gradle-changelog-plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
13-
id("org.jetbrains.changelog") version "1.3.1"
14-
// detekt linter - read more: https://detekt.github.io/detekt/gradle.html
15-
id("io.gitlab.arturbosch.detekt") version "1.20.0"
13+
id("org.jetbrains.changelog") version "2.0.0"
1614
}
1715

1816
//sdk version: https://github.com/JetBrains/intellij-community/tags
1917
//kotlin plugin version: https://plugins.jetbrains.com/plugin/6954-kotlin/versions
2018
val buildMatrix: Map<String, BuildConfig> = mapOf(
21-
"IJ213" to BuildConfig(
22-
sdk = "213.6777.52",
23-
prefix = "IJ2021.3",
24-
extraSource = "IJ213",
25-
version = VersionRange("213.2", "213.*"),
26-
ideVersionsForVerifierTask = listOf("2021.3"),
27-
deps = listOf("java", "org.jetbrains.kotlin:213-1.6.21-release-334-IJ6777.52", "gradle")
28-
),
29-
"IJ221" to BuildConfig(
30-
sdk = "221.5591.52",
31-
prefix = "IJ2022.1",
32-
extraSource = "IJ221",
33-
version = VersionRange("221.3", "999.*"),
34-
ideVersionsForVerifierTask = listOf("2022.1"),
35-
deps = listOf("java", "org.jetbrains.kotlin:221-1.7.10-release-333-IJ5591.52", "gradle")
36-
),
37-
"IJ222" to BuildConfig(
38-
sdk = "222.3345.118",
39-
prefix = "IJ2022.2",
40-
extraSource = "IJ221", // hasn't changed. Thus no need to update
41-
version = VersionRange("222.2", "999.*"),
42-
ideVersionsForVerifierTask = listOf("2022.2"),
19+
"IJ223" to BuildConfig(
20+
sdk = "223.8836.41",
21+
prefix = "IJ2022.3",
22+
version = VersionRange("222.3", "999.*"),
23+
ideVersionsForVerifierTask = listOf("2022.3"),
4324
deps = listOf("java", "org.jetbrains.kotlin", "gradle") // kotlin plugin version no longer needed as it's now bundled with the IDE
4425
)
4526
)
@@ -77,7 +58,7 @@ version = if (!releaseMode) {
7758

7859
group = "com.utopia-rise"
7960

80-
val sdkVersion = project.properties["godot.plugins.intellij.version"] ?: "IJ222"
61+
val sdkVersion = project.properties["godot.plugins.intellij.version"] ?: "IJ223"
8162
val settings = checkNotNull(buildMatrix[sdkVersion])
8263

8364
// Configure gradle-intellij-plugin plugin.
@@ -95,30 +76,16 @@ intellij {
9576
kotlin {
9677
sourceSets {
9778
main {
98-
kotlin.srcDirs("src/${settings.extraSource}/kotlin")
79+
settings.extraSource?.let { extraSourceDir -> kotlin.srcDirs("src/$extraSourceDir/kotlin") }
9980
}
10081
}
10182
}
10283

10384
dependencies {
104-
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.20.0")
10585
implementation("com.utopia-rise:jvm-godot-resource-serialization:0.1.0")
10686
implementation(project(":godot-build-props"))
10787
}
10888

109-
// Configure detekt plugin.
110-
// Read more: https://detekt.github.io/detekt/kotlindsl.html
111-
detekt {
112-
config = files("$projectDir/detekt-config.yml")
113-
buildUponDefaultConfig = true
114-
115-
reports {
116-
html.enabled = false
117-
xml.enabled = false
118-
txt.enabled = false
119-
}
120-
}
121-
12289
tasks {
12390
patchPluginXml {
12491
if (isSnapshot) {
@@ -166,7 +133,7 @@ tasks {
166133
}
167134

168135
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
169-
kotlinOptions.jvmTarget = "11"
136+
kotlinOptions.jvmTarget = "17"
170137
kotlinOptions {
171138
freeCompilerArgs += "-Xjvm-default=all"
172139
}

kt/plugins/godot-intellij-plugin/src/IJ213/kotlin/godot/intellij/plugin/extension/ktExpressionExt.kt

Lines changed: 0 additions & 10 deletions
This file was deleted.

kt/plugins/godot-intellij-plugin/src/IJ213/kotlin/godot/intellij/plugin/extension/moduleExt.kt

Lines changed: 0 additions & 6 deletions
This file was deleted.

kt/plugins/godot-intellij-plugin/src/IJ213/kotlin/godot/intellij/plugin/extension/psiElementExt.kt

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)