Skip to content

Commit

Permalink
fix(android): use upstream autolink script (#303)
Browse files Browse the repository at this point in the history
The issue that lead us to forking `native_modules.gradle` from
`@react-native-community/cli-platform-android`, may have been fixed in
[v4.4.0](https://github.com/react-native-community/cli/releases/tag/v4.4.0).
  • Loading branch information
tido64 committed Apr 7, 2021
1 parent 1b24a0d commit 4929c48
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 303 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ apply plugin: "kotlin-kapt"
def testAppDir = file("$projectDir/../../")

apply from: file("${testAppDir}/test-app.gradle")
applyTestAppModule(project, "com.microsoft.reacttestapp")
applyTestAppModule(project)

project.ext.react = [
appName : getAppName(),
Expand Down
299 changes: 0 additions & 299 deletions android/test-app-native-modules.gradle

This file was deleted.

8 changes: 5 additions & 3 deletions test-app.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,17 @@ private static void apply(Settings settings) {
def scriptDir = buildscript.sourceFile.getParent()

apply from: "$scriptDir/android/test-app-util.gradle"
apply from: "$scriptDir/android/test-app-native-modules.gradle"

def cliAndroidDir = findNodeModulesPath(rootDir, "@react-native-community/cli-platform-android")
apply from: "$cliAndroidDir/native_modules.gradle"

ext.applyTestAppSettings = { DefaultSettings defaultSettings ->
apply(defaultSettings)
applyNativeModulesSettingsGradle(defaultSettings)
}

ext.applyTestAppModule = { Project project, String packageName ->
applyNativeModulesAppBuildGradle(project, packageName)
ext.applyTestAppModule = { Project project ->
applyNativeModulesAppBuildGradle(project)

def isRntaProject = project.projectDir.getParent() != null &&
(project.rootDir == file(project.projectDir.getParent()))
Expand Down

0 comments on commit 4929c48

Please sign in to comment.