Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 000d169

Browse files
authored
Merge pull request #1303 from lightninglabs/dev/react-native-v8
Dev/react native v8
2 parents b2b6bc9 + 84d9399 commit 000d169

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

mobile/android/app/build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ android {
137137
sourceCompatibility JavaVersion.VERSION_1_8
138138
targetCompatibility JavaVersion.VERSION_1_8
139139
}
140+
packagingOptions {
141+
// Make sure libjsc.so does not packed in APK
142+
exclude "**/libjsc.so"
143+
}
140144
}
141145

142146
dependencies {
@@ -150,6 +154,8 @@ dependencies {
150154
implementation fileTree(dir: "libs", include: ["*.jar"])
151155
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
152156
implementation "com.facebook.react:react-native:+" // From node_modules
157+
// Add v8-android - prebuilt libv8.so into APK
158+
implementation 'org.chromium:v8-android:+'
153159
addUnimodulesDependencies()
154160

155161
implementation project(":Lndmobile")

mobile/android/build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,12 @@ allprojects {
2626
google()
2727
jcenter()
2828
maven {
29-
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
30-
url "$rootDir/../node_modules/react-native/android"
29+
// Replace AAR from original RN with AAR from react-native-v8
30+
url("$rootDir/../node_modules/react-native-v8/dist")
31+
}
32+
maven {
33+
// prebuilt libv8.so
34+
url("$rootDir/../node_modules/v8-android/dist")
3135
}
3236
}
3337
}

mobile/package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mobile/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"react-native-share": "^1.2.1",
2929
"react-native-svg": "^9.6.2",
3030
"react-native-unimodules": "^0.5.4",
31+
"react-native-v8": "^0.59.10-patch.1",
3132
"react-navigation": "^3.11.1"
3233
},
3334
"devDependencies": {

0 commit comments

Comments
 (0)