Skip to content

Commit 369943f

Browse files
build: clean up for Renovate
* Use fixed versions of dependencies * Make mbeddr version variable usable for Renovate * Simplify repository declaration
1 parent 3ded3df commit 369943f

File tree

1 file changed

+12
-26
lines changed

1 file changed

+12
-26
lines changed

build.gradle

Lines changed: 12 additions & 26 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+
def 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
@@ -134,7 +120,7 @@ configurations {
134120
dependencies {
135121
mps "com.jetbrains:mps:$mpsVersion"
136122
languageLibs "org.mpsqa:all-in-one:$mpsQAVersion"
137-
languageLibs "com.mbeddr:platform:$mbeddrVersionSelector"
123+
languageLibs "com.mbeddr:platform:$mbeddrVersion"
138124
junitAnt 'org.apache.ant:ant-junit:1.10.6'
139125
pcollections 'org.pcollections:pcollections:4.0.1'
140126
bigMath 'ch.obermuhlner:big-math:2.3.2'
@@ -243,7 +229,7 @@ task buildAndRunTests(type: TestLanguages, dependsOn: buildLanguages) {
243229
task failOnTestError() {
244230
description 'evaluate junit result and fail on error'
245231
doLast {
246-
232+
247233
def juniXml = file('TESTS-TestSuites.xml')
248234
if(juniXml.exists()){
249235
def junitResult = new XmlSlurper().parse(juniXml)

0 commit comments

Comments
 (0)