Skip to content

Commit

Permalink
chore(android): remove unused code (#1052)
Browse files Browse the repository at this point in the history
  • Loading branch information
tido64 authored Aug 19, 2022
1 parent 9586e0f commit fa65da3
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 24 deletions.
3 changes: 1 addition & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ def reactNativePath = file(findNodeModulesPath("react-native", rootDir))
def codegenPath = file(findNodeModulesPath("react-native-codegen", reactNativePath))

if (isNewArchitectureEnabled(project)) {
apply plugin: 'com.facebook.react'
apply(plugin: "com.facebook.react")

react {
codegenDir = codegenPath
reactNativeDir = reactNativePath
}
}


// `react-native run-android` is hard-coded to look for the output APK at a very
// specific location. See
// https://github.com/react-native-community/cli/blob/6cf12b00c02aca6d4bc843446394331d71a9749e/packages/platform-android/src/commands/runAndroid/index.ts#L180
Expand Down
5 changes: 0 additions & 5 deletions android/test-app-util.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ import java.security.MessageDigest

ext.manifest = null

ext.buildReactNativeFromSource = { baseDir ->
def reactNativePath = findNodeModulesPath("react-native", baseDir)
return !file("${reactNativePath}/android").exists()
}

ext.findFile = { fileName ->
def currentDirPath = rootDir == null ? null : rootDir.toString()

Expand Down
17 changes: 0 additions & 17 deletions test-app.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,6 @@ def cliAndroidDir = findNodeModulesPath("@react-native-community/cli-platform-an
apply(from: "${cliAndroidDir}/native_modules.gradle")

ext.applyTestAppSettings = { DefaultSettings settings ->
if (settings.buildReactNativeFromSource(settings.rootDir)) {
def buildFile = Paths.get("${testAppDir}/android/react-native-build.gradle")
settings.rootProject.buildFileName = settings.rootDir.toPath().relativize(buildFile)

def reactNativeDir = findNodeModulesPath("react-native", settings.rootDir)
settings.include(":ReactAndroid")
settings.project(":ReactAndroid")
.projectDir = file("${reactNativeDir}/ReactAndroid")

settings.include(":packages:react-native-codegen:android")
settings.project(":packages:react-native-codegen:android")
.projectDir = file("${reactNativeDir}/packages/react-native-codegen/android")

settings.includeBuild("${reactNativeDir}/packages/react-native-codegen/android")
settings.includeBuild("${reactNativeDir}/packages/react-native-gradle-plugin")
}

settings.include(":app")
settings.include(":support")

Expand Down

0 comments on commit fa65da3

Please sign in to comment.