Skip to content

Commit 4dab937

Browse files
Merge pull request #1221 from IETS3/renovate/configure
Configure Renovate
2 parents 8805e92 + ddee9df commit 4dab937

File tree

2 files changed

+54
-32
lines changed

2 files changed

+54
-32
lines changed

.github/renovate.json5

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"config:recommended"
5+
],
6+
"packageRules": [
7+
// Rules are evaluated top to bottom, all matching rules are applied
8+
9+
{
10+
"matchPackageNames": [
11+
"com.jetbrains:mps",
12+
"org.mpsqa:all-in-one",
13+
"com.mbeddr:platform"
14+
],
15+
16+
// Update patch versions (2024.1.x -> 2024.1.y) separately from minor.
17+
"separateMinorPatch": true,
18+
19+
// Commit hashes containing 'a' or 'b' are interpreted by Gradle/Renovate as 'alpha' or 'beta' versions,
20+
// and Renovate would normally refuse to update to them. In our case they are stable versions.
21+
"ignoreUnstable": false
22+
},
23+
24+
{
25+
// Disable major and minor updates of MPS libraries and MPS (e.g. 2024.1 -> 2024.3). Leave patch updates enabled
26+
// thanks to the previous rule.
27+
"matchPackageNames": [
28+
"com.jetbrains:mps",
29+
"org.mpsqa:all-in-one",
30+
"com.mbeddr:platform"
31+
],
32+
"matchUpdateTypes": ["major", "minor"],
33+
"enabled": false
34+
},
35+
36+
// Disallow mps-gradle-plugin v2
37+
{
38+
"matchPackageNames": ["de.itemis.mps:mps-gradle-plugin"],
39+
"allowedVersions": "!/^2\\./"
40+
}
41+
],
42+
}

build.gradle

Lines changed: 12 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,9 @@ plugins {
2121
id "org.cyclonedx.bom" version "1.8.2"
2222
}
2323

24-
ext.dependencyRepositories = [
25-
'https://artifacts.itemis.cloud/repository/maven-mps/'
26-
]
27-
2824
repositories {
29-
// we don't use mavenLocal() repo, since it can cause various issues with resolving dependencies,
30-
// see https://docs.gradle.org/current/userguide/declaring_repositories.html#sec:case-for-maven-local
31-
for (repoUrl in project.dependencyRepositories) {
32-
maven {
33-
url repoUrl
34-
}
25+
maven {
26+
url 'https://artifacts.itemis.cloud/repository/maven-mps/'
3527
}
3628
mavenCentral()
3729
}
@@ -59,21 +51,20 @@ def minor = "1"
5951
// Dependency versions
6052

6153
ext.mpsVersion = '2024.1.1'
62-
63-
def mbeddrVersion = "2024.1+"
64-
def mpsQAVersion = "$major.$minor+"
54+
ext.mpsQAVersion = "2024.1.952.3aa34aa"
6555

6656
// if building a against a special branch from mbeddr is required add the name here
6757
// the name is enough no trailing "." is required, also the plain name from git can
6858
// be used here. No need to convert "/" the script will take care of that.
6959
def mbeddrBranch = ""
7060
def currentBranch = ""
7161

72-
73-
if (mbeddrBranch != null && !mbeddrBranch.trim().isEmpty()) {
74-
ext.mbeddrVersionSelector = "${mbeddrBranch.replace("/", "-")}.${mbeddrVersion}"
75-
} else {
76-
ext.mbeddrVersionSelector = mbeddrVersion
62+
if (!project.hasProperty('mbeddrVersion')) {
63+
if (mbeddrBranch != null && !mbeddrBranch.trim().isEmpty()) {
64+
ext.mbeddrVersion = "${mbeddrBranch.replace("/", "-")}.${major}.${minor}.+"
65+
} else {
66+
ext.mbeddrVersion = "2024.1.25185.dffcb5d"
67+
}
7768
}
7869

7970
// Project group
@@ -95,19 +86,14 @@ if (project.hasProperty('iets3OpenSourceVersion')) {
9586
} else {
9687
def isSnapshot = !(currentBranch.equals("master") || currentBranch.startsWith("datev-loon-staging-") || currentBranch.startsWith("datev-steuer-staging-"))
9788
version = GitBasedVersioning.getVersionWithCount(major, minor, buildNumber) + (isSnapshot ? "-SNAPSHOT" : "")
98-
}
89+
}
9990
println "##teamcity[buildNumber '${version}']"
10091
} else {
10192
version = "$major.$minor-SNAPSHOT"
10293
println "Local build detected, version will be $version"
10394
}
10495
}
10596

106-
if (project.hasProperty("mbeddrVersion")) {
107-
logger.log(LogLevel.WARN, "mbeddr version externally overwritten to $ext.mbeddrVersion")
108-
ext.mbeddrVersionSelector = ext.mbeddrVersion
109-
}
110-
11197
ext.releaseRepository = 'https://artifacts.itemis.cloud/repository/maven-mps-releases/'
11298
ext.snapshotRepository = 'https://artifacts.itemis.cloud/repository/maven-mps-snapshots'
11399
ext.publishingRepository = version.toString().endsWith("-SNAPSHOT") ? snapshotRepository : releaseRepository
@@ -117,12 +103,6 @@ ext.publishingRepository = version.toString().endsWith("-SNAPSHOT") ? snapshotRe
117103
// 'artifacts' is used in the generated ant scripts as build output directory
118104
ext.artifactsDir = new File(buildDir, 'artifacts')
119105

120-
121-
wrapper {
122-
gradleVersion '8.0.2'
123-
distributionType Wrapper.DistributionType.ALL
124-
}
125-
126106
configurations {
127107
mps
128108
languageLibs
@@ -134,7 +114,7 @@ configurations {
134114
dependencies {
135115
mps "com.jetbrains:mps:$mpsVersion"
136116
languageLibs "org.mpsqa:all-in-one:$mpsQAVersion"
137-
languageLibs "com.mbeddr:platform:$mbeddrVersionSelector"
117+
languageLibs "com.mbeddr:platform:$mbeddrVersion"
138118
junitAnt 'org.apache.ant:ant-junit:1.10.6'
139119
pcollections 'org.pcollections:pcollections:4.0.1'
140120
bigMath 'ch.obermuhlner:big-math:2.3.2'
@@ -258,7 +238,7 @@ task buildAndRunTests(type: TestLanguages, dependsOn: buildLanguages) {
258238
task failOnTestError() {
259239
description 'evaluate junit result and fail on error'
260240
doLast {
261-
241+
262242
def juniXml = file('TESTS-TestSuites.xml')
263243
if(juniXml.exists()){
264244
def junitResult = new XmlSlurper().parse(juniXml)

0 commit comments

Comments
 (0)