diff --git a/.github/actions/setup-jbr/action.yml b/.github/actions/setup-jbr/action.yml index 591d6d183..2c368984d 100644 --- a/.github/actions/setup-jbr/action.yml +++ b/.github/actions/setup-jbr/action.yml @@ -9,3 +9,4 @@ runs: distribution: 'jetbrains' java-version: 21 cache: 'gradle' + java-package: 'jdk+jcef' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d8c5b006b..96e2f21d1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - ideaVersion: [ "2024.3.6" ] + ideaVersion: [ "2024.3.6", "2025.2.1" ] steps: - uses: actions/checkout@v5 diff --git a/.gitignore b/.gitignore index 833cd8831..a526c5610 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ jps-shared/build jps-shared/out libs/ .intellijPlatform +/.kotlin diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cb26a9eb..6d0432a49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v22.0.0 (Unreleased) +### Enhancements +* [#3712](https://github.com/KronicDeth/intellij-elixir/pull/3712) - [@joshuataylor](https://github.com/joshuataylor) + * Upgrade Kotlin to 2.2.10, as it's deprecated in IntelliJ 2025.1+, various deprecations are also fixed. + * Fixed adding Erlang/Elixir SDKs in 2025.1+ IDEs. + ## v21.0.0 ### Enhancements * [#3651](https://github.com/KronicDeth/intellij-elixir/pull/3681) - [@joshuataylor](https://github.com/joshuataylor) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1b8f55f84..54ff95e1a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,7 +31,7 @@ 6. In "Import Project from Gradle" 1. Check "Use auto-import" 2. Check "Create separate module per source set" - 3. Ensure Gradle JVM is **AT LEAST** Java 1.7 / 7. (Java 1.8 / 8 is recommended.) + 3. Ensure Gradle JVM is **AT LEAST** Java 21+. Your import settings should look something like this:
![Gradle settings](/screenshots/contributing/gradle_settings.png?raw=true "Gradle settings") 4. Click Finish diff --git a/README.md b/README.md index 06a40c688..b0e5e84c7 100644 --- a/README.md +++ b/README.md @@ -233,6 +233,11 @@ Table of Contents[![Backers on Open Collective](https://opencollective.com/intel * [Time](#time) * [Visibility](#visibility) * [Call to Element](#call-to-element) + * [Experimental Features](#experimental-features) + * [~H Sigil HTML Injection](#h-sigil-html-injection-support) + * [How to enable ~H sigil HTML Injection](#how-to-enable-h-sigil-html-injection) + * [Providing feedback and reporting issues for the ~H Sigil HTML Injection Experimental Feature](#providing-feedback-and-reporting-issues-for-the-h-sigil-html-injection-experimental-feature)) + * [Removing the green background for Injected language fragments](#removing-the-green-background-for-injected-language-fragments) * [Installation](#installation) * [Stable releases](#stable-releases) * [Inside IDE using JetBrains repository](#inside-ide-using-jetbrains-repository) @@ -5761,6 +5766,79 @@ The Visibility icons indicated whether the element is usable outside its definin +## Experimental Features + +As we develop new functionality that requires additional testing and feedback, we offer an opt-in system for Experimental Features via the `Elixir Experimental Settings` page. + +You can view the currently available Experimental Features by navigating to `Languages & Frameworks` and selecting `Elixir Experimental Settings`, which is marked with the [BETA icon](https://plugins.jetbrains.com/docs/intellij/settings-guide.html#l6vycg_378). Alternatively, you can access it directly via [Settings | Languages & Frameworks | Elixir Experimental Settings](jetbrains://Idea/settings?name=Languages+%26+Frameworks--Elixir+Experimental+Settings). + +![Elixir Experimental Settings UI](/screenshots/experimental/elixir-experimental-settings-ui.png) + +### ~H Sigil HTML Injection Support + +**Experimental Feature – available from version 2024.3+ (243.21565.180) and later** + +When working with Phoenix Live View templates within the IntelliJ Elixir plugin, you'll notice that sigils such as `~H` are rendered as strings, which means that out of the box there is no HTML syntax highlighting or autocomplete when working with Phoenix Live View, which is used for writing HEEx templates inside source files. `HEEx` is a HTML-aware and component-friendly extension of Elixir Embedded language, this can make editing templates tedious. + +This Experimental Feature introduces preliminary HTML injection support within `~H` sigils, enabling HTML syntax highlighting and autocomplete. + +**Before, you would see this rendered as a string:** + +![~H shows as a string](/screenshots/experimental/h-sigil-html-before.png?raw=true "Shown as a string") + +**After enabling ~H Sigil HTML Injection:** + +![~H now shows with HTML injection](/screenshots/experimental/h-sigil-html.png?raw=true "HTML injection for autocomplete and syntax highlighting for the ~H sigil") + +> [!TIP] +> The [Phoenix LiveView Documentation on sigil_H](https://hexdocs.pm/phoenix_live_view/1.0.3/Phoenix.Component.html#sigil_H/2) is a fantastic resource for understanding how the `~H` sigil works. + +**Note:** Elixir code completion within HTML attributes is not yet supported. + +However, it does open the door, thanks to [MultihostInjector](https://plugins.jetbrains.com/docs/intellij/language-injection.html#multihostinjector), we could possibly mix HTML+Elixir, allowing autocomplete of Elixir within HTML.. if anyone is daring enough to wrangle the MultihostInjector API! + +#### IntelliLang Plugin Requirement + +This functionality has a dependency on the [IntelliLang](https://plugins.jetbrains.com/plugin/13374-intellilang) plugin, which comes bundled with both IntelliJ Community/Ultimate, and other IDEs. + +However this is marked as an optional dependency for the plugin, and does not need to be enabled if you are not using the functionality. THe code won't run, and you won't see injections. + +More information about [Language Injections](https://www.jetbrains.com/help/idea/using-language-injections.html) is available in the IntelliJ IDEA documentation. + +#### How to Enable ~H Sigil HTML Injection + +To enable support for HTML syntax highlighting and autocomplete: + +1. Open [Settings](https://www.jetbrains.com/help/idea/configure-project-settings.html). +2. Navigate to [Settings | Languages & Frameworks | Elixir Experimental Settings](jetbrains://Idea/settings?name=Languages+%26+Frameworks--Elixir+Experimental+Settings). +3. Enable the **~H Sigil HTML Injection** feature. + +![Settings | Languages & Frameworks | Elixir Experimental Settings](/screenshots/experimental/elixir-experimental-settings-ui.png?raw=true "Elixir Experimental Settings UI") + +> [!NOTE] +> This Experimental Feature is currently enabled on a **per-project** basis. We are considering adding application-level support or enabling it by default in future versions based on feedback + +#### Providing feedback and reporting issues for the ~H Sigil HTML Injection Experimental Feature + +Have feedback or encountered issues? Please share your thoughts, Exception Stacktraces on the dedicated [**\[Experimental Feature\] ~H Sigil HTML Injection #3678**](https://github.com/KronicDeth/intellij-elixir/issues/3678). + +#### Removing the Green Background for Injected Language Fragments + +By default, IntelliLang highlights injected content with a green background, which can be changed by within [Color Scheme settings](https://www.jetbrains.com/help/idea/settings-colors-and-fonts.html). + +However, note that this change will apply to **all injected language fragments**, not just `~H` sigils HTML injections. + +> We are investigating the use of [InjectionBackgroundSuppressor](https://github.com/JetBrains/intellij-community/blob/idea/243.21565.193/platform/analysis-impl/src/com/intellij/psi/impl/source/tree/injected/InjectionBackgroundSuppressor.java) to selectively disable background highlighting, but this is still a work in progress. + +If you're okay with disabling the background for all injections: + +1. Open [Settings](https://www.jetbrains.com/help/idea/configure-project-settings.html). +2. Navigate to [Settings | Editor | Color Scheme | General](jetbrains://Idea/settings?name=Editor--Color+Scheme). +3. Under the `Code` section, find `Injected Language Fragment`. +4. Uncheck **Background** or change the colour to your preference. + +![How to remove the green background for Injected languge support](/screenshots/experimental/disable-injection-green-background.png?raw=true "Color Settings") + ## Installation ### Stable releases diff --git a/build.gradle b/build.gradle index 0f44701dd..6d801039d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,15 @@ import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType import org.jetbrains.intellij.platform.gradle.TestFrameworkType +import org.jetbrains.intellij.platform.gradle.models.ProductRelease import org.jetbrains.intellij.platform.gradle.tasks.RunIdeTask +import org.jetbrains.kotlin.gradle.dsl.JvmTarget +import org.jetbrains.kotlin.gradle.dsl.KotlinVersion +import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile plugins { - id "org.jetbrains.intellij.platform" version "2.1.0" - id "org.jetbrains.kotlin.jvm" version "1.9.25" - id "de.undercouch.download" version "4.1.2" + id "org.jetbrains.intellij.platform" version "2.9.0" + id "org.jetbrains.kotlin.jvm" version "2.2.20" + id "de.undercouch.download" version "5.6.0" id 'com.adarshr.test-logger' version '4.0.0' } @@ -24,23 +28,31 @@ ext { quoterZipPath = "${cachePath}/intellij_elixir-${quoterVersion}.zip" quoterZipRootPath = "${cachePath}/intellij_elixir-${quoterVersion}" - if (project.hasProperty("isRelease") && isRelease) { + def baseVersion = providers.gradleProperty("pluginVersion").get() + + publishChannelProperty = providers.gradleProperty("publishChannel").getOrElse("canary") + if (publishChannelProperty == "default") { versionSuffix = "" - channel = "default" + } + // if versionSuffix gradle property is set, use it, it will append - to the base version + // Check if versionSuffix exists and is not empty + else if (providers.gradleProperty("versionSuffix").isPresent() && !providers.gradleProperty("versionSuffix").get().isEmpty()) { + versionSuffix = "-${providers.gradleProperty("versionSuffix").get()}" } else { def date = new Date().format("yyyyMMddHHmmss", TimeZone.getTimeZone("UTC")) versionSuffix = "-pre+$date" - channel = "canary" } - version "$pluginVersion$versionSuffix" + pluginVersion = "$baseVersion$versionSuffix" } allprojects { apply plugin: 'java' - sourceCompatibility = javaVersion - targetCompatibility = javaVersion - tasks.withType(JavaCompile) { options.encoding = 'UTF-8' } + java { + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 + } + tasks.withType(JavaCompile).tap { configureEach { options.encoding = 'UTF-8' } } } subprojects { apply plugin: 'org.jetbrains.intellij.platform.module' @@ -58,7 +70,7 @@ subprojects { create(providers.gradleProperty("platformType"), providers.gradleProperty("platformVersion")) bundledPlugins providers.gradleProperty("platformBundledPlugins").map { it.split(',').toList() } - plugins providers.gradleProperty("platformPlugins").map { it.split(',').toList() } + bundledModules providers.gradleProperty("platformBundledModules").map { it.split(',').toList() } instrumentationTools() pluginVerifier() @@ -76,8 +88,8 @@ subprojects { java.srcDir 'tests' } } - } + sourceSets { main { java.srcDirs 'src', 'gen' @@ -88,14 +100,18 @@ sourceSets { } } intellijPlatform { + // don't buildSearchableOptions/instrumentCode if publishChannel is canary. + if (publishChannelProperty == "canary") { + buildSearchableOptions = false + instrumentCode = false + } pluginConfiguration { def stripTag = { text, tag -> text.replace("<${tag}>", "").replace("", "") } - def bodyInnerHTML = { path -> - stripTag(stripTag(file(path).text, "html"), "body") - } + def bodyInnerHTML = { path -> stripTag(stripTag(file(path).text, "html"), "body") } id = providers.gradleProperty("pluginGroup") name = providers.gradleProperty("pluginName") + version = pluginVersion changeNotes.set(bodyInnerHTML("resources/META-INF/changelog.html")) description.set(bodyInnerHTML("resources/META-INF/description.html")) @@ -112,12 +128,26 @@ intellijPlatform { } } + signPlugin { + certificateChain = providers.environmentVariable("IJ_CERTIFICATE_CHAIN") + privateKey = providers.environmentVariable("IJ_PRIVATE_KEY") + password = providers.environmentVariable("IJ_PRIVATE_KEY_PASSWORD") + } + + + buildPlugin { + // if -PpluginName exists, use it, or fallback to intellij-elixir. Not sure how to override otherwise. + archiveBaseName = providers.gradleProperty("pluginDistributionName").getOrElse("intellij-elixir") + } + + publishing { + channels = [publishChannelProperty] + } + publishPlugin { token = provider { System.getenv("JET_BRAINS_MARKETPLACE_TOKEN") } - channels = publishChannels.split(',').toList() - // Use the path from the -PdistributionFile property if it exists, // otherwise fall back to the old environment variable method. if (project.hasProperty("distributionFile")) { @@ -128,15 +158,28 @@ intellijPlatform { } pluginVerification { ides { - ide(IntelliJPlatformType.IntellijIdeaCommunity, "243.12818.47") + // since 253.* (2025.3+), IntelliJ IDEA Community and Ultimate have been merged into IntelliJ IDEA + select { + it.types = [IntelliJPlatformType.IntellijIdeaCommunity] + it.untilBuild = '252.*' + } + select { + it.types = [IntelliJPlatformType.IntellijIdeaUltimate] + it.sinceBuild = '253' + } + ide(IntelliJPlatformType.IntellijIdeaCommunity, "2024.2.6") + ide(IntelliJPlatformType.IntellijIdeaCommunity, "2024.3.6") + ide(IntelliJPlatformType.IntellijIdeaCommunity, "2025.2.2") } } + } apply plugin: "kotlin" -tasks.withType(RunIdeTask) { +// Configure all RunIdeTask instances (including the new platform-specific ones) +tasks.withType(RunIdeTask).configureEach { // Set JVM arguments - jvmArguments.addAll(["-Didea.debug.mode=true", "-Didea.is.internal=true", "-Dlog4j2.debug=true", "-Dlogger.org=TRACE", "-XX:+AllowEnhancedClassRedefinition"]) + jvmArguments.addAll(["-Didea.debug.mode=true", "-Didea.is.internal=true", "-Dlog4j2.debug=true", "-Dlogger.org=TRACE", "-XX:+AllowEnhancedClassRedefinition", "-XXHotswapAgent=fatjar"]) // Set system properties to debug log systemProperty "idea.log.debug.categories", "org.elixir_lang" @@ -148,19 +191,26 @@ tasks.withType(RunIdeTask) { if (project.hasProperty("runIdeWorkingDirectory") && !project.property("runIdeWorkingDirectory").isEmpty()) { workingDir = file(project.property("runIdeWorkingDirectory")) } + + def compatiblePluginsList = providers.gradleProperty("runIdeCompatiblePlugins").get().with { it.isEmpty() ? [] : it.split(",") } + if (compatiblePluginsList.size() > 0) { + dependencies { + intellijPlatform { + compatiblePlugins(compatiblePluginsList) + } + } + } } kotlin { jvmToolchain(21) } -//noinspection GroovyAssignabilityCheck,GrUnresolvedAccess -tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { - //noinspection GrUnresolvedAccess - kotlinOptions { - apiVersion = "1.7" - jvmTarget = "21" - freeCompilerArgs = ["-Xjvm-default=all"] +tasks.withType(KotlinJvmCompile).configureEach { + compilerOptions { + jvmTarget.set(JvmTarget.JVM_21) + freeCompilerArgs.add("-Xjvm-default=all") + apiVersion.set(KotlinVersion.KOTLIN_2_2) } } @@ -182,50 +232,30 @@ test { } } +// Get the list of platforms from gradle.properties +def runIdePlatformsList = providers.gradleProperty("runIdePlatforms").get().split(",") + intellijPlatformTesting { - // Get the list of platforms from gradle.properties - def platformsList = providers.gradleProperty("platformsList").get().split(",") - - // Use providers.gradleProperty to get the 'runIdePlugins' property - def runIdePluginsProperty = providers.gradleProperty("runIdePlugins").getOrElse("") - def runIdePluginsList = runIdePluginsProperty.split(",") - - platformsList.each { platform -> - runIde.create("run${platform}") { - type = IntelliJPlatformType."${platform}" - version = providers.gradleProperty("platformVersion${platform}").get() - prepareSandboxTask { - sandboxDirectory = project.layout.buildDirectory.dir("${platform.toLowerCase()}-sandbox") - } + runIde { + runIdePlatformsList.each { platform -> + "run${platform}" { + type = IntelliJPlatformType."${platform}" + version = providers.gradleProperty("platformVersion${platform}").get() - // if runIdePluginsList is not empty, set the plugins - if (runIdePluginsList.size() > 0) { - plugins { - // Apply each plugin from the 'runIdePluginsList' - runIdePluginsList.each { plugin -> - plugins(plugin.trim()) - } + prepareSandboxTask { + sandboxDirectory = project.layout.buildDirectory.dir("${platform.toLowerCase()}-sandbox") } } - } - // if enableEAPIDEs is true, create an EAP instance - if (providers.gradleProperty("enableEAPIDEs").get().toLowerCase() == "true") { - runIde.create("run${platform}EAP") { - type = IntelliJPlatformType."${platform}" - version = providers.gradleProperty("platformVersion${platform}EAP").get() - prepareSandboxTask { - sandboxDirectory = project.layout.buildDirectory.dir("${platform.toLowerCase()}_eap-sandbox") - } - useInstaller = false - - // if runIdePluginsList is not empty, set the plugins - if (runIdePluginsList.size() > 0) { - plugins { - // Apply each plugin from the 'runIdePluginsList' - runIdePluginsList.each { plugin -> - plugins(plugin.trim()) - } + // if enableEAPIDEs is true, create an EAP instance + if (providers.gradleProperty("enableEAPIDEs").get().toLowerCase() == "true") { + "run${platform}EAP" { + type = IntelliJPlatformType."${platform}" + version = providers.gradleProperty("platformVersion${platform}EAP").get() + useInstaller = false + + prepareSandboxTask { + sandboxDirectory = project.layout.buildDirectory.dir("${platform.toLowerCase()}_eap-sandbox") } } } @@ -243,7 +273,7 @@ task testCompilation(type: Test, group: 'Verification', dependsOn: [classes, tes } repositories { - maven { url 'https://maven-central.storage.googleapis.com' } + maven { url = 'https://maven-central.storage.googleapis.com' } mavenCentral() intellijPlatform { defaultRepositories() @@ -254,9 +284,8 @@ dependencies { intellijPlatform { create(providers.gradleProperty("platformType"), providers.gradleProperty("platformVersion")) - bundledPlugins providers.gradleProperty("platformBundledPlugins").map { it.split(',').toList() } - plugins providers.gradleProperty("platformPlugins").map { it.split(',').toList() } - + bundledPlugins(providers.gradleProperty("platformBundledPlugins").map { it.split(',').toList() }) + bundledModules(providers.gradleProperty("platformBundledModules").map { it.split(',').toList() }) instrumentationTools() pluginVerifier() zipSigner() @@ -267,13 +296,13 @@ dependencies { implementation project(':jps-builder') implementation project(':jps-shared') implementation files('lib/OtpErlang.jar') - implementation group: 'commons-io', name: 'commons-io', version: '2.5' + implementation group: 'commons-io', name: 'commons-io', version: '2.20.0' testImplementation 'junit:junit:4.13.2' testImplementation "org.opentest4j:opentest4j:1.3.0" - testImplementation group: 'org.mockito', name: 'mockito-core', version: '2.2.9' - testImplementation group: 'org.objenesis', name: 'objenesis', version: '2.4' + testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.19.0' + testImplementation group: 'org.objenesis', name: 'objenesis', version: '3.4' } compileJava { dependsOn ':jps-shared:composedJar' @@ -291,12 +320,12 @@ idea { } } -task getElixir { +tasks.register('getElixir') { doLast { - def folder = new File(elixirPath) + def folder = new File(elixirPath as String) if (!folder.isDirectory() || folder.list().size() == 0) { - download { + download.run { src "https://github.com/elixir-lang/elixir/archive/v${elixirVersion}.zip" dest "${rootDir}/cache/Elixir.${elixirVersion}.zip" overwrite false @@ -320,7 +349,7 @@ task getElixir { task getQuoter { doLast { - download { + download.run { src "https://github.com/KronicDeth/intellij_elixir/archive/v${quoterVersion}.zip" dest quoterZipPath overwrite false @@ -390,7 +419,7 @@ task stopQuoter(type: Exec, dependsOn: releaseQuoter) { } runIde { - systemProperty "idea.log.debug.categories", "org.elixir_lang=TRACE" + systemProperty "idea.log.debug.categories", "org.elixir_lang" // When wanting to disable EDT slow assertion.. // systemProperty "ide.slow.operations.assertion", "true" @@ -408,6 +437,7 @@ runIde { //This disables the throwing of ProcessCanceledException, which is typically used to cancel long-running processes in IntelliJ IDEA. Disabling it can be useful in certain debugging scenarios. jvmArgs "-Didea.debug.mode=true", "-XX:+AllowEnhancedClassRedefinition", "-Didea.is.internal=true", "-Dlog4j2.debug=true", "-Dlogger.org=TRACE", "-Didea.ProcessCanceledException=disabled" maxHeapSize = "7g" + autoReload = false // get from runIdeWorkingDirectory if (project.hasProperty("runIdeWorkingDirectory") && !project.property("runIdeWorkingDirectory").isEmpty()) { workingDir = file(project.property("runIdeWorkingDirectory")) @@ -429,3 +459,32 @@ idea { generatedSourceDirs += file('gen') } } + +tasks { + printProductsReleases { + channels = [ProductRelease.Channel.EAP] + // From gradle.properties. + types = [ + IntelliJPlatformType.IntellijIdeaCommunity, + IntelliJPlatformType.IntellijIdeaUltimate, + IntelliJPlatformType.PhpStorm, + IntelliJPlatformType.PyCharmCommunity, + IntelliJPlatformType.PyCharmProfessional, + IntelliJPlatformType.WebStorm, + IntelliJPlatformType.RubyMine + ] + untilBuild = null + + doLast { + def latestEap = productsReleases.get().max() + } + } +} + +// Uncomment to allow using build-scan. +//if (hasProperty('buildScan')) { +// buildScan { +// termsOfServiceUrl = 'https://gradle.com/terms-of-service' +// termsOfServiceAgree = 'yes' +// } +//} diff --git a/gradle.properties b/gradle.properties index a4282d658..5b2c30756 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,61 +2,75 @@ pluginGroup=org.elixir_lang pluginName=Elixir pluginRepositoryUrl=https://github.com/KronicDeth/intellij-elixir/ -pluginVersion=21.0.0 +pluginVersion=22.0.0 vendorName=Elle Imhoff vendorEmail=Kronic.Deth@gmail.com # https://youtrack.jetbrains.com/articles/IDEA-A-2100661899/IntelliJ-IDEA-2024.1-241.14494.240-build-Release-Notes -pluginSinceBuild=243.21565.180 +pluginSinceBuild=253.22441.1 pluginUntilBuild= +#pluginVerificationIDEAVersions="251.26927.53" +#pluginVerificationRubyMineVersions="251.26927.47" # Set this to open runIdeWorkingDirectory= # Define versions for running the IDEs, as each IDE can release at different release versions. -platformVersionIntellijIdeaCommunity=2024.3.2.2 -platformVersionIntellijIdeaUltimate=2024.3.2.2 -platformVersionRubyMine=2024.3 -platformVersionPyCharmCommunity=2024.3 -platformVersionPyCharmProfessional=2024.3 -platformVersionWebStorm=2024.3 +platformVersionIntellijIdeaCommunity=2025.2.1 +platformVersionIntellijIdeaUltimate=2025.2.1 +platformVersionRubyMine=2025.2.1 +platformVersionPyCharmCommunity=2025.2.1.1 +platformVersionPyCharmProfessional=2025.2.1.1 +platformVersionWebStorm=2025.2.1 enableEAPIDEs=true -platformVersionIntellijIdeaCommunityEAP=251-EAP-SNAPSHOT -platformVersionIntellijIdeaUltimateEAP=251-EAP-SNAPSHOT -platformVersionPyCharmCommunityEAP=251-EAP-SNAPSHOT -platformVersionPyCharmProfessionalEAP=251-EAP-SNAPSHOT -platformVersionRubyMineEAP=251-EAP-SNAPSHOT -platformVersionWebStormEAP=251-EAP-SNAPSHOT +platformVersionIntellijIdeaCommunityEAP=253-EAP-SNAPSHOT +platformVersionIntellijIdeaUltimateEAP=253-EAP-SNAPSHOT +platformVersionPyCharmCommunityEAP=253-EAP-SNAPSHOT +platformVersionPyCharmProfessionalEAP=253-EAP-SNAPSHOT +platformVersionRubyMineEAP=253-EAP-SNAPSHOT +platformVersionWebStormEAP=253-EAP-SNAPSHOT # Comma-separated list of platforms to include -platformsList=IntellijIdeaCommunity,IntellijIdeaUltimate,RubyMine,PyCharmCommunity,PyCharmProfessional,WebStorm +runIdePlatforms=IntellijIdeaCommunity,IntellijIdeaUltimate,RubyMine,PyCharmCommunity,PyCharmProfessional,WebStorm # The versions we target, 21 is needed for IntelliJ Plugins javaVersion=21 javaTargetVersion=21 # Defined in `.tool-versions`, check via `elixir --version` elixirVersion=1.13.4 +quoterVersion=2.1.0 # IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension # Target IntelliJ Community by default -platformType=IC -platformVersion=2024.3 -# 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 -# https://plugins.jetbrains.com/plugin/24468-classic-ui -# https://plugins.jetbrains.com/plugin/7641-action-tracker - Act -# https://plugins.jetbrains.com/plugin/15104-ide-perf - IDE Performande -# https://plugins.jetbrains.com/plugin/227-psiviewer - View PSI -platformPlugins = PsiViewer:243.7768, com.google.ide-perf:1.3.2, org.jetbrains.action-tracker:0.3.3, com.intellij.classic.ui:243.21565.122,krasa.CpuUsageIndicator:1.18.0-IJ2023 -# Example: platformBundledPlugins = com.intellij.java +platformType=IU +platformVersion=253.22441.33 +pluginDistributionName=intellij-elixir +# Plugins which will run ONLY when running `runIde` tasks, not for testing/release. +# +# Usage: +# When using `./gradlew runIde`, pass the Gradle Property: +# -PrunIdeCompatiblePlugins="PsiViewer,com.google.ide-perf,org.jetbrains.action-tracker,com.intellij.classic.ui,krasa.CpuUsageIndicator,IdeaVIM" +# +# Recommendations: +# https://plugins.jetbrains.com/plugin/24468-classic-ui - Classic UI (old UI) +# https://plugins.jetbrains.com/plugin/7641-action-tracker - Action Tracker (Allows to record actions performed by user in IntelliJ IDEs) +# https://plugins.jetbrains.com/plugin/15104-ide-perf - IDE Performance +# https://plugins.jetbrains.com/plugin/227-psiviewer - PSI Viewer (A Program Structure Interface (PSI) tree viewer) +# IdeaVIM +runIdeCompatiblePlugins= # We need com.intellij.java to compile JPS, and markdown. +# @todo fix org.intellij.intelliLang platformBundledPlugins=org.intellij.plugins.markdown,com.intellij.java +platformBundledModules=intellij.platform.langInjection,intellij.spellchecker + # Gradle Releases -> https://github.com/gradle/gradle/releases # 8.5 is set because newer versions have weird run time caching issues, even with caching turned off. # See https://github.com/gradle/gradle/issues/28974 -gradleVersion=8.12.1 +gradleVersion=8.14.3 # Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib kotlin.stdlib.default.dependency=false -publishChannels=canary -runIdePlugins=IdeaVim:2.16.0 +# Channel for plugin publishing - can be overridden to control publishing channel +# Valid values: default, canary, beta, alpha, eap, etc +publishChannel=canary +versionSuffix= # These must be set, or Out of Memory (OOM) errors will occur during compiling. -org.gradle.jvmargs=-Xmx4096m -kotlin.daemon.jvmargs=-Xmx4906m +org.gradle.jvmargs=-Xmx7096m +kotlin.daemon.jvmargs=-Xmx7906m # @todo Once this has been tested to be stable with the intellij-elixir codebase, enable. # Others have it on without issues, so I'm not overly worried - just want to confirm stability. # Can always just turn it off for CI. @@ -67,3 +81,4 @@ kotlin.daemon.jvmargs=-Xmx4906m org.gradle.configuration-cache=false org.gradle.caching=false org.gradle.parallel=false +#org.gradle.daemon=false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index a4b76b953..1b33c55ba 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e18bc253b..7705927e9 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index f3b75f3b0..23d15a936 100755 --- a/gradlew +++ b/gradlew @@ -114,7 +114,7 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar +CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -205,7 +205,7 @@ fi DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # and any embedded shellness will be escaped. # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be # treated as '${Hostname}' itself on the command line. @@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/gradlew.bat b/gradlew.bat index 9b42019c7..5eed7ee84 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -70,11 +70,11 @@ goto fail :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar +set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/jps-builder/build.gradle b/jps-builder/build.gradle index 1d22d5d1d..a08226d5f 100644 --- a/jps-builder/build.gradle +++ b/jps-builder/build.gradle @@ -8,6 +8,11 @@ compileTestJava { compileJava { dependsOn(":jps-shared:composedJar") } +java { + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 +} +tasks.withType(JavaCompile) { options.encoding = 'UTF-8' } // Ensuring the necessary tasks are executed before tests test { @@ -30,4 +35,4 @@ test { dependencies { implementation project(':jps-shared') -} \ No newline at end of file +} diff --git a/jps-builder/tests/org/elixir_lang/jps/BuildResult.java b/jps-builder/tests/org/elixir_lang/jps/BuildResult.java index 1b92bfcb6..052e2d731 100644 --- a/jps-builder/tests/org/elixir_lang/jps/BuildResult.java +++ b/jps-builder/tests/org/elixir_lang/jps/BuildResult.java @@ -1,7 +1,5 @@ package org.elixir_lang.jps; -import com.intellij.openapi.util.text.StringUtil; -import com.intellij.util.Function; import org.jetbrains.annotations.NotNull; import org.jetbrains.jps.incremental.MessageHandler; import org.jetbrains.jps.incremental.messages.BuildMessage; @@ -10,6 +8,7 @@ import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; /** * Created by zyuyou on 15/7/17. @@ -56,9 +55,16 @@ public boolean isSuccessful(){ } public void assertSuccessful(){ - Function toStringFunction = StringUtil.createToStringFunction(BuildMessage.class); - Assert.assertTrue("Build failed. \nErrors:\n" + StringUtil.join(myErrorMessages, toStringFunction, "\n") + - "\nInfo messages:\n" + StringUtil.join(myInfoMessages, toStringFunction, "\n"), isSuccessful()); + String errors = myErrorMessages.stream() + .map(BuildMessage::toString) + .collect(Collectors.joining("\n")); + + String infos = myInfoMessages.stream() + .map(BuildMessage::toString) + .collect(Collectors.joining("\n")); + + Assert.assertTrue("Build failed. \nErrors:\n" + errors + + "\nInfo messages:\n" + infos, isSuccessful()); } @NotNull diff --git a/jps-shared/build.gradle b/jps-shared/build.gradle index a869b0950..0854ee58f 100644 --- a/jps-shared/build.gradle +++ b/jps-shared/build.gradle @@ -1,2 +1,6 @@ jar.archiveFileName = "jps-shared.jar" -testClasses.enabled = false \ No newline at end of file +testClasses.enabled = false +java { + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 +} diff --git a/resources/META-INF/changelog.html b/resources/META-INF/changelog.html index 8f2f5b206..144f8221d 100644 --- a/resources/META-INF/changelog.html +++ b/resources/META-INF/changelog.html @@ -1,5 +1,21 @@ + +

v22.0.0-EAP

+ +

v21.0.0