Skip to content

Commit 072c020

Browse files
authored
Hotfix/compatibility 2022.2 (#84)
* Updated plugin * Updated new version of IntelliJ.
1 parent 8e76307 commit 072c020

File tree

2 files changed

+47
-32
lines changed

2 files changed

+47
-32
lines changed

build.gradle.kts

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ fun properties(key: String) = project.findProperty(key).toString()
66

77
plugins {
88
id("java")
9-
id("org.jetbrains.kotlin.jvm") version "1.5.31"
10-
id("org.jetbrains.intellij") version "0.7.3"
11-
id("org.jetbrains.changelog") version "1.1.2"
12-
id("io.gitlab.arturbosch.detekt") version "1.16.0"
9+
id("org.jetbrains.kotlin.jvm") version "1.7.10"
10+
id("org.jetbrains.intellij") version "1.8.0"
11+
id("org.jetbrains.changelog") version "1.3.1"
12+
id("io.gitlab.arturbosch.detekt") version "1.21.0"
1313
id("org.jlleitschuh.gradle.ktlint") version "10.2.0"
1414
}
1515

@@ -25,18 +25,18 @@ dependencies {
2525
}
2626

2727
intellij {
28-
pluginName = properties("pluginName")
29-
version = properties("platformVersion")
30-
type = properties("platformType")
31-
downloadSources = properties("platformDownloadSources").toBoolean()
32-
updateSinceUntilBuild = true
28+
pluginName.set(properties("pluginName"))
29+
version.set(properties("platformVersion"))
30+
type.set(properties("platformType"))
31+
downloadSources.set(properties("platformDownloadSources").toBoolean())
32+
updateSinceUntilBuild.set(true)
3333

34-
setPlugins(*properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty).toTypedArray())
34+
plugins.set(properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty))
3535
}
3636

3737
changelog {
38-
version = properties("pluginVersion")
39-
groups = emptyList()
38+
version.set(properties("pluginVersion"))
39+
groups.set(emptyList())
4040
}
4141

4242
detekt {
@@ -51,24 +51,30 @@ detekt {
5151
}
5252

5353
tasks {
54-
withType<JavaCompile> {
55-
sourceCompatibility = "1.8"
56-
targetCompatibility = "1.8"
57-
}
58-
withType<KotlinCompile> {
59-
kotlinOptions.jvmTarget = "1.8"
54+
// Set the JVM compatibility versions
55+
properties("javaVersion").let {
56+
withType<JavaCompile> {
57+
sourceCompatibility = it
58+
targetCompatibility = it
59+
}
60+
withType<KotlinCompile> {
61+
kotlinOptions.jvmTarget = it
62+
}
63+
withType<Detekt> {
64+
jvmTarget = it
65+
}
6066
}
6167

62-
withType<Detekt> {
63-
jvmTarget = "1.8"
68+
wrapper {
69+
gradleVersion = properties("gradleVersion")
6470
}
6571

6672
patchPluginXml {
67-
version(properties("pluginVersion"))
68-
sinceBuild(properties("pluginSinceBuild"))
69-
untilBuild(properties("pluginUntilBuild"))
73+
version.set(properties("pluginVersion"))
74+
sinceBuild.set(properties("pluginSinceBuild"))
75+
untilBuild.set(properties("pluginUntilBuild"))
7076

71-
pluginDescription(
77+
pluginDescription.set(
7278
File("./README.md").readText().lines().run {
7379
val start = "<!-- Plugin description -->"
7480
val end = "<!-- Plugin description end -->"
@@ -80,16 +86,23 @@ tasks {
8086
}.joinToString("\n").run { markdownToHTML(this) }
8187
)
8288

83-
changeNotes(changelog.getUnreleased().toHTML())
89+
changeNotes.set(changelog.getUnreleased().toHTML())
8490
}
8591

8692
runPluginVerifier {
87-
ideVersions(properties("pluginVerifierIdeVersions").split(',').map(String::trim).filter(String::isNotEmpty))
93+
ideVersions.set(
94+
properties("pluginVerifierIdeVersions").split(',').map(String::trim)
95+
.filter(String::isNotEmpty)
96+
)
8897
}
8998

9099
publishPlugin {
91100
dependsOn("patchChangelog")
92-
token(System.getenv("PUBLISH_TOKEN"))
93-
channels(properties("pluginVersion").split('-').getOrElse(1) { "default" }.split('.').first())
101+
token.set(System.getenv("PUBLISH_TOKEN"))
102+
channels.set(
103+
listOf(
104+
properties("pluginVersion").split('-').getOrElse(1) { "default" }.split('.').first()
105+
)
106+
)
94107
}
95108
}

gradle.properties

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,21 @@
22
# -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html
33
pluginGroup=com.github.getomni.jetbrains
44
pluginName=Omni Theme
5-
pluginVersion=0.1.6
5+
pluginVersion=0.1.7
66
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
77
# for insight into build numbers and IntelliJ Platform versions.
88
pluginSinceBuild=211
9-
pluginUntilBuild=221.*
9+
pluginUntilBuild=222.*
1010
# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl
1111
# See https://jb.gg/intellij-platform-builds-list for available build versions.
12-
pluginVerifierIdeVersions=203.7148.57, 211.6693.111, 212.5457.46
12+
pluginVerifierIdeVersions=203.7148.57, 211.6693.111, 212.5457.46, 222.3739.24
1313
# Plugin Build Platform
1414
platformType=IC
15-
platformVersion=2021.1
15+
platformVersion=2022.2
1616
platformDownloadSources=true
1717
platformPlugins=
18+
javaVersion = 11
19+
gradleVersion = 7.4
1820
# Opt-out flag for bundling Kotlin standard library.
1921
# See https://kotlinlang.org/docs/reference/using-gradle.html#dependency-on-the-standard-library for details.
2022
kotlin.stdlib.default.dependency=false

0 commit comments

Comments
 (0)