From 73bdb03f4c84b32b46024628df54796458f3756d Mon Sep 17 00:00:00 2001 From: Jakub Grzywacz Date: Wed, 8 Jan 2025 10:30:37 +0100 Subject: [PATCH] fix: CMake flags (#2603) # Summary Fix typo in CMakeLists.txt flags and use `ReactAndroid_VERSION_MINOR` instead of `REACT_NATIVE_MINOR_VERSION` ## Test Plan Example apps should build without warnings/errors on 0.73+ as well as on 0.77.0-rc.6 --- android/build.gradle | 7 ------- android/src/main/jni/CMakeLists.txt | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 854e1277..c02400f7 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -104,13 +104,6 @@ android { buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString() consumerProguardFiles 'proguard-rules.pro' - - buildConfigField("String", "REACT_NATIVE_MINOR_VERSION", "\"${REACT_NATIVE_MINOR_VERSION}\"") - externalNativeBuild { - cmake { - arguments "-DREACT_NATIVE_MINOR_VERSION=${REACT_NATIVE_MINOR_VERSION}" - } - } } lintOptions { abortOnError false diff --git a/android/src/main/jni/CMakeLists.txt b/android/src/main/jni/CMakeLists.txt index 1966dd14..21352d24 100644 --- a/android/src/main/jni/CMakeLists.txt +++ b/android/src/main/jni/CMakeLists.txt @@ -10,7 +10,7 @@ set(RNS_GENERATED_REACT_DIR ${RNS_GENERATED_JNI_DIR}/react/renderer/components/r string( APPEND CMAKE_CXX_FLAGS - " -DREACT_NATIVE_MINOR_VERSION=321${REACT_NATIVE_MINOR_VERSION}") + " -DREACT_NATIVE_MINOR_VERSION=${ReactAndroid_VERSION_MINOR}") add_compile_options( -fexceptions