Skip to content

Commit

Permalink
fix: update to [email protected]
Browse files Browse the repository at this point in the history
  • Loading branch information
gmaclennan committed Nov 7, 2022
1 parent 7455642 commit a80b874
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 24 deletions.
2 changes: 0 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,6 @@ dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules
// Add v8-android - prebuilt libv8.so into APK
implementation 'org.chromium:v8-android:9.93.+'

addUnimodulesDependencies()

Expand Down
13 changes: 13 additions & 0 deletions android/app/src/main/java/com/mapeo/MainApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
import cl.json.ShareApplication;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.JavaScriptExecutorFactory;
import com.facebook.react.modules.systeminfo.AndroidInfoHelpers;
import com.facebook.soloader.SoLoader;

import com.mapeo.generated.BasePackageList;
Expand All @@ -26,6 +28,8 @@
import java.lang.reflect.InvocationTargetException;
import java.util.List;

import io.csie.kudo.reactnative.v8.executor.V8ExecutorFactory;

public class MainApplication extends Application implements ShareApplication, ReactApplication {
private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(
new BasePackageList().getPackageList(), Arrays.<SingletonModule>asList());
Expand Down Expand Up @@ -58,6 +62,15 @@ protected List<ReactPackage> getPackages() {
protected String getJSMainModuleName() {
return "index";
}

@Override
protected JavaScriptExecutorFactory getJavaScriptExecutorFactory() {
return new V8ExecutorFactory(
getApplicationContext(),
getPackageName(),
AndroidInfoHelpers.getFriendlyDeviceName(),
getUseDeveloperSupport());
}
};

@Override
Expand Down
8 changes: 2 additions & 6 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,8 @@ allprojects {
mavenLocal()
maven { url("https://maven.google.com") }
maven {
// Replace AAR from original RN with AAR from react-native-v8
url("$rootDir/../node_modules/react-native-v8/dist")
}
maven {
// prebuilt libv8.so
url("$rootDir/../node_modules/v8-android/dist")
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// expo-camera bundles a custom com.google.android:cameraview
Expand Down
20 changes: 6 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@
"react-native-svg": "^12.1.1",
"react-native-tab-view": "^2.15.1",
"react-native-unimodules": "^0.14.10",
"react-native-v8": "^0.66.3-patch.1",
"react-native-v8": "^1.4.8",
"react-native-vector-icons": "^9.1.0",
"serialize-error": "^8.1.0",
"shallowequal": "^1.1.0",
"turndown-rn": "^6.1.0",
"use-memo-one": "^1.1.1",
"utm": "^1.1.1",
"v8-android": "9.93.0",
"v8-android": "^10.100.1",
"validate-color": "^2.2.1"
},
"devDependencies": {
Expand Down

0 comments on commit a80b874

Please sign in to comment.