Skip to content

Commit

Permalink
fix: fix 232 & 233 compatibility issues and renamed the projects (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
Azn9 committed Dec 27, 2023
1 parent 19f0882 commit eafeac8
Show file tree
Hide file tree
Showing 80 changed files with 1,014 additions and 268 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/gradle_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ jobs:
gradle-build-module: |-
:icons
:plugin:common
:plugin:pre223
:plugin:pre231
:plugin:post231
:plugin:v212
:plugin:v223
:plugin:v231
:plugin:v232
gradle-build-configuration: |-
compileClasspath
203 changes: 0 additions & 203 deletions LICENSE

This file was deleted.

12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,14 @@ To install the zip file follow the steps from the [previous install method](#fro
See below to choose the correct version for your IDE.

### Which version to choose?
This plugin is split into three different versions to support different IDE versions.
- "-pre223" is for IDEs with a version number between `2021.2` and `2022.3` (not included)
- "-pre231" is for IDEs with a version number between `2022.3` and `2023.1` (not included)
- "-post231" is for IDEs with a version number higher or equal to `2023.1`
This plugin is split into different versions corresponding to the lowest supported version of the IDE.
- `v212` is for IDEs 2021.2.X and above
- `v223` is for IDEs 2022.3.X and above
- `v231` is for IDEs 2023.1.X and above
- `v232` is for IDEs 2023.2.X and above

Warning, you must choose the correct lowest version for your IDE!
For instance, if you are using IntelliJ IDEA 2022.2.X you **must** choose the `v212` version, not the `v223` version, even though the `v223` version is nearer to your version.

If you are unsure which version to choose, use the [JetBrains Plugin Repository](#from-the-jetbrains-plugin-repository-need-to-do-it-manually) method to install the plugin. It will automatically choose the correct version for you.

Expand Down
3 changes: 2 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import com.github.benmanes.gradle.versions.updates.gradle.GradleReleaseChannel
import com.palantir.gradle.gitversion.VersionDetails
import groovy.lang.Closure
import java.nio.file.Files
import java.util.*

plugins {
//alias(libs.plugins.kotlin.latest) apply false
Expand Down Expand Up @@ -53,7 +54,7 @@ allprojects {
}

subprojects {
group = rootProject.group.toString() + "." + project.name.toLowerCase()
group = rootProject.group.toString() + "." + project.name.lowercase(Locale.ROOT)
version = rootProject.version

val secrets: File = rootProject.file("secrets.gradle.kts")
Expand Down
45 changes: 25 additions & 20 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ junit = "5.10.0"
junit-jupiter = "5.10.0"
junixsocket = "2.8.3"
konf = "1.1.2"
kotlinx-coroutines = "1.7.3"
kotlinx-serialization = "1.3.3"
logback = "1.4.14"
okhttp3 = "4.12.0"
pngtastic = "1.7"
Expand All @@ -21,22 +23,23 @@ versions = "0.50.0"
zeroAllocationHashing = "0.16"

ide-common = "2021.2" # Lower bound for all IDE versions
ide-pre223 = "2021.2" # Uses Java 11
ide-pre231 = "2022.3.3" # Uses Java 17
ide-post231 = "2023.1.5"
ide-v212 = "2021.2" # Uses Java 11
ide-v223 = "2022.3.3" # Uses Java 17
ide-v231 = "2023.1.5" # New postLoad system
ide-v232 = "2023.2.4" # New idle listener system

intellij-common = "1.16.1"
intellij-pre223 = "1.16.1"
intellij-pre231 = "1.16.1"
intellij-post231 = "1.16.1"
intellij-v212 = "1.16.1"
intellij-v223 = "1.16.1"
intellij-v231 = "1.16.1"
intellij-v232 = "1.16.1"

kotlin-latest = "1.9.22"
kotlin-common = "1.7.0"
kotlin-pre223 = "1.7.0"
kotlin-pre231 = "1.9.22"
kotlin-post231 = "1.9.22"
kotlinx-coroutines = "1.7.3"
kotlinx-serialization = "1.3.3"
kotlin-v212 = "1.7.0"
kotlin-v223 = "1.9.22"
kotlin-v231 = "1.9.22"
kotlin-v232 = "1.9.22"

[libraries]
antlr = { group = "org.antlr", name = "antlr4", version.ref = "antlr" }
Expand Down Expand Up @@ -66,9 +69,9 @@ pngtastic = { group = "com.github.depsypher", name = "pngtastic", version.ref =
zeroAllocationHashing = { group = "net.openhft", name = "zero-allocation-hashing", version.ref = "zeroAllocationHashing" }

ide-common = { group = "com.jetbrains.intellij.idea", name = "ideaIC", version.ref = "ide-common" }
ide-pre223 = { group = "com.jetbrains.intellij.idea", name = "ideaIC", version.ref = "ide-pre223" }
ide-pre231 = { group = "com.jetbrains.intellij.idea", name = "ideaIC", version.ref = "ide-pre231" }
ide-post231 = { group = "com.jetbrains.intellij.idea", name = "ideaIC", version.ref = "ide-post231" }
ide-v212 = { group = "com.jetbrains.intellij.idea", name = "ideaIC", version.ref = "ide-v212" }
ide-v223 = { group = "com.jetbrains.intellij.idea", name = "ideaIC", version.ref = "ide-v223" }
ide-v231 = { group = "com.jetbrains.intellij.idea", name = "ideaIC", version.ref = "ide-v231" }

kotlin-bom-ide = { group = "org.jetbrains.kotlin", name = "kotlin-bom", version.ref = "kotlin-common" }
kotlin-bom-latest = { group = "org.jetbrains.kotlin", name = "kotlin-bom", version.ref = "kotlin-common" }
Expand All @@ -86,11 +89,13 @@ versions = { id = "com.github.ben-manes.versions", version.ref = "versions" }

kotlin-latest = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin-latest" }
kotlin-common = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin-common" }
kotlin-pre223 = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin-pre223" }
kotlin-pre231 = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin-pre231" }
kotlin-post231 = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin-post231" }
kotlin-v212 = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin-v212" }
kotlin-v223 = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin-v223" }
kotlin-v231 = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin-v231" }
kotlin-v232 = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin-v232" }

intellij-common = { id = "org.jetbrains.intellij", version.ref = "intellij-common" }
intellij-pre223 = { id = "org.jetbrains.intellij", version.ref = "intellij-pre223" }
intellij-pre231 = { id = "org.jetbrains.intellij", version.ref = "intellij-pre231" }
intellij-post231 = { id = "org.jetbrains.intellij", version.ref = "intellij-post231" }
intellij-v212 = { id = "org.jetbrains.intellij", version.ref = "intellij-v212" }
intellij-v223 = { id = "org.jetbrains.intellij", version.ref = "intellij-v223" }
intellij-v231 = { id = "org.jetbrains.intellij", version.ref = "intellij-v231" }
intellij-v232 = { id = "org.jetbrains.intellij", version.ref = "intellij-v232" }
32 changes: 16 additions & 16 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,27 @@
* limitations under the License.
*/

val versions = listOf("v212", "v223", "v231", "v232")

tasks {
create("buildPlugin") {
val buildPluginPre223 = project.tasks.getByPath("pre223:buildPlugin") as Zip
val buildPluginPre231 = project.tasks.getByPath("pre231:buildPlugin") as Zip
val buildPluginPost231 = project.tasks.getByPath("post231:buildPlugin") as Zip
versions.forEach { version ->
val buildPlugin = project.tasks.getByPath("$version:buildPlugin") as Zip

dependsOn(buildPluginPre223, buildPluginPre231, buildPluginPost231)
dependsOn(buildPlugin)

doLast {
copy {
from(buildPluginPre223.outputs)
into("..")
}
copy {
from(buildPluginPre231.outputs)
into("..")
}
copy {
from(buildPluginPost231.outputs)
into("..")
doLast {
copy {
from(buildPlugin.outputs)
into("..")
}
}
}
}

create("verifyPluginCompatibility") {
versions.forEach { version ->
dependsOn("$version:runPluginVerifier")
}
}
}
2 changes: 1 addition & 1 deletion plugin/common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ plugins {
// Used only to add the required dependencies
intellij {
pluginName.set(properties("pluginName").get())
version(libs.versions.ide.pre223) // Lowest supported version
version(libs.versions.ide.v212) // Lowest supported version
downloadSources(!isCI)
instrumentCode(false)
updateSinceUntilBuild(false)
Expand Down
Loading

0 comments on commit eafeac8

Please sign in to comment.