Skip to content

Commit

Permalink
upgrade sdk.
Browse files Browse the repository at this point in the history
  • Loading branch information
dalgarins committed Jun 15, 2024
1 parent cefe18d commit 8921b2a
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 31 deletions.
88 changes: 59 additions & 29 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -48,10 +95,8 @@ tasks.register<Delete>("cleanYarnModules") {
}

tasks {
// Set the JVM compatibility versions
withType<JavaCompile> {
sourceCompatibility = "17"
targetCompatibility = "17"
wrapper {
gradleVersion = properties("gradleVersion").get()
}

withType<ProcessResources> {
Expand All @@ -63,19 +108,4 @@ tasks {
exclude("notExistingFile")
}
}

withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
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"))
}
}
23 changes: 23 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion src/main/html/change-notes.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Versions:
<ul>
<li>All Intellij products support: 1.2.3</li>
<li>All Intellij products support: 1.3.0</li>
</ul>
<br>
Plugin updates:
<ul>
<li><b>1.3.0</b> <em>(2024-06-15)</em> - update sdk </li>
<li><b>1.2.3</b> <em>(2024-04-20)</em> - fix issue with chinese characters </li>
<li><b>1.2.2</b> <em>(2024-01-20)</em> - update sdk </li>
<li><b>1.2.1</b> <em>(2023-12-01)</em> - update sdk </li>
Expand Down

0 comments on commit 8921b2a

Please sign in to comment.