Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/Dockerfiles/Dockerfile.android
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# and build a Android application that can be used to run the
# tests specified in the scripts/ directory.
#
FROM reactnativecommunity/react-native-android:6.1
FROM reactnativecommunity/react-native-android:6.2

LABEL Description="React Native Android Test Image"
LABEL maintainer="Héctor Ramos <[email protected]>"
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ executors:
reactnativeandroid:
<<: *defaults
docker:
- image: reactnativecommunity/react-native-android:6.1
- image: reactnativecommunity/react-native-android:6.2
resource_class: "xlarge"
environment:
- TERM: "dumb"
Expand Down
15 changes: 11 additions & 4 deletions ReactAndroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ def downloadsDir = customDownloadsDir ? new File(customDownloadsDir) : new File(
def thirdPartyNdkDir = new File("$buildDir/third-party-ndk")
def reactNativeRootDir = projectDir.parent

// We put the publishing version from gradle.properties inside ext. so other
// subprojects can access it as well.
ext.publishing_version = VERSION_NAME

// This is the version of CMake we're requesting to the Android SDK to use.
// If missing it will be downloaded automatically. Only CMake versions shipped with the
// Android SDK are supported (you can find them listed in the SDK Manager of Android Studio).
def cmakeVersion = System.getenv("CMAKE_VERSION") ?: "3.22.1"
ext.cmake_version = cmakeVersion

// You need to have following folders in this directory:
// - boost_1_76_0
// - double-conversion-1.1.6
Expand Down Expand Up @@ -224,10 +234,6 @@ final def preparePrefab = tasks.register("preparePrefab", PreparePrefabHeadersTa
it.outputDir.set(prefabHeadersDir)
}

// We put the publishing version from gradle.properties inside ext. so other
// subprojects can access it as well.
ext.publishing_version = VERSION_NAME

task createNativeDepsDirectories {
downloadsDir.mkdirs()
thirdPartyNdkDir.mkdirs()
Expand Down Expand Up @@ -487,6 +493,7 @@ android {

externalNativeBuild {
cmake {
version cmakeVersion
path "src/main/jni/CMakeLists.txt"
}
}
Expand Down
11 changes: 6 additions & 5 deletions ReactAndroid/hermes-engine/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,19 @@ plugins {

group = "com.facebook.react"
version = parent.publishing_version
def cmakeVersion = parent.cmake_version

def cmakeVersion = "3.18.1"
/**
* We use the bundled version of CMake in the Android SDK if available, to don't force Android
* users to install CMake externally.
*/
def findCmakePath(cmakeVersion) {
if (System.getenv("ANDROID_SDK_ROOT")) {
return "${System.getenv("ANDROID_SDK_ROOT")}/cmake/${cmakeVersion}/bin/cmake"
def cmakeRelativePath = "/cmake/${cmakeVersion}/bin/cmake"
if (System.getenv("ANDROID_SDK_ROOT") && new File("${System.getenv("ANDROID_SDK_ROOT")}/${cmakeRelativePath}").exists()) {
return "${System.getenv("ANDROID_SDK_ROOT")}/${cmakeRelativePath}"
}
if (System.getenv("ANDROID_HOME")) {
return "${System.getenv("ANDROID_HOME")}/cmake/${cmakeVersion}/bin/cmake"
if (System.getenv("ANDROID_HOME") && new File("${System.getenv("ANDROID_HOME")}/${cmakeRelativePath}").exists()) {
return "${System.getenv("ANDROID_HOME")}/${cmakeRelativePath}"
}
return "cmake"
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"prettier": "prettier --write \"./**/*.{js,md,yml,ts,tsx}\"",
"format-check": "prettier --list-different \"./**/*.{js,md,yml,ts,tsx}\"",
"update-lock": "npx yarn-deduplicate",
"docker-setup-android": "docker pull reactnativecommunity/react-native-android:6.1",
"docker-setup-android": "docker pull reactnativecommunity/react-native-android:6.2",
"docker-build-android": "docker build -t reactnativeci/android -f .circleci/Dockerfiles/Dockerfile.android .",
"test-android-run-instrumentation": "docker run --cap-add=SYS_ADMIN -it reactnativeci/android bash .circleci/Dockerfiles/scripts/run-android-docker-instrumentation-tests.sh",
"test-android-run-unit": "docker run --cap-add=SYS_ADMIN -it reactnativeci/android bash .circleci/Dockerfiles/scripts/run-android-docker-unit-tests.sh",
Expand Down