Skip to content

Commit a721600

Browse files
committed
fix(mps-model-server-plugin): extend supported range to MPS 2020.3
The plugin declared to be compatible with MPS versions 2021.1 - 2022.3. Extended that range to include MPS 2020.3 and also extended the workflow to test the compatibility.
1 parent 66eff8e commit a721600

File tree

3 files changed

+52
-37
lines changed

3 files changed

+52
-37
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: MPS compatibility
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
pull_request: {}
8+
# allow manual execution just in case
9+
workflow_dispatch:
10+
11+
jobs:
12+
build-mps-components:
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Set up JDK 11
19+
uses: actions/setup-java@v3
20+
with:
21+
distribution: 'temurin'
22+
java-version: '11'
23+
- name: Build with MPS 2020.3.6
24+
run: ./gradlew :mps-model-adapters:build :mps-model-server-plugin:build -Pmps.version=2020.3.6
25+
- name: Build with MPS 2021.1.4
26+
run: ./gradlew :mps-model-adapters:build :mps-model-server-plugin:build -Pmps.version=2021.1.4
27+
- name: Build with MPS 2021.2.6
28+
run: ./gradlew :mps-model-adapters:build :mps-model-server-plugin:build -Pmps.version=2021.2.6
29+
- name: Build with MPS 2021.3.3
30+
run: ./gradlew :mps-model-adapters:build :mps-model-server-plugin:build -Pmps.version=2021.3.3
31+
- name: Build with MPS 2022.2
32+
run: ./gradlew :mps-model-adapters:build :mps-model-server-plugin:build -Pmps.version=2022.2
33+
- name: Build with MPS 2022.3
34+
run: ./gradlew :mps-model-adapters:build :mps-model-server-plugin:build -Pmps.version=2022.3

.github/workflows/mps-model-adapters.yaml

Lines changed: 0 additions & 34 deletions
This file was deleted.

mps-model-server-plugin/build.gradle.kts

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,22 @@ plugins {
33
id("org.jetbrains.intellij") version "1.15.0"
44
}
55

6-
val mpsVersion = "2021.1.4"
6+
val mpsToIdeaMap = mapOf(
7+
"2020.3.6" to "203.8084.24", // https://github.com/JetBrains/MPS/blob/2020.3.6/build/version.properties
8+
"2021.1.4" to "211.7628.21", // https://github.com/JetBrains/MPS/blob/2021.1.4/build/version.properties
9+
"2021.2.6" to "212.5284.40", // https://github.com/JetBrains/MPS/blob/2021.2.5/build/version.properties (?)
10+
"2021.3.3" to "213.7172.25", // https://github.com/JetBrains/MPS/blob/2021.3.3/build/version.properties
11+
"2022.2" to "222.4554.10", // https://github.com/JetBrains/MPS/blob/2021.2.1/build/version.properties
12+
"2022.3" to "223.8836.41", // https://github.com/JetBrains/MPS/blob/2022.3.0/build/version.properties (?)
13+
)
14+
// use the given MPS version, or 2022.2 (last version with JAVA 11) as default
15+
val mpsVersion = project.findProperty("mps.version")?.toString().takeIf { !it.isNullOrBlank() } ?: "2020.3.6"
16+
if (!mpsToIdeaMap.containsKey(mpsVersion)) {
17+
throw GradleException("Build for the given MPS version '$mpsVersion' is not supported.")
18+
}
19+
// identify the corresponding intelliJ platform version used by the MPS version
20+
val ideaVersion = mpsToIdeaMap.getValue(mpsVersion)
21+
println("Building for MPS version $mpsVersion and IntelliJ version $ideaVersion")
722

823
dependencies {
924
implementation(project(":model-server-lib"))
@@ -19,7 +34,7 @@ dependencies {
1934
intellij {
2035

2136
// IDEA platform version used in MPS 2021.1.4: https://github.com/JetBrains/MPS/blob/2021.1.4/build/version.properties#L11
22-
version.set("211.7628.21")
37+
version.set(ideaVersion)
2338

2439
// type.set("IC") // Target IDE Platform
2540

@@ -32,7 +47,7 @@ tasks {
3247
}
3348

3449
patchPluginXml {
35-
sinceBuild.set("211")
50+
sinceBuild.set("203")
3651
untilBuild.set("231.*")
3752
}
3853

0 commit comments

Comments
 (0)