diff --git a/.circleci/config.yml b/.circleci/config.yml index 7fd350abee..4fcac46f44 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -210,7 +210,7 @@ commands: - *gradle_cache_key - run: name: Download Dependencies Using Gradle - command: ./scripts/circleci/gradle_download_deps.sh + command: ./gradlew downloadAll - save_cache: paths: - ~/.gradle diff --git a/build.gradle.kts b/build.gradle.kts index c88c6893da..66aa441f0c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -66,3 +66,13 @@ tasks.register("buildAll") { // This builds RN Tester for Hermes/JSC for debug only dependsOn(":packages:rn-tester:android:app:assembleDebug") } + +tasks.register("downloadAll") { + description = "Download all the depedencies needed locally so they can be cached on CI." + dependsOn(gradle.includedBuild("react-native-gradle-plugin").task(":dependencies")) + dependsOn(":ReactAndroid:downloadNdkBuildDependencies") + dependsOn(":ReactAndroid:dependencies") + dependsOn(":ReactAndroid:androidDependencies") + dependsOn(":ReactAndroid:hermes-engine:dependencies") + dependsOn(":ReactAndroid:hermes-engine:androidDependencies") +} diff --git a/scripts/circleci/gradle_download_deps.sh b/scripts/circleci/gradle_download_deps.sh deleted file mode 100755 index 4f3ae7b1ad..0000000000 --- a/scripts/circleci/gradle_download_deps.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - -set -e - -./gradlew :ReactAndroid:downloadNdkBuildDependencies