1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-04-13 20:15:43 +02:00

Upgrade java version to 21

This commit is contained in:
Alex Plate 2025-02-28 19:39:48 +02:00
parent 38102afc0f
commit ee1928c836
No known key found for this signature in database
GPG Key ID: 0B97153C8FFEC09F
16 changed files with 61 additions and 21 deletions

View File

@ -20,10 +20,10 @@ jobs:
- name: Fetch origin repo
uses: actions/checkout@v3
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: '17'
java-version: '21'
distribution: 'adopt'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

View File

@ -23,10 +23,10 @@ jobs:
fetch-depth: 300
- name: Get tags
run: git fetch --tags origin
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: '17'
java-version: '21'
distribution: 'adopt'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

View File

@ -18,10 +18,10 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 300
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: '17'
java-version: '21'
distribution: 'adopt'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

View File

@ -18,10 +18,10 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 300
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: '17'
java-version: '21'
distribution: 'adopt'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

View File

@ -20,10 +20,10 @@ jobs:
fetch-depth: 50
# See end of file updateChangeslog.yml for explanation of this secret
ssh-key: ${{ secrets.PUSH_TO_PROTECTED_BRANCH_SECRET }}
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: '17'
java-version: '21'
distribution: 'adopt'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

View File

@ -13,7 +13,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
java-version: 21
- name: Setup FFmpeg
run: brew install ffmpeg
# - name: Setup Gradle

View File

@ -13,7 +13,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
java-version: 21
- uses: actions/setup-python@v5
with:
python-version: '3.10'

View File

@ -13,7 +13,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
java-version: 21
- name: Setup FFmpeg
run: brew install ffmpeg
# - name: Setup Gradle

View File

@ -25,10 +25,10 @@ jobs:
ssh-key: ${{ secrets.PUSH_TO_PROTECTED_BRANCH_SECRET }}
- name: Get tags
run: git fetch --tags origin
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: '17'
java-version: '21'
distribution: 'adopt'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

View File

@ -22,10 +22,10 @@ jobs:
ssh-key: ${{ secrets.PUSH_TO_PROTECTED_BRANCH_SECRET }}
- name: Get tags
run: git fetch --tags origin
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: '17'
java-version: '21'
distribution: 'adopt'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

View File

@ -20,10 +20,10 @@ jobs:
fetch-depth: 50
# See end of file updateChangeslog.yml for explanation of this secret
ssh-key: ${{ secrets.PUSH_TO_PROTECTED_BRANCH_SECRET }}
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: '17'
java-version: '21'
distribution: 'adopt'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

1
.gitignore vendored
View File

@ -13,6 +13,7 @@
!/.idea/vcs.xml
!/.idea/misc.xml
!/.idea/.name
!/.idea/gradle.xml
**/build/
**/out/

26
.idea/gradle.xml Normal file
View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/annotation-processors" />
<option value="$PROJECT_DIR$/scripts" />
<option value="$PROJECT_DIR$/tests" />
<option value="$PROJECT_DIR$/tests/java-tests" />
<option value="$PROJECT_DIR$/tests/long-running-tests" />
<option value="$PROJECT_DIR$/tests/property-tests" />
<option value="$PROJECT_DIR$/tests/ui-fixtures" />
<option value="$PROJECT_DIR$/tests/ui-ij-tests" />
<option value="$PROJECT_DIR$/tests/ui-py-tests" />
<option value="$PROJECT_DIR$/vim-engine" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>

View File

@ -18,5 +18,5 @@
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="corretto-17" project-jdk-type="JavaSDK" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="corretto-21" project-jdk-type="JavaSDK" />
</project>

View File

@ -170,6 +170,19 @@ configurations {
}
}
val currentJavaVersion = javaToolchains.launcherFor {}.get().metadata.languageVersion.toString()
if (currentJavaVersion != javaVersion) {
// NOTE: I made this exception because the default Gradle error message is horrible, noone can understand it.
throw RuntimeException(
"""
Incorrect java version used for building.
IdeaVim uses java version $javaVersion, but the current java version is $currentJavaVersion.
If IntelliJ IDEA is used, change the setting in "Settings | Build, Execution, Deployment | Build Tools | Gradle"
If build is run from the terminal, set JAVA_HOME environment variable to the correct java version.
""".trimIndent()
)
}
tasks {
test {
useJUnitPlatform()

View File

@ -21,7 +21,7 @@ ideaVersion=2024.3.3
ideaType=IC
instrumentPluginCode=true
version=SNAPSHOT
javaVersion=17
javaVersion=21
remoteRobotVersion=0.11.23
antlrVersion=4.10.1