diff --git a/.gitignore b/.gitignore index e2e5d94..bfc79a9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .idea .qodana build +.intellijPlatform \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 3ce102b..f549534 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,6 @@ import org.jetbrains.changelog.Changelog import org.jetbrains.changelog.markdownToHTML +import org.jetbrains.intellij.platform.gradle.extensions.intellijPlatform fun properties(key: String) = providers.gradleProperty(key) fun environment(key: String) = providers.environmentVariable(key) @@ -8,11 +9,9 @@ plugins { id("java") // Java support id("antlr") // ANTLR support + alias(libs.plugins.intelliJPlatform) // IntelliJ Platform Plugin alias(libs.plugins.kotlin) // Kotlin support - alias(libs.plugins.gradleIntelliJPlugin) // Gradle IntelliJ Plugin alias(libs.plugins.changelog) // Gradle Changelog Plugin - alias(libs.plugins.qodana) // Gradle Qodana Plugin - alias(libs.plugins.kover) // Gradle Kover Plugin } group = properties("pluginGroup").get() @@ -21,6 +20,9 @@ version = properties("pluginVersion").get() // Configure project's dependencies repositories { mavenCentral() + intellijPlatform { + defaultRepositories() + } } // Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog @@ -29,20 +31,30 @@ dependencies { antlr("org.antlr:antlr4:4.13.1") implementation("org.antlr:antlr4-runtime:4.13.1") + + intellijPlatform { + create(providers.gradleProperty("platformType"), properties("platformVersion")) + + instrumentationTools() + pluginVerifier() + } } kotlin { - jvmToolchain(17) + jvmToolchain(21) } -// Configure Gradle IntelliJ Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html -intellij { - pluginName = properties("pluginName") - version = properties("platformVersion") - type = properties("platformType") +intellijPlatform { + pluginConfiguration { + id = properties("pluginGroup") + name = properties("pluginName") + version = properties("pluginVersion") - // Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file. - plugins = properties("platformPlugins").map { it.split(',').map(String::trim).filter(String::isNotEmpty) } + ideaVersion { + sinceBuild = properties("pluginSinceBuild") + untilBuild = properties("pluginUntilBuild") + } + } } // Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin @@ -52,19 +64,8 @@ changelog { } configure { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 -} - -// Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration -kover { - reports { - total { - xml { - onCheck = true - } - } - } + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 } tasks { @@ -104,15 +105,6 @@ tasks { } } - // Configure UI tests plugin - // Read more: https://github.com/JetBrains/intellij-ui-test-robot - runIdeForUiTests { - systemProperty("robot-server.port", "8082") - systemProperty("ide.mac.message.dialogs.as.sheets", "false") - systemProperty("jb.privacy.policy.text", "") - systemProperty("jb.consents.confirmation.enabled", "false") - } - signPlugin { certificateChain = environment("CERTIFICATE_CHAIN") privateKey = environment("PRIVATE_KEY") @@ -125,7 +117,10 @@ tasks { // 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" }) } + channels = properties("pluginVersion").map { + listOf( + it.substringAfter('-', "").substringBefore('.').ifEmpty { "default" }) + } } } diff --git a/gradle.properties b/gradle.properties index 95e344d..8955aaf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,29 +3,43 @@ pluginGroup = com.github.kyrylr.intellijcircom pluginName = intellij-circom pluginRepositoryUrl = https://github.com/KyrylR/intellij-circom -# SemVer format -> https://semver.org pluginVersion = 0.0.1 -# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html -pluginSinceBuild = 232 -pluginUntilBuild = 244.* +# Define versions for running the IDEs, as each IDE can release at different release versions. +platformVersionIntellijIdeaCommunity=2024.3 +platformVersionIntellijIdeaUltimate=2024.3 +platformVersionRubyMine=2024.3 +platformVersionPyCharmCommunity=2024.3 +platformVersionPyCharmProfessional=2024.3 +platformVersionWebStorm=2024.3 + +# Comma-separated list of platforms to include +platformsList=IntellijIdeaCommunity,IntellijIdeaUltimate,RubyMine,PyCharmCommunity,PyCharmProfessional,WebStorm + +javaVersion=21 +javaTargetVersion=21 + +pluginSinceBuild=242 +pluginUntilBuild=243.* # IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension -platformType = IC -platformVersion = 2023.2.7 +platformType=IC +platformVersion=2024.3 # Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html # Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22 platformPlugins = # Gradle Releases -> https://github.com/gradle/gradle/releases -gradleVersion = 8.9 +gradleVersion=8.10.1 + +org.gradle.jvmargs=-Xmx4096m +kotlin.daemon.jvmargs=-Xmx4906m # Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib kotlin.stdlib.default.dependency = false # Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html -org.gradle.configuration-cache = false - -# Enable Gradle Build Cache -> https://docs.gradle.org/current/userguide/build_cache.html -org.gradle.caching = true +org.gradle.configuration-cache=false +org.gradle.caching=false +org.gradle.parallel=false diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2d24d80..8341218 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,16 +5,12 @@ antlr4IntellijAdaptor = "0.1" # plugins kotlin = "1.9.24" changelog = "2.2.0" -gradleIntelliJPlugin = "1.17.4" -qodana = "2024.1.5" -kover = "0.8.1" +intellijPlatform = "2.1.0" [libraries] antlr4IntellijAdaptor = { group = "org.antlr", name = "antlr4-intellij-adaptor", version.ref = "antlr4IntellijAdaptor" } [plugins] changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" } -gradleIntelliJPlugin = { id = "org.jetbrains.intellij", version.ref = "gradleIntelliJPlugin" } +intelliJPlatform = { id = "org.jetbrains.intellij.platform", version.ref = "intellijPlatform" } kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } -kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" } -qodana = { id = "org.jetbrains.qodana", version.ref = "qodana" } diff --git a/qodana.yml b/qodana.yml deleted file mode 100644 index cbf640f..0000000 --- a/qodana.yml +++ /dev/null @@ -1,12 +0,0 @@ -# Qodana configuration: -# https://www.jetbrains.com/help/qodana/qodana-yaml.html - -version: 1.0 -linter: jetbrains/qodana-jvm-community:latest -projectJDK: "17" -profile: - name: qodana.recommended -exclude: - - name: All - paths: - - .qodana