From 93acba2fec9da99ec9d6a941f0d2ff8e834b617b Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Fri, 24 Jun 2022 10:43:33 +0200 Subject: [PATCH] [components] Read componentsVersion from version.txt Read the A-C version number from version.txt and remove it from .buildconfig.yml so we have a single source of truth. --- mobile/android/android-components/.buildconfig.yml | 3 --- mobile/android/android-components/settings.gradle | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/mobile/android/android-components/.buildconfig.yml b/mobile/android/android-components/.buildconfig.yml index 610f844b0396..6c29d3afd4ea 100644 --- a/mobile/android/android-components/.buildconfig.yml +++ b/mobile/android/android-components/.buildconfig.yml @@ -1,6 +1,3 @@ -# Please keep this version in sync with version.txt -# version.txt should be the new source of truth for version numbers -componentsVersion: 104.0.0 # Please add a treeherder group in taskcluster/ci/config.yml if you add a new project here. projects: compose-awesomebar: diff --git a/mobile/android/android-components/settings.gradle b/mobile/android/android-components/settings.gradle index 0c43795265ab..4cbbae497fa9 100644 --- a/mobile/android/android-components/settings.gradle +++ b/mobile/android/android-components/settings.gradle @@ -29,7 +29,7 @@ buildCache { } // Synchronized library configuration for all modules -// This "componentsVersion" number is defined in ".buildconfig.yml" and should follow +// This "componentsVersion" number is defined in "version.txt" and should follow // semantic versioning (MAJOR.MINOR.PATCH). See https://semver.org/ class Config { @@ -71,13 +71,14 @@ def setupProject(name, path, description) { def yaml = new Yaml() def buildconfig = yaml.load(new File(rootDir, '.buildconfig.yml').newInputStream()) +def componentsVersion = new File(rootDir, 'version.txt').text.replaceAll('\\n', '') buildconfig.projects.each { project -> setupProject(project.key, project.value.path, project.value.description) } gradle.projectsLoaded { -> def configData = yaml.load(new File(rootDir, '.config.yml').newInputStream()) - String version = buildconfig.componentsVersion + String version = componentsVersion if (gradle.rootProject.hasProperty("nightlyVersion")) { version = gradle.rootProject.nightlyVersion -- 2.11.4.GIT