diff --git a/.github/renovate.json5 b/.github/renovate.json5 new file mode 100644 index 0000000000..99d9e0a57b --- /dev/null +++ b/.github/renovate.json5 @@ -0,0 +1,42 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended" + ], + "packageRules": [ + // Rules are evaluated top to bottom, all matching rules are applied + + { + "matchPackageNames": [ + "com.jetbrains:mps", + "org.mpsqa:all-in-one", + "com.mbeddr:platform" + ], + + // Update patch versions (2024.1.x -> 2024.1.y) separately from minor. + "separateMinorPatch": true, + + // Commit hashes containing 'a' or 'b' are interpreted by Gradle/Renovate as 'alpha' or 'beta' versions, + // and Renovate would normally refuse to update to them. In our case they are stable versions. + "ignoreUnstable": false + }, + + { + // Disable major and minor updates of MPS libraries and MPS (e.g. 2024.1 -> 2024.3). Leave patch updates enabled + // thanks to the previous rule. + "matchPackageNames": [ + "com.jetbrains:mps", + "org.mpsqa:all-in-one", + "com.mbeddr:platform" + ], + "matchUpdateTypes": ["major", "minor"], + "enabled": false + }, + + // Disallow mps-gradle-plugin v2 + { + "matchPackageNames": ["de.itemis.mps:mps-gradle-plugin"], + "allowedVersions": "!/^2\\./" + } + ], +} diff --git a/build.gradle b/build.gradle index d5084f9865..2505a04536 100644 --- a/build.gradle +++ b/build.gradle @@ -21,17 +21,9 @@ plugins { id "org.cyclonedx.bom" version "1.8.2" } -ext.dependencyRepositories = [ - 'https://artifacts.itemis.cloud/repository/maven-mps/' -] - repositories { - // we don't use mavenLocal() repo, since it can cause various issues with resolving dependencies, - // see https://docs.gradle.org/current/userguide/declaring_repositories.html#sec:case-for-maven-local - for (repoUrl in project.dependencyRepositories) { - maven { - url repoUrl - } + maven { + url 'https://artifacts.itemis.cloud/repository/maven-mps/' } mavenCentral() } @@ -59,9 +51,7 @@ def minor = "1" // Dependency versions ext.mpsVersion = '2024.1.1' - -def mbeddrVersion = "2024.1+" -def mpsQAVersion = "$major.$minor+" +ext.mpsQAVersion = "2024.1.952.3aa34aa" // if building a against a special branch from mbeddr is required add the name here // the name is enough no trailing "." is required, also the plain name from git can @@ -69,11 +59,12 @@ def mpsQAVersion = "$major.$minor+" def mbeddrBranch = "" def currentBranch = "" - -if (mbeddrBranch != null && !mbeddrBranch.trim().isEmpty()) { - ext.mbeddrVersionSelector = "${mbeddrBranch.replace("/", "-")}.${mbeddrVersion}" -} else { - ext.mbeddrVersionSelector = mbeddrVersion +if (!project.hasProperty('mbeddrVersion')) { + if (mbeddrBranch != null && !mbeddrBranch.trim().isEmpty()) { + ext.mbeddrVersion = "${mbeddrBranch.replace("/", "-")}.${major}.${minor}.+" + } else { + ext.mbeddrVersion = "2024.1.25185.dffcb5d" + } } // Project group @@ -95,7 +86,7 @@ if (project.hasProperty('iets3OpenSourceVersion')) { } else { def isSnapshot = !(currentBranch.equals("master") || currentBranch.startsWith("datev-loon-staging-") || currentBranch.startsWith("datev-steuer-staging-")) version = GitBasedVersioning.getVersionWithCount(major, minor, buildNumber) + (isSnapshot ? "-SNAPSHOT" : "") - } + } println "##teamcity[buildNumber '${version}']" } else { version = "$major.$minor-SNAPSHOT" @@ -103,11 +94,6 @@ if (project.hasProperty('iets3OpenSourceVersion')) { } } -if (project.hasProperty("mbeddrVersion")) { - logger.log(LogLevel.WARN, "mbeddr version externally overwritten to $ext.mbeddrVersion") - ext.mbeddrVersionSelector = ext.mbeddrVersion -} - ext.releaseRepository = 'https://artifacts.itemis.cloud/repository/maven-mps-releases/' ext.snapshotRepository = 'https://artifacts.itemis.cloud/repository/maven-mps-snapshots' ext.publishingRepository = version.toString().endsWith("-SNAPSHOT") ? snapshotRepository : releaseRepository @@ -117,12 +103,6 @@ ext.publishingRepository = version.toString().endsWith("-SNAPSHOT") ? snapshotRe // 'artifacts' is used in the generated ant scripts as build output directory ext.artifactsDir = new File(buildDir, 'artifacts') - -wrapper { - gradleVersion '8.0.2' - distributionType Wrapper.DistributionType.ALL -} - configurations { mps languageLibs @@ -134,7 +114,7 @@ configurations { dependencies { mps "com.jetbrains:mps:$mpsVersion" languageLibs "org.mpsqa:all-in-one:$mpsQAVersion" - languageLibs "com.mbeddr:platform:$mbeddrVersionSelector" + languageLibs "com.mbeddr:platform:$mbeddrVersion" junitAnt 'org.apache.ant:ant-junit:1.10.6' pcollections 'org.pcollections:pcollections:4.0.1' bigMath 'ch.obermuhlner:big-math:2.3.2' @@ -243,7 +223,7 @@ task buildAndRunTests(type: TestLanguages, dependsOn: buildLanguages) { task failOnTestError() { description 'evaluate junit result and fail on error' doLast { - + def juniXml = file('TESTS-TestSuites.xml') if(juniXml.exists()){ def junitResult = new XmlSlurper().parse(juniXml)