Browse Source

Android working

Tom Underhill 4 years ago
parent
commit
549af89df1
5 changed files with 8 additions and 4962 deletions
  1. 5
    5
      example/android/app/build.gradle
  2. 2
    2
      example/android/build.gradle
  3. 1
    1
      example/android/settings.gradle
  4. 0
    4944
      example/yarn.lock
  5. 0
    10
      metro.config.js

+ 5
- 5
example/android/app/build.gradle View File

@@ -9,7 +9,7 @@ import com.android.build.OutputFile
9 9
  * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10 10
  * bundle directly from the development server. Below you can see all the possible configurations
11 11
  * and their defaults. If you decide to add a configuration block, make sure to add it before the
12
- * `apply from: "../../node_modules/react-native/react.gradle"` line.
12
+ * `apply from: "../../../node_modules/react-native/react.gradle"` line.
13 13
  *
14 14
  * project.ext.react = [
15 15
  *   // the name of the generated asset file containing your JS bundle
@@ -44,7 +44,7 @@ import com.android.build.OutputFile
44 44
  *   //         'devDisabledIn${buildType}'
45 45
  *
46 46
  *   // the root of your project, i.e. where "package.json" lives
47
- *   root: "../../",
47
+ *   root: "../../../",
48 48
  *
49 49
  *   // where to put the JS bundle asset in debug mode
50 50
  *   jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
@@ -80,7 +80,7 @@ project.ext.react = [
80 80
     enableHermes: false,  // clean and rebuild if changing
81 81
 ]
82 82
 
83
-apply from: "../../node_modules/react-native/react.gradle"
83
+apply from: "../../../node_modules/react-native/react.gradle"
84 84
 
85 85
 /**
86 86
  * Set this to true to create two separate APKs instead of one:
@@ -183,7 +183,7 @@ dependencies {
183 183
     implementation "com.facebook.react:react-native:+"  // From node_modules
184 184
 
185 185
     if (enableHermes) {
186
-        def hermesPath = "../../node_modules/hermes-engine/android/";
186
+        def hermesPath = "../../../node_modules/hermes-engine/android/";
187 187
         debugImplementation files(hermesPath + "hermes-debug.aar")
188 188
         releaseImplementation files(hermesPath + "hermes-release.aar")
189 189
     } else {
@@ -198,4 +198,4 @@ task copyDownloadableDepsToLibs(type: Copy) {
198 198
     into 'libs'
199 199
 }
200 200
 
201
-apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
201
+apply from: file("../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

+ 2
- 2
example/android/build.gradle View File

@@ -24,11 +24,11 @@ allprojects {
24 24
         mavenLocal()
25 25
         maven {
26 26
             // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
27
-            url("$rootDir/../node_modules/react-native/android")
27
+            url("$rootDir/../../node_modules/react-native/android")
28 28
         }
29 29
         maven {
30 30
             // Android JSC is installed from npm
31
-            url("$rootDir/../node_modules/jsc-android/dist")
31
+            url("$rootDir/../../node_modules/jsc-android/dist")
32 32
         }
33 33
 
34 34
         google()

+ 1
- 1
example/android/settings.gradle View File

@@ -1,3 +1,3 @@
1 1
 rootProject.name = 'example'
2
-apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
2
+apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
3 3
 include ':app'

+ 0
- 4944
example/yarn.lock
File diff suppressed because it is too large
View File


+ 0
- 10
metro.config.js View File

@@ -1,10 +0,0 @@
1
-/**
2
- * This cli config is needed for development purposes, e.g. for running
3
- * integration tests during local development or on CI services.
4
- */
5
-
6
-module.exports = {
7
-  resolver: {
8
-    platforms: ['win32', 'ios', 'macos', 'android'],
9
-  },
10
-};