Skip to content

Commit

Permalink
Deprecate react.gradle
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cortinico authored and facebook-github-bot committed Oct 25, 2022
1 parent 68983b6 commit af6aaff
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions react.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 : [:];

Expand Down

0 comments on commit af6aaff

Please sign in to comment.