Skip to content

Commit

Permalink
Support 2024.2 & IntelliJ Platform Gradle Plugin (2.x) (#3619)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuataylor authored Aug 14, 2024
1 parent 49238bc commit b3af046
Show file tree
Hide file tree
Showing 22 changed files with 404 additions and 184 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
- name: Setup JBR 21
uses: gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d
with:
java-version: 17
distribution: 'jetbrains'
java-version: 21
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
Expand All @@ -39,10 +40,11 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
- name: Setup JBR 21
uses: gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d
with:
java-version: 17
distribution: 'jetbrains'
java-version: 21
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run Plugin Verifier
Expand All @@ -53,10 +55,11 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
- name: Setup JBR 21
uses: gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d
with:
java-version: 17
distribution: 'jetbrains'
java-version: 21
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
Expand Down Expand Up @@ -95,4 +98,4 @@ jobs:
- name: Publish
env:
JET_BRAINS_MARKETPLACE_TOKEN: ${{ secrets.JetBrainsMarketplaceToken }}
run: ./gradlew --stacktrace publishPlugin
run: ./gradlew --stacktrace publishPlugin
24 changes: 15 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,30 @@ name: Test

on: pull_request

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
ideaVersion: [ "2024.1.4" ]
ideaVersion: [ "2024.2.0.1" ]

steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
- name: Setup JBR 21
uses: gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d
with:
java-version: 17
distribution: 'jetbrains'
java-version: 21
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
otp-version: 24.3.4.6
elixir-version: 1.13.0
elixir-version: 1.13.4
- name: Export OTP_RELEASE
run: echo "OTP_RELEASE=24.3.4.6" >> $GITHUB_ENV
- name: Export ERLANG_SDK_HOME
Expand All @@ -42,11 +47,12 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
- name: Setup JBR 21
uses: gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d
with:
java-version: 17
distribution: 'jetbrains'
java-version: 21
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run Plugin Verifier
run: ./gradlew --stacktrace runPluginVerifier
run: ./gradlew --stacktrace verifyPlugin
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ jps-builder/out
jps-shared/build
jps-shared/out
libs/
.intellijPlatform
8 changes: 7 additions & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
elixir 1.13.4-otp-24
erlang 24.3.4.6
java openjdk-17.0.2

# 17.0.12+7 / Azul Zulu: 17.52.17
# GitHub actions uses JBR 17
# If using mise, you can change below to use JBR as well by doing (if version is 17.xxx)
# mise link java@jbrsdk_jcef-17.0.11-b1312.2-2024.2 /path/to/jbrsdk_jcef-17.0.11-xxx-xxx-b1207.24/Contents/Home
# Then setting it to `java jbrsdk_jcef-17.0.11-b1312.2-2024.2`
java zulu-17.52.17
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
# Changelog

## v19.0.0

### Breaking changes
* [#3619](https://github.com/KronicDeth/intellij-elixir/pull/3619) - [@joshuataylor](https://github.com/joshuataylor)
* Drop support for < 2024.2 IDEs

### Enhancements
* [#3619](https://github.com/KronicDeth/intellij-elixir/pull/3619) - [@joshuataylor](https://github.com/joshuataylor)
* Support IntelliJ Gradle Plugin 2.0

## v18.0.1
### Enhancements
* [#3582](https://github.com/KronicDeth/intellij-elixir/pull/3582) - [@rNoz](https://github.com/rNoz)
* Enabling proper code generation for comments (Comment with Line/Block Comment)

## v18.0.0
### Breaking changes
* [#3569](https://github.com/KronicDeth/intellij-elixir/pull/3569) - [@ashleysommer](https://github.com/ashleysommer), [@joshuataylor](https://github.com/joshuataylor)
* Drop support for <= 2024.1 IDEs.
* Drop support for < 2024.1 IDEs.

## v17.0.1

Expand Down
48 changes: 36 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,25 +52,49 @@ Gradle will handle all dependency management, including fetching the Intellij ID

**NOTE:** If you're having trouble running the plugin against Intellij IDEA 14.1 on Mac, see this [comment](https://github.com/KronicDeth/intellij-elixir/pull/504#issuecomment-284275036).

### From commandline
You can run `./gradlew runIde` or `./gradlew test`.
### From command line
> Let's assume that you don't have much knowledge of the Java/Kotlin ecosystem, and just want to help contribute some changes.
> Here are some tips on how make your changes and test them without hopefully too much fuss,
### From IntelliJ
To launch an IDE, you can run
```sh
./gradlew runIntelliJCommunity
```

1. Open the Gradle Tool Window (`View > Tool Windows > Gradle` OR from the Gradle button on the right tool button bar)
2. Expand `Elixir (root) > Tasks`
Or from one of the following IDEs:

- runIntelliJCommunity
- runIntelliJUltimate
- runPyCharmCommunity
- runPyCharmProfessional
- runRubyMine
- runRustRover
- runWebStorm

To run all tests `./gradlew test`.

#### `runIde`
To run a specific test:
```sh
./gradlew test --tests "org.elixir_lang.psi.operation.PrefixTest"
```

1. Expand `intellij`
2. Right-click `runIde`
3. Select `Create 'intellij-elixir' [runIde]`
To build (so you get a .zip file):
```sh
./gradlew build
# Or without tests
./gradlew build -x test
```

#### `test`
### From IntelliJ IDEA
#### Running the plugin in a specific IDE
1. Open the Gradle Tool Window (`View > Tool Windows > Gradle` OR from the Gradle button on the right tool button bar)
2. Expand `Elixir (root) > Tasks > intellij platform`
3. Double click `runIntelliJCommunity` (or which IDE you want to test with)
4. Now the Run Configuration will be selected, and you can click the green arrow at the top of the screen.

#### Verification
1. Expand `verification`
2. Right-click `test`
3. Select `Create 'intellij-elixir' [test]`
2. Double click `test`

### Color Schemes

Expand Down
Loading

0 comments on commit b3af046

Please sign in to comment.