Skip to content

Commit

Permalink
Merge pull request #76 from mbeddr/feature/migrate_20222
Browse files Browse the repository at this point in the history
Clean-up the debugging code from the migration to MPS 2022.2
  • Loading branch information
HeikoBecker authored Aug 30, 2023
2 parents 84ccb62 + bd7a5bb commit 56ffcc0
Show file tree
Hide file tree
Showing 135 changed files with 20,366 additions and 20,260 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: FASTEN_CI
on: [push, pull_request]

env:
MPS_VER: "2021.1"
MPS_VER: "2022.2"
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.FASTEN_GITHUB_PKG_REGISTRY }}

Expand All @@ -25,11 +25,16 @@ jobs:
run: |
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11

java-version: 17

- name: Resolve MPS
uses: gradle/[email protected]
with:
arguments: resolveMps -Pgpr.user=${{github.actor}} -Pgpr.token=${{ secrets.GITHUB_TOKEN }}

- name: Build FASTEN
uses: gradle/[email protected]
with:
Expand Down Expand Up @@ -115,10 +120,10 @@ jobs:
run: |
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17

#- name: Build FASTEN Assurance Distribution
# uses: gradle/[email protected]
Expand Down
66 changes: 17 additions & 49 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,17 @@ import de.itemis.mps.gradle.modelcheck.ModelcheckMpsProjectPlugin
import java.util.Date

//will pull the groovy classes/types from nexus to the classpath
buildscript {
dependencies {
// Version must match download-jbr plugin below
classpath("de.itemis.mps:mps-gradle-plugin:1.11.+")
}

dependencyLocking { lockAllConfigurations() }
}

plugins {
base
`maven-publish`
id("co.riiid.gradle") version "0.4.2"

// Version must match buildscript mps-gradle-plugin dependency above
id("download-jbr") version "1.11.+"
id("download-jbr") version "1.17.+"
id("de.itemis.mps.gradle.common") version "1.18.+"
}

val jbrVers = "11_0_12-b1504.28"
val jbrVers = "17.0.6-b653.34"

downloadJbr {
jbrVersion = jbrVers
Expand All @@ -32,29 +24,6 @@ downloadJbr {
// detect if we are in a CI build
val ciBuild = (System.getenv("CI") != null && System.getenv("CI").toBoolean()) || project.hasProperty("forceCI") || project.hasProperty("teamcity")

// Detect jdk location, required to start ant with tools.jar on classpath otherwise javac and tests will fail
val jdk_home: String = if (project.hasProperty("java11_home")) {
project.findProperty("java11_home") as String
} else if (System.getenv("JB_JAVA11_HOME") != null) {
System.getenv("JB_JAVA11_HOME")!!
} else {
val expected = JavaVersion.VERSION_11
if (JavaVersion.current() != expected) {
throw GradleException("This build script requires Java 11 but you are currently using ${JavaVersion.current()}.\nWhat you can do:\n"
+ " * Use project property java11_home to point to the Java 11 JDK.\n"
+ " * Use environment variable JB_JAVA11_HOME to point to the Java 11 JDK\n"
+ " * Run Gradle using Java 11")
}
System.getProperty("java.home")!!
}

// Check JDK location
if (!File(jdk_home, "lib").exists()) {
throw GradleException("Unable to locate JDK home folder. Detected folder is: $jdk_home")
}

logger.info("Using JDK at {}", jdk_home)

var nexusUsername: String? by extra
var nexusPassword: String? by extra

Expand All @@ -66,8 +35,10 @@ if (nexusUsername == null) {
logger.info("Repository username: {}", nexusUsername)

// Project versions
val major = "2021"
val minor = "3"
val major = "2022"
val minor = "2"

val mpsVersion ="$major.$minor"

// Dependency versions
val platformVersion = "$major.$minor.+"
Expand Down Expand Up @@ -103,7 +74,7 @@ configurations {
val jbrLinux by creating

dependencies {
mps("com.jetbrains:mps:$platformVersion")
mps("com.jetbrains:mps:$mpsVersion")
languageLibs("com.mbeddr:platform:$platformVersion")
languageLibs("org.mpsqa:all-in-one:$platformVersion")
antLib("org.apache.ant:ant-junit:1.10.6")
Expand All @@ -112,7 +83,7 @@ configurations {
jbrLinux("com.jetbrains.jdk:jbr_jcef:$jbrVers:linux-x64@tgz")
}
}

dependencyLocking { lockAllConfigurations() }

repositories {
Expand Down Expand Up @@ -155,8 +126,7 @@ val resolveMps = if (skipResolveMps) {
}

// tools needed for compiler support in ant calls
val buildScriptClasspath = project.configurations["antLib"] +
project.files("$project.jdk_home/lib/tools.jar")
val buildScriptClasspath = project.configurations["antLib"]

val artifactsDir = file("$buildDir/artifacts")
val dependenciesDir = file("$buildDir/dependencies")
Expand All @@ -172,22 +142,19 @@ val defaultScriptArgs = mapOf(
"version" to version,
"build.date" to Date(),
//incremental build support
"mps.generator.skipUnmodifiedModels" to true
"mps.generator.skipUnmodifiedModels" to true,
"jdk.nio.zipfs.allowDotZipEntry" to true,
"jdk.util.zip.disableZip64ExtraFieldValidation" to true
)

// enables https://github.com/mbeddr/mps-gradle-plugin#providing-global-defaults
extra["itemis.mps.gradle.ant.defaultScriptArgs"] = defaultScriptArgs.map { "-D${it.key}=${it.value}" }
extra["itemis.mps.gradle.ant.defaultScriptClasspath"] = buildScriptClasspath
extra["itemis.mps.gradle.ant.defaultJavaExecutable"] = File(jdk_home, "bin/java")

tasks {
val configureJava by registering {
val downloadJbr = named("downloadJbr", DownloadJbrForPlatform::class)
dependsOn(downloadJbr)
doLast {
extra["itemis.mps.gradle.ant.defaultScriptArgs"] = defaultScriptArgs.map { "-D${it.key}=${it.value}" }
extra["itemis.mps.gradle.ant.defaultScriptClasspath"] = buildScriptClasspath
extra["itemis.mps.gradle.ant.defaultJavaExecutable"] = downloadJbr.get().javaExecutable
project.extra["itemis.mps.gradle.ant.defaultScriptArgs"] = defaultScriptArgs.map { "-D${it.key}=${it.value}" }
project.extra["itemis.mps.gradle.ant.defaultScriptClasspath"] = buildScriptClasspath
project.extra["itemis.mps.gradle.ant.defaultJavaExecutable"] = downloadJbr.get().javaExecutable
}
}

Expand Down Expand Up @@ -260,6 +227,7 @@ tasks {
}

val run_all_tests by registering(TestLanguages::class) {
dependsOn(configureJava)
description = "Will execute all tests from command line"
script = "$buildDir/scripts/build-all-tests.xml"
doLast {
Expand Down
1 change: 1 addition & 0 deletions build/scripts/build_all_scripts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
<library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.context.jar" />
<library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.core.jar" />
<library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.dataFlow.jar" />
<library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.descriptor.jar" />
<library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.editor.jar" />
<library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.findUsages.jar" />
<library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.generator.generationContext.jar" />
Expand Down
27 changes: 0 additions & 27 deletions buildscript-gradle.lockfile

This file was deleted.

2 changes: 1 addition & 1 deletion code/languages/com.mbeddr.formal.nusmv/.mps/migration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<entry key="jetbrains.mps.ide.mpsmigration.v_2019_3.DefaultFacetExplicitPersistence" value="executed" />
<entry key="jetbrains.mps.ide.mpsmigration.v_2021_2.SplitMPSCoreStub" value="executed" />
<entry key="jetbrains.mps.ide.mpsmigration.v_2021_3.ExtractMPSBootStubs" value="executed" />
<entry key="project.migrated.version" value="213" />
<entry key="project.migrated.version" value="222" />
</component>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,16 @@
<dependency reexport="false">1ed103c3-3aa6-49b7-9c21-6765ee11f224(MPS.Editor)</dependency>
</dependencies>
<languageVersions>
<language slang="l:f3061a53-9226-4cc5-a443-f952ceaf5816:jetbrains.mps.baseLanguage" version="11" />
<language slang="l:f3061a53-9226-4cc5-a443-f952ceaf5816:jetbrains.mps.baseLanguage" version="12" />
<language slang="l:443f4c36-fcf5-4eb6-9500-8d06ed259e3e:jetbrains.mps.baseLanguage.classifiers" version="0" />
<language slang="l:fd392034-7849-419d-9071-12563d152375:jetbrains.mps.baseLanguage.closures" version="0" />
<language slang="l:83888646-71ce-4f1c-9c53-c54016f6ad4f:jetbrains.mps.baseLanguage.collections" version="1" />
<language slang="l:f2801650-65d5-424e-bb1b-463a8781b786:jetbrains.mps.baseLanguage.javadoc" version="2" />
<language slang="l:c7d5b9dd-a05f-4be2-bc73-f2e16994cc67:jetbrains.mps.baseLanguage.lightweightdsl" version="1" />
<language slang="l:760a0a8c-eabb-4521-8bfd-65db761a9ba3:jetbrains.mps.baseLanguage.logging" version="0" />
<language slang="l:a247e09e-2435-45ba-b8d2-07e93feba96a:jetbrains.mps.baseLanguage.tuples" version="0" />
<language slang="l:aee9cad2-acd4-4608-aef2-0004f6a1cdbd:jetbrains.mps.lang.actions" version="4" />
<language slang="l:f159adf4-3c93-40f9-9c5a-1f245a8697af:jetbrains.mps.lang.aspect" version="2" />
<language slang="l:af65afd8-f0dd-4942-87d9-63a55f2a9db1:jetbrains.mps.lang.behavior" version="2" />
<language slang="l:fe9d76d7-5809-45c9-ae28-a40915b4d6ff:jetbrains.mps.lang.checkedName" version="1" />
<language slang="l:3f4bc5f5-c6c1-4a28-8b10-c83066ffa4a1:jetbrains.mps.lang.constraints" version="6" />
<language slang="l:e51810c5-7308-4642-bcb6-469e61b5dd18:jetbrains.mps.lang.constraints.msg.specification" version="0" />
<language slang="l:47257bf3-78d3-470b-89d9-8c3261a61d15:jetbrains.mps.lang.constraints.rules" version="0" />
Expand All @@ -53,7 +51,7 @@
<language slang="l:b3551702-269c-4f05-ba61-58060cef4292:jetbrains.mps.lang.rulesAndMessages" version="0" />
<language slang="l:d8f591ec-4d86-4af2-9f92-a9e93c803ffa:jetbrains.mps.lang.scopes" version="0" />
<language slang="l:13744753-c81f-424a-9c1b-cf8943bf4e86:jetbrains.mps.lang.sharedConcepts" version="0" />
<language slang="l:7866978e-a0f0-4cc7-81bc-4d213d9375e1:jetbrains.mps.lang.smodel" version="18" />
<language slang="l:7866978e-a0f0-4cc7-81bc-4d213d9375e1:jetbrains.mps.lang.smodel" version="19" />
<language slang="l:c72da2b9-7cce-4447-8389-f407dc1158b7:jetbrains.mps.lang.structure" version="9" />
<language slang="l:c7fb639f-be78-4307-89b0-b5959c3fa8c8:jetbrains.mps.lang.text" version="0" />
<language slang="l:9ded098b-ad6a-4657-bfd9-48636cfe8bc3:jetbrains.mps.lang.traceable" version="0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<model ref="r:bb3926f8-d6d5-4958-8599-28a05d13e549(com.fasten.base.git.behavior)">
<persistence version="9" />
<languages>
<use id="7866978e-a0f0-4cc7-81bc-4d213d9375e1" name="jetbrains.mps.lang.smodel" version="18" />
<use id="7866978e-a0f0-4cc7-81bc-4d213d9375e1" name="jetbrains.mps.lang.smodel" version="19" />
<use id="af65afd8-f0dd-4942-87d9-63a55f2a9db1" name="jetbrains.mps.lang.behavior" version="2" />
<devkit ref="fbc25dd2-5da4-483a-8b19-70928e1b62d7(jetbrains.mps.devkit.general-purpose)" />
</languages>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@
<module reference="0022e9df-2136-4ef8-81b2-08650aeb1dc7(de.itemis.mps.tooltips.runtime)" version="0" />
<module reference="f0fff802-6d26-4d2e-b89d-391357265626(de.slisson.mps.hacks.editor)" version="0" />
<module reference="f3061a53-9226-4cc5-a443-f952ceaf5816(jetbrains.mps.baseLanguage)" version="0" />
<module reference="c7d5b9dd-a05f-4be2-bc73-f2e16994cc67(jetbrains.mps.baseLanguage.lightweightdsl)" version="0" />
<module reference="e39e4a59-8cb6-498e-860e-8fa8361c0d90(jetbrains.mps.baseLanguage.scopes)" version="0" />
<module reference="2d3c70e9-aab2-4870-8d8d-6036800e4103(jetbrains.mps.kernel)" version="0" />
<module reference="ceab5195-25ea-4f22-9b92-103b95ca8c0c(jetbrains.mps.lang.core)" version="0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<language slang="l:001b2375-3bd5-4d5e-9958-6b3f62dc8548:com.mbeddr.formal.nusmv" version="0" />
<language slang="l:c0e6afd4-e20f-4e33-9970-004cf26b9bf6:com.mbeddr.formal.nusmv.ext" version="0" />
<language slang="l:5ccce04a-9411-450d-8af4-a858c6f99d1e:com.mbeddr.formal.ocra" version="0" />
<language slang="l:f3061a53-9226-4cc5-a443-f952ceaf5816:jetbrains.mps.baseLanguage" version="11" />
<language slang="l:f3061a53-9226-4cc5-a443-f952ceaf5816:jetbrains.mps.baseLanguage" version="12" />
<language slang="l:ceab5195-25ea-4f22-9b92-103b95ca8c0c:jetbrains.mps.lang.core" version="2" />
<language slang="l:9ded098b-ad6a-4657-bfd9-48636cfe8bc3:jetbrains.mps.lang.traceable" version="0" />
</languageVersions>
Expand Down
Loading

0 comments on commit 56ffcc0

Please sign in to comment.