From 4338904c2ae1d77657f2c679c94ecb18a849bfa6 Mon Sep 17 00:00:00 2001 From: Johan Lorenzo Date: Mon, 8 Aug 2022 18:31:41 +0200 Subject: [PATCH] Bug 1783690 - part 3: Point files to android-components folder --- mobile/android/taskcluster/ac_taskgraph/build_config.py | 3 ++- mobile/android/taskcluster/ac_taskgraph/loader/build_config.py | 4 ++-- mobile/android/taskcluster/ci/toolchain/android.yml | 8 ++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/mobile/android/taskcluster/ac_taskgraph/build_config.py b/mobile/android/taskcluster/ac_taskgraph/build_config.py index 388d0d0b8a68..f7aeb0560b15 100644 --- a/mobile/android/taskcluster/ac_taskgraph/build_config.py +++ b/mobile/android/taskcluster/ac_taskgraph/build_config.py @@ -16,6 +16,7 @@ EXTENSIONS = { CHECKSUMS_EXTENSIONS = ('.sha1', '.md5') CURRENT_DIR = os.path.dirname(os.path.realpath(__file__)) PROJECT_DIR = os.path.realpath(os.path.join(CURRENT_DIR, '..', '..')) +ANDROID_COMPONENTS_DIR = os.path.join(PROJECT_DIR, "android-components") def get_components(): @@ -54,5 +55,5 @@ def get_extensions(component): @memoize def _read_build_config(): - with open(os.path.join(PROJECT_DIR, '.buildconfig.yml'), 'rb') as f: + with open(os.path.join(ANDROID_COMPONENTS_DIR, '.buildconfig.yml'), 'rb') as f: return yaml.safe_load(f) diff --git a/mobile/android/taskcluster/ac_taskgraph/loader/build_config.py b/mobile/android/taskcluster/ac_taskgraph/loader/build_config.py index 818b870c7ea1..8e928806302c 100644 --- a/mobile/android/taskcluster/ac_taskgraph/loader/build_config.py +++ b/mobile/android/taskcluster/ac_taskgraph/loader/build_config.py @@ -15,7 +15,7 @@ from taskgraph.util.taskcluster import get_session from taskgraph.util.templates import merge from ..files_changes import get_files_changed_pr, get_files_changed_push -from ..build_config import get_components +from ..build_config import get_components, ANDROID_COMPONENTS_DIR logger = logging.getLogger(__name__) @@ -65,7 +65,7 @@ def get_upstream_deps_for_components(components): # gradle to spit out JSON that would be much better. # This is filed as https://github.com/mozilla-mobile/android-components/issues/7814 current_component = None - for line in subprocess.check_output(cmd, universal_newlines=True).splitlines(): + for line in subprocess.check_output(cmd, universal_newlines=True, cwd=ANDROID_COMPONENTS_DIR).splitlines(): # If we find the start of a new component section, update our tracking variable if line.startswith("Project"): current_component = line.split(":")[1].strip("'") diff --git a/mobile/android/taskcluster/ci/toolchain/android.yml b/mobile/android/taskcluster/ci/toolchain/android.yml index fed961bcb6c2..9342c6e157c7 100644 --- a/mobile/android/taskcluster/ci/toolchain/android.yml +++ b/mobile/android/taskcluster/ci/toolchain/android.yml @@ -22,7 +22,7 @@ linux64-android-sdk-linux-repack: run: script: repack-android-sdk-linux.sh resources: - - .config.yml + - android-components/.config.yml toolchain-artifact: mobile/android-sdk/android-sdk-linux.tar.xz toolchain-alias: android-sdk-linux treeherder: @@ -44,9 +44,9 @@ linux64-android-gradle-dependencies: resources: - taskcluster/scripts/toolchain/android-gradle-dependencies.sh - taskcluster/scripts/toolchain/android-gradle-dependencies/** - - buildSrc/src/main/java/Dependencies.kt - - build.gradle - - gradle/wrapper/gradle-wrapper.properties + - android-components/buildSrc/src/main/java/Dependencies.kt + - android-components/build.gradle + - android-components/gradle/wrapper/gradle-wrapper.properties toolchain-artifact: public/build/android-gradle-dependencies.tar.xz toolchain-alias: android-gradle-dependencies treeherder: -- 2.11.4.GIT