From a22f30d2ce866cb1488b26bb18eee0620a0ac259 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Wed, 20 Jul 2022 07:08:33 -0700 Subject: [PATCH] Fix missing import on New Architecture build script in template (#34230) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/34230 The OS static class is accessed inside app/build.gradle but the import is on the top level Gradle file. This is causing an app created from template to fail building. This is needed to be cherry-picked on the 0.70-stable branch. Changelog: [Android] [Fixed] - Fix missing import on New Architecture build script in template Reviewed By: cipolleschi Differential Revision: D37995897 fbshipit-source-id: aad22100cee004944c4fa0841f5ef0dfc6ea1e94 --- template/android/app/build.gradle | 1 + template/android/build.gradle | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/template/android/app/build.gradle b/template/android/app/build.gradle index bb4470cd7336d7..5816fe08d543ad 100644 --- a/template/android/app/build.gradle +++ b/template/android/app/build.gradle @@ -1,6 +1,7 @@ apply plugin: "com.android.application" import com.android.build.OutputFile +import org.apache.tools.ant.taskdefs.condition.Os /** * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets diff --git a/template/android/build.gradle b/template/android/build.gradle index 338dc272f39db8..8569fee3a7f5b9 100644 --- a/template/android/build.gradle +++ b/template/android/build.gradle @@ -1,5 +1,3 @@ -import org.apache.tools.ant.taskdefs.condition.Os - // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript {