From c144a56d3127a58671b2b2de7b0b83a74b427d66 Mon Sep 17 00:00:00 2001 From: Alexander Pann Date: Fri, 6 Sep 2024 12:12:31 +0200 Subject: [PATCH 01/14] doc.aspect.runtime: fix the classloading issue --- .../com.mbeddr.doc.aspect.runtime.msd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/languages/com.mbeddr.doc.aspect/solutions/com.mbeddr.doc.aspect.runtime/com.mbeddr.doc.aspect.runtime.msd b/code/languages/com.mbeddr.doc.aspect/solutions/com.mbeddr.doc.aspect.runtime/com.mbeddr.doc.aspect.runtime.msd index c69f9c126c2..ee45c4b4f42 100644 --- a/code/languages/com.mbeddr.doc.aspect/solutions/com.mbeddr.doc.aspect.runtime/com.mbeddr.doc.aspect.runtime.msd +++ b/code/languages/com.mbeddr.doc.aspect/solutions/com.mbeddr.doc.aspect.runtime/com.mbeddr.doc.aspect.runtime.msd @@ -1,12 +1,12 @@ - + - + From 8eb53d0de18e76c32eb95919717a6fc69ea38d72 Mon Sep 17 00:00:00 2001 From: Alexander Pann Date: Fri, 6 Sep 2024 20:12:10 +0200 Subject: [PATCH 02/14] mpsutil.margincell: use an anchestor cell when the attached cell can't be found --- CHANGELOG.md | 8 + .../com.mbeddr.mpsutil.review.readonly.mpl | 1 + .../languageModels/editor.mps | 31 ++++ .../languageModels/structure.mps | 25 +++ .../com/mbeddr/mpsutil/margincell/runtime.mps | 168 ++++++++++++++---- .../com/mbeddr/mpsutil/review/sandbox.mps | 49 +++++ 6 files changed, 243 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e14cc4628ef..765ca314bcb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is _loosely_ based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). The project does _not_ follow Semantic Versioning and the changes are simply documented in reverse chronological order, grouped by calendar month. +# September 2024 + +## com.mbeddr.mpsutil.margincell + +### Fixed + +- When the attached cell can't be found (e.g. it is collapsed), the next suitable anchestor cell is now used to align the margin cell. + # August 2024 ## com.mbeddr.mpsutil.traceExplorer diff --git a/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/com.mbeddr.mpsutil.review.readonly.mpl b/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/com.mbeddr.mpsutil.review.readonly.mpl index 557eade72ed..04f0c8a3ae0 100644 --- a/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/com.mbeddr.mpsutil.review.readonly.mpl +++ b/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/com.mbeddr.mpsutil.review.readonly.mpl @@ -20,6 +20,7 @@ + diff --git a/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/languageModels/editor.mps b/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/languageModels/editor.mps index 71beae8fe8f..f269d8feea7 100644 --- a/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/languageModels/editor.mps +++ b/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/languageModels/editor.mps @@ -6,6 +6,7 @@ + @@ -13,10 +14,14 @@ + + + + @@ -40,9 +45,11 @@ + + @@ -81,6 +88,15 @@ + + + + + + + + + @@ -119,5 +135,20 @@ + + + + + + + + + + + + + + + diff --git a/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/languageModels/structure.mps b/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/languageModels/structure.mps index 0a396ed3f27..5df587aaee6 100644 --- a/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/languageModels/structure.mps +++ b/code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.review.readonly/languageModels/structure.mps @@ -15,9 +15,13 @@ + + + + @@ -52,5 +56,26 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/code/languages/com.mbeddr.mpsutil/solutions/com.mbeddr.mpsutil.margincell.runtime/models/com/mbeddr/mpsutil/margincell/runtime.mps b/code/languages/com.mbeddr.mpsutil/solutions/com.mbeddr.mpsutil.margincell.runtime/models/com/mbeddr/mpsutil/margincell/runtime.mps index 8e0a9f01ffd..c9c97a23370 100644 --- a/code/languages/com.mbeddr.mpsutil/solutions/com.mbeddr.mpsutil.margincell.runtime/models/com/mbeddr/mpsutil/margincell/runtime.mps +++ b/code/languages/com.mbeddr.mpsutil/solutions/com.mbeddr.mpsutil.margincell.runtime/models/com/mbeddr/mpsutil/margincell/runtime.mps @@ -28,6 +28,7 @@ + @@ -282,6 +283,11 @@ + + + + + @@ -291,9 +297,6 @@ - - - @@ -801,6 +804,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1141,8 +1171,17 @@ - - + + + + + + + + + + + @@ -1156,8 +1195,8 @@ - - + + @@ -1166,46 +1205,88 @@ + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - + + + @@ -3888,13 +3969,22 @@ - - - - + + + + + + + + + + + + + - - + + diff --git a/code/languages/com.mbeddr.mpsutil/solutions/com.mbeddr.mpsutil.review.sandbox/models/com/mbeddr/mpsutil/review/sandbox.mps b/code/languages/com.mbeddr.mpsutil/solutions/com.mbeddr.mpsutil.review.sandbox/models/com/mbeddr/mpsutil/review/sandbox.mps index 43cbd847700..86bfb57d4cd 100644 --- a/code/languages/com.mbeddr.mpsutil/solutions/com.mbeddr.mpsutil.review.sandbox/models/com/mbeddr/mpsutil/review/sandbox.mps +++ b/code/languages/com.mbeddr.mpsutil/solutions/com.mbeddr.mpsutil.review.sandbox/models/com/mbeddr/mpsutil/review/sandbox.mps @@ -56,6 +56,10 @@ + + + + @@ -243,5 +247,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From beac1bcceb27873a5263af209dae59328f18b4e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergej=20Ko=C5=A1=C4=8Dejev?= Date: Fri, 26 Jul 2024 17:59:16 +0200 Subject: [PATCH 03/14] build: move settings.gradle to Kotlin --- settings.gradle | 17 ----------------- settings.gradle.kts | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 17 deletions(-) delete mode 100644 settings.gradle create mode 100644 settings.gradle.kts diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index bed32600e9b..00000000000 --- a/settings.gradle +++ /dev/null @@ -1,17 +0,0 @@ -pluginManagement { - repositories { - maven { url 'https://artifacts.itemis.cloud/repository/maven-mps/' } - gradlePluginPortal() - } -} - -include ":build:com.mbeddr", - ":build:com.mbeddr:platform", - ":build:com.mbeddr:languages", - ":build:com.mbeddr:distribution", - ":build:publishing" - -include ":BigProject" -project(":BigProject").projectDir = file('tools/BigProject') - -rootProject.name = 'mbeddr.core' diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 00000000000..4c334056835 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,17 @@ +pluginManagement { + repositories { + maven("https://artifacts.itemis.cloud/repository/maven-mps/") + gradlePluginPortal() + } +} + +include(":build:com.mbeddr", + ":build:com.mbeddr:platform", + ":build:com.mbeddr:languages", + ":build:com.mbeddr:distribution", + ":build:publishing") + +include(":BigProject") +project(":BigProject").projectDir = file("tools/BigProject") + +rootProject.name = "mbeddr.core" From 47c4d1a0e273ee7d807d2aeb49dfc921f5765c51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergej=20Ko=C5=A1=C4=8Dejev?= Date: Fri, 26 Jul 2024 18:03:51 +0200 Subject: [PATCH 04/14] build: move Gradle files from build/ to subprojects/ --- .gitignore | 9 ++++----- settings.gradle.kts | 19 ++++++++++++++----- .../com.mbeddr.allScripts/build.xml | 0 subprojects/com.mbeddr/.gitignore | 1 + .../com.mbeddr/build.gradle | 0 .../com.mbeddr/distribution/build.gradle | 0 subprojects/com.mbeddr/languages/.gitignore | 1 + .../com.mbeddr/languages/build.gradle | 0 subprojects/com.mbeddr/platform/.gitignore | 1 + .../com.mbeddr/platform/build.gradle | 0 .../publishing/build.gradle | 0 11 files changed, 21 insertions(+), 10 deletions(-) rename {build => subprojects}/com.mbeddr.allScripts/build.xml (100%) create mode 100644 subprojects/com.mbeddr/.gitignore rename {build => subprojects}/com.mbeddr/build.gradle (100%) rename {build => subprojects}/com.mbeddr/distribution/build.gradle (100%) create mode 100644 subprojects/com.mbeddr/languages/.gitignore rename {build => subprojects}/com.mbeddr/languages/build.gradle (100%) create mode 100644 subprojects/com.mbeddr/platform/.gitignore rename {build => subprojects}/com.mbeddr/platform/build.gradle (100%) rename {build => subprojects}/publishing/build.gradle (100%) diff --git a/.gitignore b/.gitignore index 33969c76fd3..93e7a3577f4 100644 --- a/.gitignore +++ b/.gitignore @@ -147,8 +147,6 @@ code/languages/offline.sh # CBMC analyses results temporary files code/*/xmlCBMCRawOutput/* -/build/**/*.xml -/build/com.mbeddr.allScripts/build.xml # ----------------------------------------------------------- # tutorial build @@ -176,16 +174,17 @@ gradle.properties **/.gradle/* **/scripts/* **/MPS/* -**/build/repo/ -**/build/distributions -**/build/classes antlib.xml **/code/languages/myDependencies **/.settings/org.eclipse.buildship.core.prefs **/.project + +/build/ + # ecore transformation tools code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.ecoretransofmation.sandbox + # ----------------------------------------------------------- # Visual Studio Code settings .vscode diff --git a/settings.gradle.kts b/settings.gradle.kts index 4c334056835..211c14d1848 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -5,11 +5,20 @@ pluginManagement { } } -include(":build:com.mbeddr", - ":build:com.mbeddr:platform", - ":build:com.mbeddr:languages", - ":build:com.mbeddr:distribution", - ":build:publishing") +val subprojectPaths = listOf("com.mbeddr", + "com.mbeddr:platform", + "com.mbeddr:languages", + "com.mbeddr:distribution", + "publishing") + +fun fqpath(path: String) = ":build:$path" +fun dir(path: String) = file("subprojects/" + path.replace(':', '/')) + +include(*subprojectPaths.map(::fqpath).toTypedArray()) + +for (path in subprojectPaths) { + project(fqpath(path)).projectDir = dir(path) +} include(":BigProject") project(":BigProject").projectDir = file("tools/BigProject") diff --git a/build/com.mbeddr.allScripts/build.xml b/subprojects/com.mbeddr.allScripts/build.xml similarity index 100% rename from build/com.mbeddr.allScripts/build.xml rename to subprojects/com.mbeddr.allScripts/build.xml diff --git a/subprojects/com.mbeddr/.gitignore b/subprojects/com.mbeddr/.gitignore new file mode 100644 index 00000000000..84c048a73cc --- /dev/null +++ b/subprojects/com.mbeddr/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/build/com.mbeddr/build.gradle b/subprojects/com.mbeddr/build.gradle similarity index 100% rename from build/com.mbeddr/build.gradle rename to subprojects/com.mbeddr/build.gradle diff --git a/build/com.mbeddr/distribution/build.gradle b/subprojects/com.mbeddr/distribution/build.gradle similarity index 100% rename from build/com.mbeddr/distribution/build.gradle rename to subprojects/com.mbeddr/distribution/build.gradle diff --git a/subprojects/com.mbeddr/languages/.gitignore b/subprojects/com.mbeddr/languages/.gitignore new file mode 100644 index 00000000000..84c048a73cc --- /dev/null +++ b/subprojects/com.mbeddr/languages/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/build/com.mbeddr/languages/build.gradle b/subprojects/com.mbeddr/languages/build.gradle similarity index 100% rename from build/com.mbeddr/languages/build.gradle rename to subprojects/com.mbeddr/languages/build.gradle diff --git a/subprojects/com.mbeddr/platform/.gitignore b/subprojects/com.mbeddr/platform/.gitignore new file mode 100644 index 00000000000..84c048a73cc --- /dev/null +++ b/subprojects/com.mbeddr/platform/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/build/com.mbeddr/platform/build.gradle b/subprojects/com.mbeddr/platform/build.gradle similarity index 100% rename from build/com.mbeddr/platform/build.gradle rename to subprojects/com.mbeddr/platform/build.gradle diff --git a/build/publishing/build.gradle b/subprojects/publishing/build.gradle similarity index 100% rename from build/publishing/build.gradle rename to subprojects/publishing/build.gradle From d68f8868012dbf6aae4a73f5b5eacff4aa1a6ec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergej=20Ko=C5=A1=C4=8Dejev?= Date: Sun, 1 Sep 2024 10:12:49 +0200 Subject: [PATCH 05/14] Clean up .gitignore --- .gitignore | 198 +++++------------------------------------------------ 1 file changed, 16 insertions(+), 182 deletions(-) diff --git a/.gitignore b/.gitignore index 93e7a3577f4..186e81410e8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,189 +1,24 @@ # ----------------------------------------------------------- # General - -distros/* -MPS/* -mps-distrib/* -artifacts/* - -.ant_targets -.DS_Store -.metadata -.svn -*.synctex.gz -*.aux -*.log -*.*.synctex.gz -*.*.aux -*.*.log -*.class - -.idea -workspace.xml - - -junitvmwatcher*.properties -build.properties -TEST-*.xml -junit*.properties - -classes_gen -doc_gen -source_gen -source_gen.caches -result_gen -jimple_gen - -# ----------------------------------------------------------- -# Type Size Config -code/languages/com.mbeddr.build/_spreferences -code/languages/com.mbeddr.mpsutil/_spreferences - -# ----------------------------------------------------------- -# * build -build/**/build -build/allInOne -build/jbrDownload - -# ----------------------------------------------------------- -# * diagrams -code/languages/com.mbeddr.core/diagrams/*.dot -code/languages/com.mbeddr.core/diagrams/*.gv -code/languages/com.mbeddr.core/diagrams/*.png -code/languages/com.mbeddr.ext/diagrams/*.dot -code/languages/com.mbeddr.ext/diagrams/*.gv -code/languages/com.mbeddr.ext/diagrams/*.png - -# ----------------------------------------------------------- -# * lib - here we seem to need the generated sources. -code/languages/*/lib/*/classes_gen -code/languages/*/lib/*/source_gen.caches - - - -# ----------------------------------------------------------- -# * tests -test_gen -test_gen.caches -analyses_results - - - - -# ----------------------------------------------------------- -# * project settings -code/languages/*/*.iws -code/languages/*/build.properties -code/languages/*/TEST*.xml - -# ----------------------------------------------------------- -# applications -code/applications/*/*.iws -code/applications/*/build.properties - -#----------------------------------------------------------- -# tests -code/languages/*/solutions/*/test_gen.caches/ -code/languages/*/solutions/*/test_gen/ - - -# ----------------------------------------------------------- -# documents -deliverables/*/*.aux -deliverables/*/*.bbl -deliverables/*/*.blg -deliverables/*/*.dvi -deliverables/*/*.log -deliverables/*/*.out -deliverables/*/*.toc - -documentation/*/*.aux -documentation/*/*.bbl -documentation/*/*.blg -documentation/*/*.dvi -documentation/*/*.log -documentation/*/*.out -documentation/*/*.toc -documentation/*/*.synctex.gz - -documentation/userguide/*.pdf -documentation/build - - -# ---------------------------------------------------- -# result files from the NuSMV unit tests -code/languages/com.mbeddr.ext/result.txt -code/languages/com.mbeddr.ext/result.xml - -# ---------------------------------------------------- -# result files from the cbmc unit tests -source_gentest.analyses.cbmc.testcode_nightly_nightly.html - -# ----------------------------------------------------------- -# tools -tools/zgrviewer/zgrviewerformps/target/* -tools/zgrviewer/zvtm-core-formps/target/* - -# ----------------------------------------------------------- -# compiled java classes within the ant-task eclipse workspace -ant-task-workspace/*/bin/ - -# ----------------------------------------------------------- -# debugger test code -code/languages/com.mbeddr.debugger/tests/test.debugger.cdt/testcode/a.* -code/languages/com.mbeddr.debugger/tests/test.debugger.cdt/testcode/*.exe -code/languages/com.mbeddr.debugger/tests/test.debugger.cdt/testcode/debuggableTest* -code/languages/com.mbeddr.debugger/tests/test.debugger.cdt/testcode/debuggableTest -code/languages/com.mbeddr.debugger/tests/test.debugger.cdt/testcode/ - -# other test resources -code/languages/com.mbeddr.mpsutil/tests/test.com.mbeddr.mpsutil.iconchar/icons/ - -#Some local script (not to be shared) -code/languages/offline.sh - -# ----------------------------------------------------------- -# CBMC analyses results temporary files -code/*/xmlCBMCRawOutput/* - - -# ----------------------------------------------------------- -# tutorial build - -build/com.mbeddr.tutorial/null/*.puml -applications/tutorial/solutions/mbeddr.tutorial.main/temp/ - -# ----------------------------------------------------------- -# IntelliJ debugging info -*.iml - -# Generated visualizations -*.puml -_vis/*.png -code/applications/tutorial/solutions/com.mbeddr.tutorial.documentation/_vis -tools/ant/ant-task-workspace/MakeTestsTask/out/artifacts -tools/ant/ant-task-workspace/TeamcityMakeTests/bin/com -code/plugins/sl-all/build-tests.xml -code/plugins/sl-all/build.xml -tmp - -# ----------------------------------------------------------- -# gradle files -gradle.properties -**/.gradle/* -**/scripts/* -**/MPS/* -antlib.xml -**/code/languages/myDependencies -**/.settings/org.eclipse.buildship.core.prefs -**/.project - /build/ +/artifacts/ +/scripts/ +/.gradle/ +/MPS/ +/tmp/ + +.idea/ +**/.mps/workspace.xml + +classes_gen/ +doc_gen/ +source_gen/ +source_gen.caches/ +test_gen/ +test_gen.caches/ -# ecore transformation tools -code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.ecoretransofmation.sandbox - +gradle.properties # ----------------------------------------------------------- # Visual Studio Code settings @@ -193,4 +28,3 @@ code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.ecoretransofmatio /config/ /system/ -markdown-navigator** From 926908c4c343c8c688fa7393c377d3041cf3c9af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergej=20Ko=C5=A1=C4=8Dejev?= Date: Sat, 27 Jul 2024 16:57:23 +0200 Subject: [PATCH 06/14] Move all scripts script to project root --- .../build.xml => build-allScripts.xml | 4 ++-- .../models/com/mbeddr/allScripts/build.mps | 19 ++++++++++++++++++- subprojects/com.mbeddr/platform/build.gradle | 10 ++++------ 3 files changed, 24 insertions(+), 9 deletions(-) rename subprojects/com.mbeddr.allScripts/build.xml => build-allScripts.xml (99%) diff --git a/subprojects/com.mbeddr.allScripts/build.xml b/build-allScripts.xml similarity index 99% rename from subprojects/com.mbeddr.allScripts/build.xml rename to build-allScripts.xml index 7e57bc4a61d..8a93e487354 100644 --- a/subprojects/com.mbeddr.allScripts/build.xml +++ b/build-allScripts.xml @@ -1,11 +1,11 @@ - + - + diff --git a/code/languages/com.mbeddr.build/solutions/com.mbeddr.allScripts/models/com/mbeddr/allScripts/build.mps b/code/languages/com.mbeddr.build/solutions/com.mbeddr.allScripts/models/com/mbeddr/allScripts/build.mps index 1b60a9b1f4f..049129d49f1 100644 --- a/code/languages/com.mbeddr.build/solutions/com.mbeddr.allScripts/models/com/mbeddr/allScripts/build.mps +++ b/code/languages/com.mbeddr.build/solutions/com.mbeddr.allScripts/models/com/mbeddr/allScripts/build.mps @@ -47,7 +47,9 @@ + + @@ -150,7 +152,8 @@ - + + @@ -1276,6 +1279,9 @@ + + + @@ -1380,6 +1386,17 @@ + + + + + + + + + + + diff --git a/subprojects/com.mbeddr/platform/build.gradle b/subprojects/com.mbeddr/platform/build.gradle index 604c0d274d3..d10fd3c717a 100755 --- a/subprojects/com.mbeddr/platform/build.gradle +++ b/subprojects/com.mbeddr/platform/build.gradle @@ -43,12 +43,10 @@ task build_allScripts(type: BuildLanguages, dependsOn: [resolve_mps, resolve_mps println "##teamcity[buildNumber '${mbeddrPlatformBuildNumber}']" } } - script rootProject.file('build/com.mbeddr.allScripts/build.xml') - // Next is to tell gradle there's output under specified folder. - // Gradle looks into locations during 'configuration' phase, and can't guess the build.xml script (above) - // produces anything into artifacts/..., and from time to time considers package_allScripts Zip task - // as having NO-SOURCE, and ignores the task - outputs.dir(new File(artifactsDir, 'com.mbeddr.allScripts.build/')) + script rootProject.file('build-allScripts.xml') + + // Need to override basedir until https://github.com/JetBrains/MPS/pull/73 is merged or otherwise fixed. + scriptArgs = ["-Dbasedir=${rootProject.file('code/languages/com.mbeddr.build')}"] } task copy_allScripts(type: Copy, dependsOn: build_allScripts) { From 26fa325e3545d838cce0e76f134d5912c8138116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergej=20Ko=C5=A1=C4=8Dejev?= Date: Sat, 27 Jul 2024 17:02:49 +0200 Subject: [PATCH 07/14] build-allScripts: simplify * Remove unnecessary path variables * Remove default value of mps.home --- build-allScripts.xml | 240 +++--- .../models/com/mbeddr/allScripts/build.mps | 770 ++++++------------ 2 files changed, 358 insertions(+), 652 deletions(-) diff --git a/build-allScripts.xml b/build-allScripts.xml index 8a93e487354..c5c30c9baf7 100644 --- a/build-allScripts.xml +++ b/build-allScripts.xml @@ -4,16 +4,13 @@ - - - - + - + @@ -113,21 +110,21 @@ - - + + - + - + - + @@ -156,21 +153,21 @@ - - + + - + - + - + @@ -196,21 +193,21 @@ - - + + - + - + - + @@ -236,21 +233,21 @@ - - + + - + - + - + @@ -276,21 +273,21 @@ - - + + - + - + - + @@ -316,21 +313,21 @@ - - + + - + - + - + @@ -356,21 +353,21 @@ - - + + - + - + - + @@ -398,21 +395,21 @@ - - + + - + - + - + @@ -438,21 +435,21 @@ - - + + - + - + - + @@ -479,21 +476,21 @@ - - + + - + - + - + @@ -521,21 +518,21 @@ - - + + - + - + - + @@ -560,21 +557,21 @@ - - + + - + - + - + @@ -710,17 +707,17 @@ - - - - - - - - - - - + + + + + + + + + + + @@ -729,9 +726,6 @@ - - - @@ -740,12 +734,12 @@ - + - + @@ -765,19 +759,19 @@ - + - + - + @@ -787,19 +781,19 @@ - + - + - + @@ -808,19 +802,19 @@ - + - + - + @@ -829,19 +823,19 @@ - + - + - + @@ -850,19 +844,19 @@ - + - + - + @@ -871,19 +865,19 @@ - + - + - + @@ -892,38 +886,38 @@ - + - + - + - + - + - + @@ -931,19 +925,19 @@ - + - + - + @@ -951,19 +945,19 @@ - + - + - + @@ -972,23 +966,23 @@ - + - - - - - - - - - - - + + + + + + + + + + + \ No newline at end of file diff --git a/code/languages/com.mbeddr.build/solutions/com.mbeddr.allScripts/models/com/mbeddr/allScripts/build.mps b/code/languages/com.mbeddr.build/solutions/com.mbeddr.allScripts/models/com/mbeddr/allScripts/build.mps index 049129d49f1..359835e4f15 100644 --- a/code/languages/com.mbeddr.build/solutions/com.mbeddr.allScripts/models/com/mbeddr/allScripts/build.mps +++ b/code/languages/com.mbeddr.build/solutions/com.mbeddr.allScripts/models/com/mbeddr/allScripts/build.mps @@ -39,9 +39,7 @@ - - - + @@ -152,8 +150,8 @@ - + @@ -235,27 +233,6 @@ - - - - - - - - - - - - - - - - - - - - - @@ -276,21 +253,11 @@ - - - - - - - - - - - - - - - + + + + + @@ -300,24 +267,34 @@ - - - - + + + - + - + - + + + + + + + + + + + + @@ -326,27 +303,6 @@ - - - - - - - - - - - - - - - - - - - - - @@ -377,21 +333,11 @@ - - - - - - - - - - - - - - - + + + + + @@ -401,50 +347,39 @@ - - - - + + + - + - + - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - @@ -470,21 +405,11 @@ - - - - - - - - - - - - - - - + + + + + @@ -494,50 +419,39 @@ - - - - + + + - + - + - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - @@ -563,21 +477,11 @@ - - - - - - - - - - - - - - - + + + + + @@ -587,50 +491,39 @@ - - - - + + + - + - + - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - @@ -656,21 +549,11 @@ - - - - - - - - - - - - - - - + + + + + @@ -680,50 +563,39 @@ - - - - + + + - + - + - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - @@ -749,21 +621,11 @@ - - - - - - - - - - - - - - - + + + + + @@ -773,50 +635,39 @@ - - - - + + + - + - + - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - @@ -842,21 +693,11 @@ - - - - - - - - - - - - - - - + + + + + @@ -866,24 +707,34 @@ - - - - + + + - + - + - + + + + + + + + + + + + @@ -892,27 +743,6 @@ - - - - - - - - - - - - - - - - - - - - - @@ -928,21 +758,11 @@ - - - - - - - - - - - - - - - + + + + + @@ -952,46 +772,46 @@ - - - - + + + - + - + - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + @@ -1011,21 +831,11 @@ - - - - - - - - - - - - - - - + + + + + @@ -1036,13 +846,12 @@ - - - + + - + - + @@ -1066,27 +875,6 @@ - - - - - - - - - - - - - - - - - - - - - @@ -1107,21 +895,11 @@ - - - - - - - - - - - - - - - + + + + + @@ -1131,24 +909,34 @@ - - - - + + + - + - + - + + + + + + + + + + + + @@ -1159,27 +947,6 @@ - - - - - - - - - - - - - - - - - - - - - @@ -1205,21 +972,11 @@ - - - - - - - - - - - - - - - + + + + + @@ -1229,86 +986,38 @@ - - - - + + + - + - + - + - - - - - - - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -1370,8 +1079,11 @@ - - + + + + + From 1fae059942de806dce748b8d0bb2901cc435b000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergej=20Ko=C5=A1=C4=8Dejev?= Date: Sat, 31 Aug 2024 14:38:47 +0200 Subject: [PATCH 08/14] build: do not apply plugins in 'subprojects' Each subproject now applies the plugins it needs explicitly. This is a step away from cross-project configuration which is now considered bad practice. --- build.gradle | 4 ---- subprojects/com.mbeddr/build.gradle | 5 +++++ subprojects/com.mbeddr/languages/build.gradle | 5 +++++ subprojects/com.mbeddr/platform/build.gradle | 5 +++++ 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index 02817456bef..de581210200 100644 --- a/build.gradle +++ b/build.gradle @@ -86,10 +86,6 @@ ext.additionalPomInfo = { } subprojects { - // required plugins - apply plugin: "base" - apply plugin: "maven-publish" - ext.mbeddrMajor = mpsMajor.replaceFirst(/(\d{4})\.(\d)/) { all, major, minor -> major } ext.mbeddrMinor = mpsMajor.replaceFirst(/(\d{4})\.(\d)/) { all, major, minor -> minor } diff --git a/subprojects/com.mbeddr/build.gradle b/subprojects/com.mbeddr/build.gradle index 1fabe448a54..a7c3f4d216a 100755 --- a/subprojects/com.mbeddr/build.gradle +++ b/subprojects/com.mbeddr/build.gradle @@ -1,3 +1,8 @@ +plugins { + id 'base' + id 'maven-publish' +} + // path variables // If mpsHomeDir is set explicitly, skip the MPS resolution step and use the explicit path (which may be relative from // the root directory). diff --git a/subprojects/com.mbeddr/languages/build.gradle b/subprojects/com.mbeddr/languages/build.gradle index 073f518dddd..91f25363af5 100755 --- a/subprojects/com.mbeddr/languages/build.gradle +++ b/subprojects/com.mbeddr/languages/build.gradle @@ -1,5 +1,10 @@ import de.itemis.mps.gradle.* +plugins { + id 'base' + id 'maven-publish' +} + // :build:com.mbeddr.build def script_build_mbeddr = new File(scriptsBasePath + "/com.mbeddr.build/" + "build.xml") diff --git a/subprojects/com.mbeddr/platform/build.gradle b/subprojects/com.mbeddr/platform/build.gradle index d10fd3c717a..e215c6bd4a2 100755 --- a/subprojects/com.mbeddr/platform/build.gradle +++ b/subprojects/com.mbeddr/platform/build.gradle @@ -1,3 +1,8 @@ +plugins { + id 'base' + id 'maven-publish' +} + import de.itemis.mps.gradle.* def script_test_mbeddrPlatform = new File(scriptsBasePath + "/com.mbeddr.platform/" + "build-ts-tests.xml") From 621a70ddbf7b37932e6bea4b0e0055c191cd2575 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergej=20Ko=C5=A1=C4=8Dejev?= Date: Tue, 20 Aug 2024 08:33:03 +0200 Subject: [PATCH 09/14] Strip `:build` prefix from Gradle project names --- settings.gradle.kts | 2 +- subprojects/com.mbeddr/distribution/build.gradle | 4 ++-- subprojects/com.mbeddr/languages/build.gradle | 12 ++++++------ subprojects/com.mbeddr/platform/build.gradle | 4 ++-- subprojects/publishing/build.gradle | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/settings.gradle.kts b/settings.gradle.kts index 211c14d1848..fe5590b300f 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -11,7 +11,7 @@ val subprojectPaths = listOf("com.mbeddr", "com.mbeddr:distribution", "publishing") -fun fqpath(path: String) = ":build:$path" +fun fqpath(path: String) = ":$path" fun dir(path: String) = file("subprojects/" + path.replace(':', '/')) include(*subprojectPaths.map(::fqpath).toTypedArray()) diff --git a/subprojects/com.mbeddr/distribution/build.gradle b/subprojects/com.mbeddr/distribution/build.gradle index 2befce9e394..b942e242076 100644 --- a/subprojects/com.mbeddr/distribution/build.gradle +++ b/subprojects/com.mbeddr/distribution/build.gradle @@ -25,7 +25,7 @@ task resolve_mbeddr() { def script_build_mbeddrAllInOne = new File(scriptsBasePath + "/com.mbeddr.allInOne/" + "build.xml") -task build_all_in_one(type: BuildLanguages, dependsOn: [':build:com.mbeddr:platform:copy_allScripts', resolve_mbeddr]) { +task build_all_in_one(type: BuildLanguages, dependsOn: [':com.mbeddr:platform:copy_allScripts', resolve_mbeddr]) { script script_build_mbeddrAllInOne } @@ -35,4 +35,4 @@ task package_tutorial(type: Zip) { archiveFileName = "com.mbeddr.tutorial.zip" } -task prepare_distribution(dependsOn: [build_all_in_one, ':build:com.mbeddr:platform:build_platform_distribution', package_tutorial]) +task prepare_distribution(dependsOn: [build_all_in_one, ':com.mbeddr:platform:build_platform_distribution', package_tutorial]) diff --git a/subprojects/com.mbeddr/languages/build.gradle b/subprojects/com.mbeddr/languages/build.gradle index 91f25363af5..192d2254115 100755 --- a/subprojects/com.mbeddr/languages/build.gradle +++ b/subprojects/com.mbeddr/languages/build.gradle @@ -5,7 +5,7 @@ plugins { id 'maven-publish' } -// :build:com.mbeddr.build +// :com.mbeddr.build def script_build_mbeddr = new File(scriptsBasePath + "/com.mbeddr.build/" + "build.xml") ant.taskdef(name: "makeTests", @@ -48,7 +48,7 @@ task resolve_mbeddr_platform() { //move spawner into mbeddr script -task build_spawner(type: BuildLanguages, dependsOn: ':build:com.mbeddr:platform:copy_allScripts') { +task build_spawner(type: BuildLanguages, dependsOn: ':com.mbeddr:platform:copy_allScripts') { script scriptFile('com.mbeddr.build/spawner.xml') } @@ -57,7 +57,7 @@ task copy_spawner(type: Copy, dependsOn: build_spawner) { into "$mpsHomeDir/plugins" } -task copy_logConfig(type: Copy, dependsOn: ':build:com.mbeddr:platform:copy_allScripts') { +task copy_logConfig(type: Copy, dependsOn: ':com.mbeddr:platform:copy_allScripts') { from "$rootDir/debug" into "$mpsHomeDir/bin" } @@ -67,7 +67,7 @@ task install_spawner(type: Copy, dependsOn: build_spawner) { include "mbeddr.spawner/" into "$mpsPluginsDir" } -tasks.getByPath(':build:com.mbeddr:install').dependsOn install_spawner +tasks.getByPath(':com.mbeddr:install').dependsOn install_spawner ant.taskdef(name: 'junit', classname: 'org.apache.tools.ant.taskdefs.optional.junit.JUnitTask', classpath: configurations.junitAnt.asPath) @@ -82,7 +82,7 @@ def usePrebuiltPlatform = ciBuild && !project.hasProperty('forceBuildPlatform') if (usePrebuiltPlatform) { mbeddrDependencies = [copy_spawner, resolve_mbeddr_platform] } else { - mbeddrDependencies = [copy_spawner, ':build:com.mbeddr:platform:build_platform'] + mbeddrDependencies = [copy_spawner, ':com.mbeddr:platform:build_platform'] } task build_mbeddr(type: BuildLanguages, dependsOn: mbeddrDependencies) { @@ -224,7 +224,7 @@ publishing { task publishMbeddrToLocal (dependsOn: ['publishMbeddrPublicationToMavenLocal', -':build:com.mbeddr:platform:publishMbeddrPlatformToLocal']) {} +':com.mbeddr:platform:publishMbeddrPlatformToLocal']) {} //mbeddr build is "master" also for maintenance branches //using the closure to delay evaluate from configuration to execution phase is important because the diff --git a/subprojects/com.mbeddr/platform/build.gradle b/subprojects/com.mbeddr/platform/build.gradle index e215c6bd4a2..2ac12b03f61 100755 --- a/subprojects/com.mbeddr/platform/build.gradle +++ b/subprojects/com.mbeddr/platform/build.gradle @@ -74,7 +74,7 @@ task install_nativelibs_loader(type: Copy, dependsOn: resolve_extensions) { include "de.itemis.mps.nativelibs.loader/" into "$mpsPluginsDir" } -tasks.getByPath(':build:com.mbeddr:install').dependsOn install_nativelibs_loader +tasks.getByPath(':com.mbeddr:install').dependsOn install_nativelibs_loader */ task build_platform(type: BuildLanguages, dependsOn: copy_allScripts) { @@ -89,7 +89,7 @@ task install_actionsfilter(type: Copy, dependsOn: build_platform) { include "com.mbeddr.mpsutil.actionsfilter/" into "$mpsPluginsDir" } -tasks.getByPath(':build:com.mbeddr:install').dependsOn install_actionsfilter +tasks.getByPath(':com.mbeddr:install').dependsOn install_actionsfilter task test_mbeddr_platform(type: TestLanguages, dependsOn: build_platform) { script script_test_mbeddrPlatform diff --git a/subprojects/publishing/build.gradle b/subprojects/publishing/build.gradle index 2b075ce1e28..d79d8aa9387 100644 --- a/subprojects/publishing/build.gradle +++ b/subprojects/publishing/build.gradle @@ -43,7 +43,7 @@ githubRelease { } tasks.register('renameTutorial') { - dependsOn(':build:com.mbeddr:distribution:package_tutorial') + dependsOn(':com.mbeddr:distribution:package_tutorial') doLast { def dir = Paths.get(artifactsRoot, 'com.mbeddr.tutorial') Files.copy( @@ -55,7 +55,7 @@ tasks.register('renameTutorial') { } tasks.register('renamePlatform') { - dependsOn(':build:com.mbeddr:platform:build_platform_distribution') + dependsOn(':com.mbeddr:platform:build_platform_distribution') doLast { def dir = Paths.get(artifactsRoot, 'com.mbeddr.platform.distribution') Files.copy( From c8c51519bbc4cd0bba7fc7fb515c5dcb2512245c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergej=20Ko=C5=A1=C4=8Dejev?= Date: Sat, 31 Aug 2024 15:22:59 +0200 Subject: [PATCH 10/14] Remove unused variables --- subprojects/com.mbeddr/build.gradle | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/subprojects/com.mbeddr/build.gradle b/subprojects/com.mbeddr/build.gradle index a7c3f4d216a..3888a59d320 100755 --- a/subprojects/com.mbeddr/build.gradle +++ b/subprojects/com.mbeddr/build.gradle @@ -65,14 +65,8 @@ String buildVersion = '-Dbuild=' + ext.mbeddrBuildNumber String majorVersion = '-Dmajor.version=' + ext.mbeddrMajor String minorVersion = '-Dminor.version=' + ext.mbeddrMinor ext.mbeddr_home = ['-Dmbeddr.github.core.home=' + file(rootProject.projectDir.absolutePath).getAbsolutePath(), minorVersion, majorVersion, buildVersion] -ext.slall_home = ['-Dsl-all.home=' + file(artifactsDir.absolutePath + '/de.itemis.mps.extensions').getAbsolutePath(), minorVersion, majorVersion, buildVersion] ext.dependsOnMPS_scriptArgs = [mps_home, build_dir, artifacts_root] -ext["itemis.mps.gradle.ant.defaultScriptArgs"] = ext.dependsOnMbeddr_scriptArgs = [*dependsOnMPS_scriptArgs, *mbeddr_home, *slall_home] - -// path locations -ext.mbeddrScripts_basePath = file(ant.properties['mbeddr.github.core.home'] + "/build").getAbsolutePath() -ext.allScripts_buildFileLocation = file(mbeddrScripts_basePath + "/" + "com.mbeddr.allScripts").getAbsolutePath() -ext.slAll_buildFileLocation = file(ant.properties['mbeddr.github.core.home'] + "/scripts" + "/" + "sl-all").getAbsolutePath() +ext["itemis.mps.gradle.ant.defaultScriptArgs"] = ext.dependsOnMbeddr_scriptArgs = [*dependsOnMPS_scriptArgs, *mbeddr_home] // ant script locations ext.scriptsBasePath = rootProject.file("scripts").absolutePath From 4b27ec8a2a1a18c3bda30850d16dd4e030137dd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergej=20Ko=C5=A1=C4=8Dejev?= Date: Sat, 31 Aug 2024 15:21:08 +0200 Subject: [PATCH 11/14] Create a map of system properties passed to Ant --- subprojects/com.mbeddr/build.gradle | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/subprojects/com.mbeddr/build.gradle b/subprojects/com.mbeddr/build.gradle index 3888a59d320..7f962d8aa93 100755 --- a/subprojects/com.mbeddr/build.gradle +++ b/subprojects/com.mbeddr/build.gradle @@ -58,15 +58,19 @@ logger.info "jdk_home: $jdk_home" ext.artifactsDir = file(rootProject.projectDir.absolutePath + "/artifacts") -ext.mps_home = '-Dmps.home=' + mpsHomeDir.getAbsolutePath() -ext.build_dir = '-Dbuild.dir=' + file(rootProject.projectDir.absolutePath).getAbsolutePath() -ext.artifacts_root = '-Dartifacts.root=' + file(rootProject.projectDir.absolutePath + "/artifacts").getAbsolutePath() -String buildVersion = '-Dbuild=' + ext.mbeddrBuildNumber -String majorVersion = '-Dmajor.version=' + ext.mbeddrMajor -String minorVersion = '-Dminor.version=' + ext.mbeddrMinor -ext.mbeddr_home = ['-Dmbeddr.github.core.home=' + file(rootProject.projectDir.absolutePath).getAbsolutePath(), minorVersion, majorVersion, buildVersion] -ext.dependsOnMPS_scriptArgs = [mps_home, build_dir, artifacts_root] -ext["itemis.mps.gradle.ant.defaultScriptArgs"] = ext.dependsOnMbeddr_scriptArgs = [*dependsOnMPS_scriptArgs, *mbeddr_home] +Map antSystemProperties = [ + 'mps.home': mpsHomeDir, + 'build.dir': rootProject.layout.projectDirectory, + 'artifacts.root': rootProject.file('artifacts'), + 'mbeddr.github.core.home': rootProject.layout.projectDirectory, + 'build': mbeddrBuildNumber, + 'major.version': mbeddrMajor, + 'minor.version': mbeddrMinor, +] + + +ext["itemis.mps.gradle.ant.defaultScriptArgs"] = ext.dependsOnMbeddr_scriptArgs = + antSystemProperties.collect { "-D${it.key}=${it.value}".toString() } // ant script locations ext.scriptsBasePath = rootProject.file("scripts").absolutePath From a4fe1b1644cb18e735329847db8c8ee76f1bd2b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergej=20Ko=C5=A1=C4=8Dejev?= Date: Sat, 31 Aug 2024 15:26:56 +0200 Subject: [PATCH 12/14] Pass JNA library path to Ant --- subprojects/com.mbeddr/build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/subprojects/com.mbeddr/build.gradle b/subprojects/com.mbeddr/build.gradle index 7f962d8aa93..5c27ba1ffd0 100755 --- a/subprojects/com.mbeddr/build.gradle +++ b/subprojects/com.mbeddr/build.gradle @@ -66,6 +66,7 @@ Map antSystemProperties = [ 'build': mbeddrBuildNumber, 'major.version': mbeddrMajor, 'minor.version': mbeddrMinor, + 'build.jna.library.path': new File(mpsHomeDir, "lib/jna/${System.getProperty('os.arch')}") ] From a14877094d37943f24a51346b6db60f2717ec47e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergej=20Ko=C5=A1=C4=8Dejev?= Date: Sat, 31 Aug 2024 15:35:38 +0200 Subject: [PATCH 13/14] Add missing TestInfo --- .../tests/test.ex.ext.math/models/Issue1855@tests.mps | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/languages/com.mbeddr.ext/tests/test.ex.ext.math/models/Issue1855@tests.mps b/code/languages/com.mbeddr.ext/tests/test.ex.ext.math/models/Issue1855@tests.mps index f6a717c3316..d96f5bd26bd 100644 --- a/code/languages/com.mbeddr.ext/tests/test.ex.ext.math/models/Issue1855@tests.mps +++ b/code/languages/com.mbeddr.ext/tests/test.ex.ext.math/models/Issue1855@tests.mps @@ -15,6 +15,9 @@ + + + @@ -226,5 +229,8 @@ + + + From 9d1ce7d42b1d1f409e1cca467173a3e28d0108e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergej=20Ko=C5=A1=C4=8Dejev?= Date: Tue, 10 Sep 2024 10:56:13 +0200 Subject: [PATCH 14/14] Fix broken build Due to some inexplicable Gradle behavior (probably a bug), when `maven-publish` plugin is applied to `com.mbeddr` project, it causes the subproject configuration in `subprojects` block to misbehave. Instead of adding a repository to each subproject, the repository is added multiple times to the parent. Removing the `plugins` block from `com.mbeddr` fixes this. Since `com.mbeddr:distribution` does not apply these plugins, publishing repositories are now configured only when the `maven-publish` plugin is applied. --- subprojects/com.mbeddr/build.gradle | 49 ++++++++++++++--------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/subprojects/com.mbeddr/build.gradle b/subprojects/com.mbeddr/build.gradle index 5c27ba1ffd0..f3876669dad 100755 --- a/subprojects/com.mbeddr/build.gradle +++ b/subprojects/com.mbeddr/build.gradle @@ -1,8 +1,3 @@ -plugins { - id 'base' - id 'maven-publish' -} - // path variables // If mpsHomeDir is set explicitly, skip the MPS resolution step and use the explicit path (which may be relative from // the root directory). @@ -103,30 +98,32 @@ File scriptFile(String relativePath) { } private static void configureRepositories(Project project) { - project.publishing { - repositories { - maven { - url project.mbeddrBuildNumber.endsWith('-SNAPSHOT') ? project.snapshotRepository : project.releaseRepository - if (project.hasProperty('artifacts.itemis.cloud.user') && project.hasProperty('artifacts.itemis.cloud.pw')) { - credentials { - username project.getProperty('artifacts.itemis.cloud.user') - password project.getProperty('artifacts.itemis.cloud.pw') + project.pluginManager.withPlugin('maven-publish') { + project.publishing { + repositories { + maven { + url project.mbeddrBuildNumber.endsWith('-SNAPSHOT') ? project.snapshotRepository : project.releaseRepository + if (project.hasProperty('artifacts.itemis.cloud.user') && project.hasProperty('artifacts.itemis.cloud.pw')) { + credentials { + username project.getProperty('artifacts.itemis.cloud.user') + password project.getProperty('artifacts.itemis.cloud.pw') + } } } - } - //mbeddr build is "master" also for maintenance branches - //using the closure to delay evaluate from configuration to execution phase is important because the - //mbeddrBuild property is created by a "subproject" block which is executed after this script is configured. - //if no closure is used the build script won't compile. - if({project.mbeddrBuild}() == "master") { - maven { - name = "GitHubPackages" - url = "https://maven.pkg.github.com/mbeddr/mbeddr.core" - if (project.hasProperty("gpr.token")) { - credentials { - username = project.findProperty("gpr.user") - password = project.findProperty("gpr.token") + //mbeddr build is "master" also for maintenance branches + //using the closure to delay evaluate from configuration to execution phase is important because the + //mbeddrBuild property is created by a "subproject" block which is executed after this script is configured. + //if no closure is used the build script won't compile. + if({project.mbeddrBuild}() == "master") { + maven { + name = "GitHubPackages" + url = "https://maven.pkg.github.com/mbeddr/mbeddr.core" + if (project.hasProperty("gpr.token")) { + credentials { + username = project.findProperty("gpr.user") + password = project.findProperty("gpr.token") + } } } }