diff --git a/.gitignore b/.gitignore index 33969c76fd3..186e81410e8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,190 +1,24 @@ # ----------------------------------------------------------- # General +/build/ +/artifacts/ +/scripts/ +/.gradle/ +/MPS/ +/tmp/ + +.idea/ +**/.mps/workspace.xml + +classes_gen/ +doc_gen/ +source_gen/ +source_gen.caches/ +test_gen/ +test_gen.caches/ -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/* - -/build/**/*.xml -/build/com.mbeddr.allScripts/build.xml - -# ----------------------------------------------------------- -# 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/* -**/build/repo/ -**/build/distributions -**/build/classes -antlib.xml -**/code/languages/myDependencies -**/.settings/org.eclipse.buildship.core.prefs -**/.project -# ecore transformation tools -code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.ecoretransofmation.sandbox # ----------------------------------------------------------- # Visual Studio Code settings @@ -194,4 +28,3 @@ code/languages/com.mbeddr.mpsutil/languages/com.mbeddr.mpsutil.ecoretransofmatio /config/ /system/ -markdown-navigator** diff --git a/CHANGELOG.md b/CHANGELOG.md index e281f86b3f6..10ab5947312 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ Semantic Versioning and the changes are simply documented in reverse chronologic - A new kind of Checkin handlers (background handler) now support the interface `CommitCheck` which allows more options like running the code after the commit or in the background. +## 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.platform diff --git a/build/com.mbeddr.allScripts/build.xml b/build-allScripts.xml similarity index 79% rename from build/com.mbeddr.allScripts/build.xml rename to build-allScripts.xml index 7e57bc4a61d..c5c30c9baf7 100644 --- a/build/com.mbeddr.allScripts/build.xml +++ b/build-allScripts.xml @@ -1,19 +1,16 @@ - + - - - - + - + @@ -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/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/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..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,15 +39,15 @@ - - - + + + @@ -150,7 +150,8 @@ - + + @@ -232,27 +233,6 @@ - - - - - - - - - - - - - - - - - - - - - @@ -273,21 +253,11 @@ - - - - - - - - - - - - - - - + + + + + @@ -297,24 +267,34 @@ - - - - + + + - + - + - + + + + + + + + + + + + @@ -323,27 +303,6 @@ - - - - - - - - - - - - - - - - - - - - - @@ -374,21 +333,11 @@ - - - - - - - - - - - - - - - + + + + + @@ -398,50 +347,39 @@ - - - - + + + - + - + - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - @@ -467,21 +405,11 @@ - - - - - - - - - - - - - - - + + + + + @@ -491,50 +419,39 @@ - - - - + + + - + - + - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - @@ -560,21 +477,11 @@ - - - - - - - - - - - - - - - + + + + + @@ -584,50 +491,39 @@ - - - - + + + - + - + - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - @@ -653,21 +549,11 @@ - - - - - - - - - - - - - - - + + + + + @@ -677,50 +563,39 @@ - - - - + + + - + - + - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - @@ -746,21 +621,11 @@ - - - - - - - - - - - - - - - + + + + + @@ -770,50 +635,39 @@ - - - - + + + - + - + - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - @@ -839,21 +693,11 @@ - - - - - - - - - - - - - - - + + + + + @@ -863,24 +707,34 @@ - - - - + + + - + - + - + + + + + + + + + + + + @@ -889,27 +743,6 @@ - - - - - - - - - - - - - - - - - - - - - @@ -925,21 +758,11 @@ - - - - - - - - - - - - - - - + + + + + @@ -949,46 +772,46 @@ - - - - + + + - + - + - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + @@ -1008,21 +831,11 @@ - - - - - - - - - - - - - - - + + + + + @@ -1033,13 +846,12 @@ - - - + + - + - + @@ -1063,27 +875,6 @@ - - - - - - - - - - - - - - - - - - - - - @@ -1104,21 +895,11 @@ - - - - - - - - - - - - - - - + + + + + @@ -1128,24 +909,34 @@ - - - - + + + - + - + - + + + + + + + + + + + + @@ -1156,27 +947,6 @@ - - - - - - - - - - - - - - - - - - - - - @@ -1202,21 +972,11 @@ - - - - - - - - - - - - - - - + + + + + @@ -1226,83 +986,38 @@ - - - - + + + - + - + - + - - - - - - - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -1364,8 +1079,11 @@ - - + + + + + @@ -1380,6 +1098,17 @@ + + + + + + + + + + + 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 @@ - + - + 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 @@ + + + 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 5a81baa58ce..ebb02cc41ab 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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..fe5590b300f --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,26 @@ +pluginManagement { + repositories { + maven("https://artifacts.itemis.cloud/repository/maven-mps/") + gradlePluginPortal() + } +} + +val subprojectPaths = listOf("com.mbeddr", + "com.mbeddr:platform", + "com.mbeddr:languages", + "com.mbeddr:distribution", + "publishing") + +fun fqpath(path: String) = ":$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") + +rootProject.name = "mbeddr.core" 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 66% rename from build/com.mbeddr/build.gradle rename to subprojects/com.mbeddr/build.gradle index 1fabe448a54..f3876669dad 100755 --- a/build/com.mbeddr/build.gradle +++ b/subprojects/com.mbeddr/build.gradle @@ -53,21 +53,20 @@ 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.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() +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, + 'build.jna.library.path': new File(mpsHomeDir, "lib/jna/${System.getProperty('os.arch')}") +] + + +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 @@ -99,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") + } } } } diff --git a/build/com.mbeddr/distribution/build.gradle b/subprojects/com.mbeddr/distribution/build.gradle similarity index 77% rename from build/com.mbeddr/distribution/build.gradle rename to subprojects/com.mbeddr/distribution/build.gradle index 2befce9e394..b942e242076 100644 --- a/build/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/.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 94% rename from build/com.mbeddr/languages/build.gradle rename to subprojects/com.mbeddr/languages/build.gradle index 073f518dddd..192d2254115 100755 --- a/build/com.mbeddr/languages/build.gradle +++ b/subprojects/com.mbeddr/languages/build.gradle @@ -1,6 +1,11 @@ import de.itemis.mps.gradle.* -// :build:com.mbeddr.build +plugins { + id 'base' + id 'maven-publish' +} + +// :com.mbeddr.build def script_build_mbeddr = new File(scriptsBasePath + "/com.mbeddr.build/" + "build.xml") ant.taskdef(name: "makeTests", @@ -43,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') } @@ -52,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" } @@ -62,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) @@ -77,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) { @@ -219,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/.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 92% rename from build/com.mbeddr/platform/build.gradle rename to subprojects/com.mbeddr/platform/build.gradle index 604c0d274d3..2ac12b03f61 100755 --- a/build/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") @@ -43,12 +48,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) { @@ -71,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) { @@ -86,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/build/publishing/build.gradle b/subprojects/publishing/build.gradle similarity index 93% rename from build/publishing/build.gradle rename to subprojects/publishing/build.gradle index 2b075ce1e28..d79d8aa9387 100644 --- a/build/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(