Skip to content

Commit

Permalink
Merge pull request #2512 from mbeddr/bugfix/build-dependencies
Browse files Browse the repository at this point in the history
Fix CI build
  • Loading branch information
sergej-koscejev committed Sep 16, 2024
2 parents c71cb9d + 30ab283 commit 55ef8c3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions subprojects/com.mbeddr/languages/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@ ant.taskdef(name: 'junit', classname: 'org.apache.tools.ant.taskdefs.optional.ju
ant.taskdef(name: 'junitreport', classname: 'org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator',
classpath: configurations.junitAnt.asPath)

def mbeddrDependencies
def mbeddrPlatformDependency

def usePrebuiltPlatform = ciBuild && !project.hasProperty('forceBuildPlatform')

//on teamcity we don't build the platform we take it from the nexus. Locally we want to build it
if (usePrebuiltPlatform) {
mbeddrDependencies = [resolve_mbeddr_platform]
mbeddrPlatformDependency = resolve_mbeddr_platform
} else {
mbeddrDependencies = [':com.mbeddr:platform:build_platform']
mbeddrPlatformDependency = ':com.mbeddr:platform:build_platform'
}

task build_mbeddr(type: BuildLanguages, dependsOn: mbeddrDependencies) {
task build_mbeddr(type: BuildLanguages, dependsOn: [':com.mbeddr:platform:copy_allScripts', mbeddrPlatformDependency]) {
script script_build_mbeddr
outputs.dir("$artifactsDir/mbeddr")
}
Expand Down
6 changes: 6 additions & 0 deletions subprojects/com.mbeddr/platform/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ task build_allScripts(type: BuildLanguages, dependsOn: [resolve_mps, resolve_mps

// 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')}"]

// Workaround for https://github.com/gradle/gradle/issues/24368 -- provide outputs but disable up-to-date checks
// since we don't provide inputs.
outputs.dir(new File(artifactsDir, 'com.mbeddr.allScripts.build'))
outputs.upToDateWhen { false }
}

task copy_allScripts(type: Copy, dependsOn: build_allScripts) {
Expand Down Expand Up @@ -82,6 +87,7 @@ task build_platform(type: BuildLanguages, dependsOn: copy_allScripts) {
// see comment in build_allScripts, above, for reasons we need to explicitly state task output
// to address NO-SOURCE failure for package_mbeddrPlatform
outputs.dir(new File(artifactsDir, 'com.mbeddr.platform/'))
outputs.upToDateWhen { false }
}

task install_actionsfilter(type: Copy, dependsOn: build_platform) {
Expand Down

0 comments on commit 55ef8c3

Please sign in to comment.