Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Setup JBR 21
uses: gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d
uses: actions/setup-java@v5
with:
distribution: 'jetbrains'
java-version: 21
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Setup JBR 21
uses: gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d
uses: actions/setup-java@v5
with:
distribution: 'jetbrains'
java-version: 21
Expand All @@ -56,7 +56,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Setup JBR 21
uses: gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d
uses: actions/setup-java@v5
with:
distribution: 'jetbrains'
java-version: 21
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ jobs:

strategy:
matrix:
ideaVersion: [ "2024.2.0.1" ]
ideaVersion: [ "2024.2.6", "2024.3.6", "2025.2.1" ]

steps:
- uses: actions/checkout@v2
- name: Setup JBR 21
uses: gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d
uses: actions/setup-java@v5
with:
distribution: 'jetbrains'
java-version: 21
cache: 'gradle'
package-type: 'jdk+jcef'
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
Expand Down Expand Up @@ -48,10 +50,12 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Setup JBR 21
uses: gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d
uses: actions/setup-java@v5
with:
distribution: 'jetbrains'
java-version: 21
cache: 'gradle'
package-type: 'jdk+jcef'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run Plugin Verifier
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ jps-shared/build
jps-shared/out
libs/
.intellijPlatform
/.kotlin
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:<br/>
![Gradle settings](/screenshots/contributing/gradle_settings.png?raw=true "Gradle settings")
4. Click Finish
Expand Down
130 changes: 67 additions & 63 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
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.7.2"
id "org.jetbrains.kotlin.jvm" version "2.2.10"
id "de.undercouch.download" version "5.6.0"
id 'com.adarshr.test-logger' version '4.0.0'
}

Expand Down Expand Up @@ -33,13 +36,17 @@ ext {
channel = "canary"
}

version "$pluginVersion$versionSuffix"
version = "$pluginVersion$versionSuffix"
}

allprojects {
apply plugin: 'java'
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
tasks.withType(JavaCompile) { options.encoding = 'UTF-8' }
}
subprojects {
Expand All @@ -58,7 +65,6 @@ subprojects {
create(providers.gradleProperty("platformType"), providers.gradleProperty("platformVersion"))

bundledPlugins providers.gradleProperty("platformBundledPlugins").map { it.split(',').toList() }
plugins providers.gradleProperty("platformPlugins").map { it.split(',').toList() }

instrumentationTools()
pluginVerifier()
Expand Down Expand Up @@ -88,10 +94,11 @@ sourceSets {
}
}
intellijPlatform {
// buildSearchableOptions = false
// instrumentCode = false
pluginConfiguration {
def stripTag = { text, tag -> text.replace("<${tag}>", "").replace("</${tag}>", "") }
def bodyInnerHTML = { path ->
stripTag(stripTag(file(path).text, "html"), "body")
def bodyInnerHTML = { path -> stripTag(stripTag(file(path).text, "html"), "body")
}

id = providers.gradleProperty("pluginGroup")
Expand Down Expand Up @@ -122,13 +129,17 @@ intellijPlatform {
}
pluginVerification {
ides {
ide(IntelliJPlatformType.IntellijIdeaCommunity, "243.12818.47")
// https://www.jetbrains.com/idea/download/other.html
// ide(IntelliJPlatformType.IntellijIdeaCommunity, "2024.2.6")
// ide(IntelliJPlatformType.IntellijIdeaCommunity, "2024.3.6")
ide IntelliJPlatformType.IntellijIdeaCommunity, "2025.2.1"
}
}
}
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"])

Expand All @@ -142,19 +153,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)
}
}

Expand All @@ -176,50 +194,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")
}
}
}
Expand All @@ -237,7 +235,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()
Expand All @@ -248,9 +246,7 @@ 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() })
instrumentationTools()
pluginVerifier()
zipSigner()
Expand Down Expand Up @@ -285,12 +281,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
Expand All @@ -314,7 +310,7 @@ task getElixir {

task getQuoter {
doLast {
download {
download.run {
src "https://github.com/KronicDeth/intellij_elixir/archive/v${quoterVersion}.zip"
dest quoterZipPath
overwrite false
Expand Down Expand Up @@ -423,3 +419,11 @@ idea {
generatedSourceDirs += file('gen')
}
}

// Uncomment to allow using build-scan.
// if (hasProperty('buildScan')) {
// buildScan {
// termsOfServiceUrl = 'https://gradle.com/terms-of-service'
// termsOfServiceAgree = 'yes'
// }
// }
Loading
Loading