From 8921b2a47b5ea4c4b6ae40a741346e2b92f15b28 Mon Sep 17 00:00:00 2001 From: Darwin Algarin Date: Sat, 15 Jun 2024 18:35:44 -0500 Subject: [PATCH] upgrade sdk. --- build.gradle.kts | 88 ++++++++++++++++-------- gradle.properties | 23 +++++++ gradle/wrapper/gradle-wrapper.properties | 2 +- src/main/html/change-notes.html | 3 +- 4 files changed, 85 insertions(+), 31 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index a00119f..60cae47 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,30 +1,77 @@ import com.github.gradle.node.yarn.task.YarnTask +fun properties(key: String) = providers.gradleProperty(key) +fun environment(key: String) = providers.environmentVariable(key) + plugins { id("java") id("com.github.node-gradle.node") version "5.0.0" // NodeJS support - id("org.jetbrains.kotlin.jvm") version "1.9.0" - id("org.jetbrains.intellij") version "1.17.2" + id("org.jetbrains.kotlin.jvm") version "2.0.0" + id("org.jetbrains.intellij.platform") version "2.0.0-beta7" } -group = "co.anbora.labs" -version = "1.2.3" +group = properties("pluginGroup").get() +version = properties("pluginVersion").get() + +// Set the JVM language level used to build the project. +kotlin { + jvmToolchain(17) +} +// Configure project's dependencies repositories { mavenCentral() + + // IntelliJ Platform Gradle Plugin Repositories Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-repositories-extension.html + intellijPlatform { + defaultRepositories() + } } dependencies { + // IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html + intellijPlatform { + create(properties("platformType"), properties("platformVersion")) + + // Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins. + bundledPlugins(properties("platformBundledPlugins").map { it.split(',') }) + + // Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file for plugin from JetBrains Marketplace. + plugins(properties("platformPlugins").map { it.split(',') }) + + instrumentationTools() + pluginVerifier() + // testFramework(TestFrameworkType.Platform.JUnit4) + } implementation("com.google.code.gson:gson:2.10.1") } -// Configure Gradle IntelliJ Plugin -// Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html -intellij { - version.set("LATEST-EAP-SNAPSHOT") - type.set("IC") // Target IDE Platform +// Configure IntelliJ Platform Gradle Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html +intellijPlatform { + pluginConfiguration { + version = properties("pluginVersion") + description = file("src/main/html/description.html").inputStream().readBytes().toString(Charsets.UTF_8) + changeNotes = file("src/main/html/change-notes.html").inputStream().readBytes().toString(Charsets.UTF_8) + + ideaVersion { + sinceBuild = properties("pluginSinceBuild") + untilBuild = properties("pluginUntilBuild") + } + } + + publishing { + token = environment("PUBLISH_TOKEN") + // The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3 + // Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more: + // https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel + channels = properties("pluginVersion").map { listOf(it.substringAfter('-', "").substringBefore('.').ifEmpty { "default" }) } + } - plugins.set(listOf(/* Plugin Dependencies */)) + verifyPlugin { + ides { + recommended() + } + } } // Set the Nodejs language @@ -48,10 +95,8 @@ tasks.register("cleanYarnModules") { } tasks { - // Set the JVM compatibility versions - withType { - sourceCompatibility = "17" - targetCompatibility = "17" + wrapper { + gradleVersion = properties("gradleVersion").get() } withType { @@ -63,19 +108,4 @@ tasks { exclude("notExistingFile") } } - - withType { - kotlinOptions.jvmTarget = "17" - } - - patchPluginXml { - sinceBuild.set("232") - untilBuild.set("241.*") - changeNotes.set(file("src/main/html/change-notes.html").inputStream().readBytes().toString(Charsets.UTF_8)) - pluginDescription.set(file("src/main/html/description.html").inputStream().readBytes().toString(Charsets.UTF_8)) - } - - publishPlugin { - token.set(System.getenv("PUBLISH_TOKEN")) - } } diff --git a/gradle.properties b/gradle.properties index 2bca45c..d927b73 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,26 @@ +kotlin.code.style=official kotlin.stdlib.default.dependency=false # TODO temporary workaround for Kotlin 1.8.20+ (https://jb.gg/intellij-platform-kotlin-oom) kotlin.incremental.useClasspathSnapshot=false + +pluginGroup = co.anbora.labs +pluginName = JSonCrack +# SemVer format -> https://semver.org +pluginVersion = 1.3.0 + +# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html +pluginSinceBuild = 232 +pluginUntilBuild = 242.* + +# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension +platformType = IC +platformVersion = 242.15523.18 + +# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html +# Example: platformPlugins = com.jetbrains.php:203.4449.22, org.intellij.scala:2023.3.27@EAP +platformPlugins = +# Example: platformBundledPlugins = com.intellij.java +platformBundledPlugins = + +# Gradle Releases -> https://github.com/gradle/gradle/releases +gradleVersion = 8.8 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fae0804..0d18421 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/html/change-notes.html b/src/main/html/change-notes.html index 98fe1ad..11dee39 100644 --- a/src/main/html/change-notes.html +++ b/src/main/html/change-notes.html @@ -1,10 +1,11 @@ Versions:
    -
  • All Intellij products support: 1.2.3
  • +
  • All Intellij products support: 1.3.0

Plugin updates:
    +
  • 1.3.0 (2024-06-15) - update sdk
  • 1.2.3 (2024-04-20) - fix issue with chinese characters
  • 1.2.2 (2024-01-20) - update sdk
  • 1.2.1 (2023-12-01) - update sdk