Skip to content

Commit

Permalink
add @react-navigation/stack, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
nerious2 committed Nov 18, 2022
1 parent c43bd4b commit d931cfb
Show file tree
Hide file tree
Showing 17 changed files with 2,626 additions and 1,710 deletions.
11 changes: 9 additions & 2 deletions android/app/build.gradle
Expand Up @@ -143,9 +143,15 @@ android {
applicationId "com.se.ebookmanager"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 7
versionName "0.9.07"
versionCode 8
versionName "0.9.08"
// Enabling multidex support.
multiDexEnabled true
}
dexOptions {
jumboMode true
javaMaxHeapSize "4g"
}
splits {
abi {
reset()
Expand Down Expand Up @@ -238,6 +244,7 @@ dependencies {
} else {
implementation jscFlavor
}
implementation 'com.android.support:multidex:1.0.3'
}

// Run this once to be able to run the application with BUCK
Expand Down
4 changes: 3 additions & 1 deletion android/app/proguard-rules.pro
Expand Up @@ -18,4 +18,6 @@
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
}
-keep class com.swmansion.reanimated.** { *; }
-keep class com.facebook.react.turbomodule.** { *; }
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Expand Up @@ -12,6 +12,7 @@
android:allowBackup="false"
android:usesCleartextTraffic="true"
android:theme="@style/AppTheme">

<activity
android:name=".MainActivity"
android:label="@string/app_name"
Expand Down
11 changes: 0 additions & 11 deletions android/app/src/main/java/com/se/ebookmanager/MainActivity.java
Expand Up @@ -4,7 +4,6 @@
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;

public class MainActivity extends ReactActivity {

Expand All @@ -21,14 +20,4 @@ protected void onCreate(Bundle savedInstanceState) {
protected String getMainComponentName() {
return "StandardEinkLauncher";
}

@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new ReactActivityDelegate(this, getMainComponentName()) {
@Override
protected ReactRootView createRootView() {
return new RNGestureHandlerEnabledRootView(MainActivity.this);
}
};
}
}
Expand Up @@ -11,10 +11,13 @@
import com.facebook.soloader.SoLoader;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
import androidx.multidex.MultiDexApplication;

import com.se.ebookmanager.InstalledAppsPackage;
import com.facebook.react.bridge.JSIModulePackage; // <- add
import com.swmansion.reanimated.ReanimatedJSIModulePackage; // <- add

public class MainApplication extends Application implements ReactApplication {
public class MainApplication extends MultiDexApplication implements ReactApplication {

private final ReactNativeHost mReactNativeHost =
new ReactNativeHost(this) {
Expand All @@ -37,6 +40,11 @@ protected List<ReactPackage> getPackages() {
protected String getJSMainModuleName() {
return "index";
}

@Override
protected JSIModulePackage getJSIModulePackage() {
return new ReanimatedJSIModulePackage(); // <- add
}
};

@Override
Expand Down
7 changes: 7 additions & 0 deletions android/build.gradle
Expand Up @@ -2,6 +2,7 @@

buildscript {
ext {
kotlinVersion = "1.6.0"
buildToolsVersion = "30.0.2"
minSdkVersion = 16
compileSdkVersion = 31
Expand Down Expand Up @@ -38,6 +39,12 @@ allprojects {
google()
maven { url 'https://www.jitpack.io' }
}
// react-native-reanimated issue
configurations.all {
resolutionStrategy {
force 'com.facebook.react:react-native:0.63.4'
}
}
}

project.ext {
Expand Down
1 change: 1 addition & 0 deletions babel.config.js
@@ -1,3 +1,4 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: ['react-native-reanimated/plugin'],
};
6 changes: 4 additions & 2 deletions package.json
Expand Up @@ -14,6 +14,7 @@
"@react-native-async-storage/async-storage": "^1.17.10",
"@react-native-community/netinfo": "9.3.6",
"@react-navigation/native": "^6.0.8",
"@react-navigation/stack": "5.14.9",
"react": "16.14.0",
"react-dom": "16.14.0",
"react-native": "0.63.4",
Expand All @@ -25,8 +26,9 @@
"react-native-fast-image": "5.4.2",
"react-native-fs": "^2.19.0",
"react-native-gesture-handler": "1.10.3",
"react-native-progress-circle": "^2.1.0",
"react-native-responsive-dimensions": "^3.1.1",
"react-native-reanimated": "^2.13.0",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "3.13.1",
"react-native-vector-icons": "^9.1.0",
"react-redux": "^7.2.6",
"redux": "^4.1.2",
Expand Down

0 comments on commit d931cfb

Please sign in to comment.