From af6aafff90c4d40abfe160c4cfc8e1ae8fa0d956 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Tue, 25 Oct 2022 11:29:40 -0700 Subject: [PATCH] Deprecate react.gradle Summary: With RNGP we can now deprecate react.gradle I'll create a page on the website to describe what is the migration strategy here, but users should be fine by just replacing `apply from react.gradle` with `apply plugin: com.facebook.react`. Changelog: [Android] [Removed] - Deprecate react.gradle Reviewed By: cipolleschi Differential Revision: D40675546 fbshipit-source-id: a50348791d669df1ed9e0470a6664e291c1a4584 --- react.gradle | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/react.gradle b/react.gradle index 4cba94bd95d..da5505975a0 100644 --- a/react.gradle +++ b/react.gradle @@ -7,6 +7,24 @@ import org.apache.tools.ant.taskdefs.condition.Os import org.gradle.internal.jvm.Jvm +import org.gradle.internal.logging.text.StyledTextOutput +import org.gradle.internal.logging.text.StyledTextOutputFactory +import org.gradle.internal.logging.text.StyledTextOutput.Style + +def out = services.get(StyledTextOutputFactory).create("ouput") +out.style(Style.Info) + .text('##############################') + .text('\n\n') + .text('Using react.gradle in your project is deprecated! You should move to "apply plugin: com.facebook.react"') + .text('\n') + .text('react.gradle is going to be removed in a future React Native project and your project will not build anymore.') + .text('\n') + .text('You can use the template as a reference:') + .text('\n') + .text('https://github.com/facebook/react-native/blob/main/template/android/app/build.gradle') + .text('\n\n') + .text('##############################') + .println('') def config = project.hasProperty("react") ? project.react : [:];