Skip to content

Commit 2b70e71

Browse files
committed
Merge branch 'feature/support-2025-2'
# Conflicts: # .github/workflows/publish-canary.yml # .github/workflows/release.yml # .github/workflows/test.yml # build.gradle
2 parents f9dd2bb + f440437 commit 2b70e71

File tree

160 files changed

+2807
-1197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+2807
-1197
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: 'Setup Build Environment'
2+
description: 'Sets up Java, Elixir, and Gradle for IntelliJ plugin builds'
3+
inputs:
4+
elixir-version:
5+
description: 'Elixir version'
6+
required: false
7+
default: '1.13.4'
8+
otp-version:
9+
description: 'OTP version'
10+
required: false
11+
default: '24.3.4.6'
12+
idea-version:
13+
description: 'IntelliJ IDEA version'
14+
required: false
15+
default: ''
16+
skip-gradle-cache:
17+
description: 'Skip Gradle cache'
18+
required: false
19+
default: 'false'
20+
skip-jcef:
21+
description: 'Skip JCEF package (set to true for release/verifyPlugin jobs)'
22+
required: false
23+
default: 'false'
24+
25+
runs:
26+
using: composite
27+
steps:
28+
- name: Free Disk Space (Ubuntu)
29+
uses: jlumbroso/free-disk-space@main
30+
with:
31+
tool-cache: false
32+
android: true
33+
dotnet: true
34+
haskell: true
35+
large-packages: false
36+
docker-images: true
37+
swap-storage: false
38+
39+
- name: Setup JBR 21
40+
uses: actions/setup-java@v5
41+
with:
42+
distribution: 'jetbrains'
43+
java-version: 21
44+
java-package: ${{ inputs.skip-jcef == 'false' && 'jdk+jcef' || 'jdk' }}
45+
46+
- name: Setup Gradle
47+
uses: gradle/actions/setup-gradle@v5
48+
49+
- name: Set up Elixir
50+
env:
51+
ImageOS: ubuntu24
52+
if: ${{ inputs.elixir-version != '' }}
53+
uses: erlef/setup-beam@v1
54+
with:
55+
otp-version: ${{ inputs.otp-version }}
56+
elixir-version: ${{ inputs.elixir-version }}
57+
58+
- name: Export environment variables
59+
shell: bash
60+
run: |
61+
if [ -n "${{ inputs.elixir-version }}" ]; then
62+
echo "OTP_RELEASE=${{ inputs.otp-version }}" >> $GITHUB_ENV
63+
echo "ERLANG_SDK_HOME=$(erl -eval 'io:format("~s", [code:root_dir()]).' -noshell -run init stop)" >> $GITHUB_ENV
64+
fi
65+
chmod +x gradlew
66+
if [ -n "${{ inputs.idea-version }}" ]; then
67+
echo "ORG_GRADLE_PROJECT_ideaVersion=${{ inputs.idea-version }}" >> $GITHUB_ENV
68+
fi

.github/workflows/publish-canary.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ jobs:
1111
- name: Check out repository 💾
1212
uses: actions/checkout@v5
1313

14-
- name: Setup JetBrains Runtime (JBR) ☕
15-
uses: ./.github/actions/setup-jbr
14+
- name: Setup Build Environment ☕
15+
uses: ./.github/actions/setup-env
16+
with:
17+
elixir-version: ''
1618

1719
- name: Download release asset 📦
1820
id: download_asset

.github/workflows/release.yml

Lines changed: 20 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,66 +6,43 @@ on:
66
- main
77

88
jobs:
9-
test:
10-
runs-on: ubuntu-latest
9+
test-and-verify:
10+
uses: ./.github/workflows/shared-test.yml
11+
with:
12+
elixir-version: '1.13.4'
13+
otp-version: '24.3.4.6'
1114

12-
steps:
13-
- uses: actions/checkout@v5
14-
- name: Setup JetBrains Runtime (JBR)
15-
uses: ./.github/actions/setup-jbr
16-
- name: Set up Elixir
17-
uses: erlef/setup-beam@v1
18-
with:
19-
otp-version: 24.3.4.6
20-
elixir-version: 1.13.0
21-
- name: Export OTP_RELEASE
22-
run: echo "OTP_RELEASE=24.3.4.6" >> $GITHUB_ENV
23-
- name: Export ERLANG_SDK_HOME
24-
run: echo "ERLANG_SDK_HOME=`erl -eval 'io:format("~s", [code:root_dir()]).' -noshell -run init stop`" >> $GITHUB_ENV
25-
- name: Grant execute permission for gradlew
26-
run: chmod +x gradlew
27-
- name: Compile Tests with Gradle
28-
run: ./gradlew --stacktrace compileTestJava
29-
- name: Get Elixir Source
30-
run: ./gradlew --stacktrace getElixir
31-
- name: Release Quoter
32-
run: ./gradlew --stacktrace releaseQuoter
33-
- name: Test with Gradle
34-
run: ./gradlew --stacktrace test
35-
verifyPlugin:
36-
runs-on: ubuntu-latest
37-
steps:
38-
- uses: actions/checkout@v5
39-
- name: Setup JetBrains Runtime (JBR)
40-
uses: ./.github/actions/setup-jbr
41-
- name: Grant execute permission for gradlew
42-
run: chmod +x gradlew
43-
- name: Run Plugin Verifier
44-
run: ./gradlew --stacktrace verifyPlugin
4515
release:
46-
needs: [ test, verifyPlugin ]
16+
needs: [ test-and-verify ]
4717
runs-on: ubuntu-latest
4818
steps:
4919
- uses: actions/checkout@v5
50-
- name: Setup JetBrains Runtime (JBR)
51-
uses: ./.github/actions/setup-jbr
52-
- name: Grant execute permission for gradlew
53-
run: chmod +x gradlew
20+
21+
- name: Setup Build Environment
22+
uses: ./.github/actions/setup-env
23+
with:
24+
elixir-version: ''
25+
skip-jcef: 'true'
26+
5427
- name: Build with Gradle
5528
run: ./gradlew buildPlugin
29+
5630
- name: Export ASSET_PATH
57-
run: echo "ASSET_PATH=`ls -1 build/distributions/intellij-elixir-*.zip`" >> $GITHUB_ENV
31+
run: echo "ASSET_PATH=$(ls -1 build/distributions/intellij-elixir-*.zip)" >> $GITHUB_ENV
32+
5833
- name: Export ASSET_NAME
5934
run: echo "ASSET_NAME=${ASSET_PATH#build/distributions/}" >> $GITHUB_ENV
35+
6036
- name: Export TAG
6137
run: |
6238
version_suffix_zip=${ASSET_NAME#intellij-elixir-}
6339
echo "TAG=v${version_suffix_zip%.zip}" >> $GITHUB_ENV
40+
6441
- name: Tag Commit
6542
uses: hole19/git-tag-action@master
6643
env:
67-
# TAG set above with `set-env name=TAG`
6844
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
6946
- name: Create Release
7047
id: create_release
7148
uses: actions/create-release@latest
@@ -75,6 +52,7 @@ jobs:
7552
tag_name: ${{ env.TAG }}
7653
release_name: ${{ env.TAG }}
7754
prerelease: true
55+
7856
- name: Upload Release Asset
7957
uses: actions/upload-release-asset@v1
8058
env:

.github/workflows/shared-test.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Shared Test Workflow
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
elixir-version:
7+
description: 'Elixir version to use'
8+
required: false
9+
type: string
10+
default: '1.13.4'
11+
otp-version:
12+
description: 'OTP version to use'
13+
required: false
14+
type: string
15+
default: '24.3.4.6'
16+
idea-version:
17+
description: 'IntelliJ IDEA version for testing'
18+
required: false
19+
type: string
20+
default: '253.28294.169'
21+
upload-reports:
22+
description: 'Upload test reports as artifacts'
23+
required: false
24+
type: boolean
25+
default: false
26+
27+
jobs:
28+
test:
29+
runs-on: ubuntu-latest
30+
31+
steps:
32+
- uses: actions/checkout@v5
33+
34+
- name: Setup Build Environment
35+
uses: ./.github/actions/setup-env
36+
with:
37+
elixir-version: ${{ inputs.elixir-version }}
38+
otp-version: ${{ inputs.otp-version }}
39+
idea-version: ${{ inputs.idea-version }}
40+
41+
- name: Compile Tests with Gradle
42+
run: ./gradlew --stacktrace compileTestJava
43+
44+
- name: Get Elixir Source
45+
run: ./gradlew --stacktrace getElixir
46+
47+
- name: Release Quoter
48+
run: ./gradlew --stacktrace releaseQuoter
49+
50+
- name: Test with Gradle
51+
run: ./gradlew --stacktrace test
52+
53+
- name: Publish Test Results
54+
uses: EnricoMi/publish-unit-test-result-action@v2
55+
if: always()
56+
with:
57+
files: '**/build/test-results/**/*.xml'
58+
check_name: Test Results
59+
60+
- name: Upload Test Reports
61+
uses: actions/upload-artifact@v4
62+
if: ${{ always() && inputs.upload-reports }}
63+
with:
64+
name: test-reports
65+
path: |
66+
**/build/reports/tests/**
67+
**/build/test-results/**
68+
retention-days: 30
69+
70+
verifyPlugin:
71+
runs-on: ubuntu-latest
72+
73+
steps:
74+
- uses: actions/checkout@v5
75+
76+
- name: Setup Build Environment
77+
uses: ./.github/actions/setup-env
78+
with:
79+
elixir-version: ''
80+
81+
- name: Run Plugin Verifier
82+
run: ./gradlew --stacktrace verifyPlugin
83+
84+
- name: Upload Verify Reports
85+
uses: actions/upload-artifact@v4
86+
if: ${{ always() && inputs.upload-reports }}
87+
with:
88+
name: verify-plugin-reports
89+
path: |
90+
**/build/reports/pluginVerifier
91+
retention-days: 30

.github/workflows/test.yml

Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -7,46 +7,10 @@ concurrency:
77
cancel-in-progress: true
88

99
jobs:
10-
test:
11-
runs-on: ubuntu-latest
12-
13-
strategy:
14-
matrix:
15-
ideaVersion: [ "2024.3.6" ]
16-
17-
steps:
18-
- uses: actions/checkout@v5
19-
- name: Setup JetBrains Runtime (JBR)
20-
uses: ./.github/actions/setup-jbr
21-
- name: Set up Elixir
22-
uses: erlef/setup-beam@v1
23-
with:
24-
otp-version: 24.3.4.6
25-
elixir-version: 1.13.4
26-
- name: Export OTP_RELEASE
27-
run: echo "OTP_RELEASE=24.3.4.6" >> $GITHUB_ENV
28-
- name: Export ERLANG_SDK_HOME
29-
run: echo "ERLANG_SDK_HOME=`erl -eval 'io:format("~s", [code:root_dir()]).' -noshell -run init stop`" >> $GITHUB_ENV
30-
- name: Grant execute permission for gradlew
31-
run: chmod +x gradlew
32-
- name: Export ideaVersion to gradle
33-
run: echo "ORG_GRADLE_PROJECT_ideaVersion=${{matrix.ideaVersion}}" >> $GITHUB_ENV
34-
- name: Compile Tests with Gradle
35-
run: ./gradlew --stacktrace compileTestJava
36-
- name: Get Elixir Source
37-
run: ./gradlew --stacktrace getElixir
38-
- name: Release Quoter
39-
run: ./gradlew --stacktrace releaseQuoter
40-
- name: Test with Gradle
41-
run: ./gradlew --stacktrace test
42-
verifyPlugin:
43-
runs-on: ubuntu-latest
44-
45-
steps:
46-
- uses: actions/checkout@v5
47-
- name: Setup JetBrains Runtime (JBR)
48-
uses: ./.github/actions/setup-jbr
49-
- name: Grant execute permission for gradlew
50-
run: chmod +x gradlew
51-
- name: Run Plugin Verifier
52-
run: ./gradlew --stacktrace verifyPlugin
10+
test-and-verify:
11+
uses: ./.github/workflows/shared-test.yml
12+
with:
13+
elixir-version: '1.13.4'
14+
otp-version: '24.3.4.6'
15+
idea-version: '2024.3.6'
16+
upload-reports: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ jps-shared/build
2929
jps-shared/out
3030
libs/
3131
.intellijPlatform
32+
/.kotlin

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ erlang 24.3.4.6
77
# mac:
88
# mise link java@jbrsdk_jcef-21.0.3-b509.4-2024.2 /path/to/jbrsdk_jcef-21.0.3-xxx-xxx-b509.4/Contents/Home
99
# Then setting it to `java jbrsdk_jcef-21.0.3-b509.4-2024.2`
10-
java zulu-21.36.17
10+
java jetbrains-21.0.8b1038.68

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## v22.0.0 (Unreleased)
4+
### Enhancements
5+
* [#3712](https://github.com/KronicDeth/intellij-elixir/pull/3712) - [@joshuataylor](https://github.com/joshuataylor)
6+
* Upgrade Kotlin to 2.2.10, as it's deprecated in IntelliJ 2025.1+, various deprecations are also fixed.
7+
* Fixed adding Erlang/Elixir SDKs in 2025.1+ IDEs.
8+
39
## v21.0.0
410
### Enhancements
511
* [#3651](https://github.com/KronicDeth/intellij-elixir/pull/3681) - [@joshuataylor](https://github.com/joshuataylor)

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
6. In "Import Project from Gradle"
3232
1. Check "Use auto-import"
3333
2. Check "Create separate module per source set"
34-
3. Ensure Gradle JVM is **AT LEAST** Java 1.7 / 7. (Java 1.8 / 8 is recommended.)
34+
3. Ensure Gradle JVM is **AT LEAST** Java 21+.
3535
Your import settings should look something like this:<br/>
3636
![Gradle settings](/screenshots/contributing/gradle_settings.png?raw=true "Gradle settings")
3737
4. Click Finish

0 commit comments

Comments
 (0)