Skip to content

Commit

Permalink
Hotfix/compatibility 2022.2 (#84)
Browse files Browse the repository at this point in the history
* Updated plugin

* Updated new version of IntelliJ.
  • Loading branch information
LFC94 authored Aug 10, 2022
1 parent 8e76307 commit 072c020
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 32 deletions.
69 changes: 41 additions & 28 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ fun properties(key: String) = project.findProperty(key).toString()

plugins {
id("java")
id("org.jetbrains.kotlin.jvm") version "1.5.31"
id("org.jetbrains.intellij") version "0.7.3"
id("org.jetbrains.changelog") version "1.1.2"
id("io.gitlab.arturbosch.detekt") version "1.16.0"
id("org.jetbrains.kotlin.jvm") version "1.7.10"
id("org.jetbrains.intellij") version "1.8.0"
id("org.jetbrains.changelog") version "1.3.1"
id("io.gitlab.arturbosch.detekt") version "1.21.0"
id("org.jlleitschuh.gradle.ktlint") version "10.2.0"
}

Expand All @@ -25,18 +25,18 @@ dependencies {
}

intellij {
pluginName = properties("pluginName")
version = properties("platformVersion")
type = properties("platformType")
downloadSources = properties("platformDownloadSources").toBoolean()
updateSinceUntilBuild = true
pluginName.set(properties("pluginName"))
version.set(properties("platformVersion"))
type.set(properties("platformType"))
downloadSources.set(properties("platformDownloadSources").toBoolean())
updateSinceUntilBuild.set(true)

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

changelog {
version = properties("pluginVersion")
groups = emptyList()
version.set(properties("pluginVersion"))
groups.set(emptyList())
}

detekt {
Expand All @@ -51,24 +51,30 @@ detekt {
}

tasks {
withType<JavaCompile> {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
}
withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
// Set the JVM compatibility versions
properties("javaVersion").let {
withType<JavaCompile> {
sourceCompatibility = it
targetCompatibility = it
}
withType<KotlinCompile> {
kotlinOptions.jvmTarget = it
}
withType<Detekt> {
jvmTarget = it
}
}

withType<Detekt> {
jvmTarget = "1.8"
wrapper {
gradleVersion = properties("gradleVersion")
}

patchPluginXml {
version(properties("pluginVersion"))
sinceBuild(properties("pluginSinceBuild"))
untilBuild(properties("pluginUntilBuild"))
version.set(properties("pluginVersion"))
sinceBuild.set(properties("pluginSinceBuild"))
untilBuild.set(properties("pluginUntilBuild"))

pluginDescription(
pluginDescription.set(
File("./README.md").readText().lines().run {
val start = "<!-- Plugin description -->"
val end = "<!-- Plugin description end -->"
Expand All @@ -80,16 +86,23 @@ tasks {
}.joinToString("\n").run { markdownToHTML(this) }
)

changeNotes(changelog.getUnreleased().toHTML())
changeNotes.set(changelog.getUnreleased().toHTML())
}

runPluginVerifier {
ideVersions(properties("pluginVerifierIdeVersions").split(',').map(String::trim).filter(String::isNotEmpty))
ideVersions.set(
properties("pluginVerifierIdeVersions").split(',').map(String::trim)
.filter(String::isNotEmpty)
)
}

publishPlugin {
dependsOn("patchChangelog")
token(System.getenv("PUBLISH_TOKEN"))
channels(properties("pluginVersion").split('-').getOrElse(1) { "default" }.split('.').first())
token.set(System.getenv("PUBLISH_TOKEN"))
channels.set(
listOf(
properties("pluginVersion").split('-').getOrElse(1) { "default" }.split('.').first()
)
)
}
}
10 changes: 6 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@
# -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html
pluginGroup=com.github.getomni.jetbrains
pluginName=Omni Theme
pluginVersion=0.1.6
pluginVersion=0.1.7
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
pluginSinceBuild=211
pluginUntilBuild=221.*
pluginUntilBuild=222.*
# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl
# See https://jb.gg/intellij-platform-builds-list for available build versions.
pluginVerifierIdeVersions=203.7148.57, 211.6693.111, 212.5457.46
pluginVerifierIdeVersions=203.7148.57, 211.6693.111, 212.5457.46, 222.3739.24
# Plugin Build Platform
platformType=IC
platformVersion=2021.1
platformVersion=2022.2
platformDownloadSources=true
platformPlugins=
javaVersion = 11
gradleVersion = 7.4
# Opt-out flag for bundling Kotlin standard library.
# See https://kotlinlang.org/docs/reference/using-gradle.html#dependency-on-the-standard-library for details.
kotlin.stdlib.default.dependency=false

0 comments on commit 072c020

Please sign in to comment.