From 0fdd96fd95e6a2ca793946bbd0136ed7644856a3 Mon Sep 17 00:00:00 2001 From: Nick Gerleman Date: Tue, 3 Oct 2023 18:40:34 -0700 Subject: [PATCH] Use modern Android libc++ in Yoga and React Native (#1412) Summary: X-link: https://github.com/facebook/react-native/pull/39795 Android NDK 25 uses a version of libc++ that is more than three years old, missing a lot of basic features of C++ 20. This is rectified in NDK 26 (latest LTS NDK), which brings us up to date with latest Clang, and adds a new policy where future NDK versions will bump libc++ as part of bumping LLVM/Clang. This requires an a beta AGP version (and corresponding Android Studio Preview). Based on how far we are historically, it wouldn't be a surprise if we see the stable release this month (well before the RN 0.74/Yoga 3.0 cut, even in the worse case). Changelog: [Android][Changed] - Use NDK 26 Differential Revision: D49895949 --- build.gradle | 4 ++-- gradle/wrapper/gradle-wrapper.properties | 2 +- java/build.gradle.kts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index c553dd8f13..3f96b2ae78 100644 --- a/build.gradle +++ b/build.gradle @@ -6,8 +6,8 @@ */ plugins { - id("com.android.library") version "8.1.1" apply false - id("com.android.application") version "8.1.1" apply false + id("com.android.library") version "8.2.0-beta06" apply false + id("com.android.application") version "8.2.0-beta06" apply false id("io.github.gradle-nexus.publish-plugin") version "1.3.0" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a21c6ebe28..03bc515044 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/java/build.gradle.kts b/java/build.gradle.kts index 39575931f5..5519e41e76 100644 --- a/java/build.gradle.kts +++ b/java/build.gradle.kts @@ -23,7 +23,7 @@ android { namespace = "com.facebook.yoga" compileSdk = 34 buildToolsVersion = "34.0.0" - ndkVersion = "25.1.8937393" + ndkVersion = "26.0.10792818" defaultConfig { minSdk = 21