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

Commit 84d9399

Browse files
committed
Patch build.gradle files to use libv8.so instead of libjsc.so
1 parent 4981cf9 commit 84d9399

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-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
}

0 commit comments

Comments
 (0)