Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Feature/update react native packages #1690

Merged
merged 24 commits into from
Dec 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d791729
updating react native packages
sanjayradadiya Nov 28, 2019
037ff32
updating react native tabview packages
sanjayradadiya Nov 28, 2019
9e49a9d
updated the react-navigation and fixed the FAQ page issue
sanjayradadiya Nov 28, 2019
52c4e57
fixed packages issue for android
sanjayradadiya Nov 29, 2019
b77ca7e
fixed eslint
norbertschuler Dec 2, 2019
e41fa87
moved Podfile.lock in .gitignore to Xcode definitions
norbertschuler Dec 2, 2019
7baa0a6
upgrade Android project for react-native 0.6x
norbertschuler Dec 2, 2019
0a3d91f
fix geolocation and permission module
norbertschuler Dec 2, 2019
4151245
Merge branch 'develop' into feature/update-react-native-packages
norbertschuler Dec 2, 2019
218f57e
added react-native-reanimated again manually
norbertschuler Dec 2, 2019
3da08f4
update to minSDK 21 (Android 5) to support multiDex
norbertschuler Dec 2, 2019
2c390ad
removed old unused tooltips project and removed Pod files which shoul…
norbertschuler Dec 2, 2019
6d51fc0
pretty formatted Podfile
norbertschuler Dec 2, 2019
36c0de0
removed unused jetifier module
norbertschuler Dec 2, 2019
5ebda18
removed unused module @haskkor/react-native-recaptchav3
norbertschuler Dec 3, 2019
577b78b
removed unused modules, added missing
norbertschuler Dec 3, 2019
bfff72c
removed react-native-config as it breaks the build without configurin…
norbertschuler Dec 3, 2019
c0937fa
fixed react-navigation installation
norbertschuler Dec 3, 2019
093c40e
replaced YouTube component with WebView with embedded file as of Andr…
norbertschuler Dec 4, 2019
b001477
added cleaning script
norbertschuler Dec 4, 2019
d0ca23e
added note about Android build process issue
norbertschuler Dec 4, 2019
4490905
fixed wrong root directory for Android build.gradle file and adding c…
norbertschuler Dec 4, 2019
0a58df5
moved Android clean to end of script
norbertschuler Dec 4, 2019
46de235
removed two big unused assets
norbertschuler Dec 5, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:react/recommended"
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ DerivedData
*.ipa
*.xcuserstate
project.xcworkspace
Podfile.lock
ios/Pods/*

# Android/IntelliJ
#
Expand Down
157 changes: 0 additions & 157 deletions android/app/bin/build.gradle

This file was deleted.

47 changes: 26 additions & 21 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import com.android.build.OutputFile
* // the entry file for bundle generation
* entryFile: "index.android.js",
*
* // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
* bundleCommand: "ram-bundle",
*
* // whether to bundle JS and assets in debug mode
* bundleInDebug: false,
*
Expand Down Expand Up @@ -73,11 +76,15 @@ import com.android.build.OutputFile
*/

project.ext.react = [
entryFile: "index.native.js"
entryFile: "index.native.js",
enableHermes: true,
root: "../../",
]
def jscFlavor = 'org.webkit:android-jsc:+'
def useIntlJsc = false
def enableHermes = project.ext.react.get("enableHermes", true);

apply from: "../../node_modules/react-native/react.gradle"

project.ext.vectoricons = [
iconFontNames: ['FontAwesome.ttf', 'FontAwesome5_Brands.ttf', 'FontAwesome5_Regular.ttf', 'FontAwesome5_Solid.ttf',
'MaterialIcons.ttf'] // Name of the font files you want to copy
Expand Down Expand Up @@ -145,7 +152,7 @@ android {
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
// https://developer.android.com/studio/build/configure-apk-splits.html
def versionCodes = ["armeabi-v7a":5, "x86":6, "arm64-v8a": 7, "x86_64": 8]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
Expand All @@ -166,27 +173,23 @@ android {
}

dependencies {
implementation project(':react-native-vector-icons')
//implementation project(':react-native-paypal-wrapper')
implementation project(':@react-native-community_async-storage')
implementation project(':react-native-fs')
implementation project(':react-native-pdf')
implementation project(':rn-fetch-blob')
implementation project(':react-native-vector-icons')
implementation project(':react-native-image-crop-picker')
implementation project(':react-native-document-picker')
implementation project(':react-native-linear-gradient')
implementation project(':bugsnag-react-native')
implementation project(':react-native-youtube')
//compile project(':tipsi-stripe')
implementation project(':react-native-device-info')
implementation project(':react-native-image-picker')
implementation project(':react-native-i18n')
implementation project(':react-native-svg')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "androidx.appcompat:appcompat:1.0.0"
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'com.facebook.fresco:animated-gif:1.10.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha03'
if (useIntlJsc) {
implementation 'org.webkit:android-jsc-intl:+'
} else {
implementation 'org.webkit:android-jsc:+'
}
if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation jscFlavor
}
}

// Run this once to be able to run the application with BUCK
Expand All @@ -195,3 +198,5 @@ task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
13 changes: 13 additions & 0 deletions android/app/src/main/java/org/pftp/MainActivity.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package org.pftp;

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 @@ -12,4 +15,14 @@ public class MainActivity extends ReactActivity {
protected String getMainComponentName() {
return "TreecounterApp";
}

@Override
protected ReactActivityDelegate createReactActivityDelegate() {
return new ReactActivityDelegate(this, getMainComponentName()) {
@Override
protected ReactRootView createRootView() {
return new RNGestureHandlerEnabledRootView(MainActivity.this);
}
};
}
}
87 changes: 26 additions & 61 deletions android/app/src/main/java/org/pftp/MainApplication.java
Original file line number Diff line number Diff line change
@@ -1,81 +1,46 @@
package org.pftp;

import android.app.Application;
import com.facebook.react.PackageList;

import com.facebook.react.ReactApplication;
import com.oblador.vectoricons.VectorIconsPackage;
import com.reactnativecommunity.asyncstorage.AsyncStoragePackage;
//import com.taessina.paypal.RNPaypalWrapperPackage;
import com.rnfs.RNFSPackage;
import org.wonday.pdf.RCTPdfView;
import com.RNFetchBlob.RNFetchBlobPackage;
import com.oblador.vectoricons.VectorIconsPackage;
import com.reactnative.ivpusic.imagepicker.PickerPackage;
import io.github.elyx0.reactnativedocumentpicker.DocumentPickerPackage;
import com.BV.LinearGradient.LinearGradientPackage;
import com.bugsnag.BugsnagReactNative;
import com.inprogress.reactnativeyoutube.ReactNativeYouTube;
//import com.gettipsi.stripe.StripeReactPackage;
import com.learnium.RNDeviceInfo.RNDeviceInfo;
import com.imagepicker.ImagePickerPackage;
import com.AlexanderZaytsev.RNI18n.RNI18nPackage;
import com.horcrux.svg.SvgPackage;

import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;
// import com.reactlibrary.RNTooltipsPackage;

import java.util.Arrays;
import java.util.List;

public class MainApplication extends Application implements ReactApplication {

private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}

@Override
protected List<ReactPackage> getPackages() {
@SuppressWarnings("UnnecessaryLocalVariable")
List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage());
return packages;
}

@Override
protected String getJSMainModuleName() {
return "index";
}
};

@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new AsyncStoragePackage(),
//new RNPaypalWrapperPackage(),
new RNFSPackage(),
new RCTPdfView(),
new RNFetchBlobPackage(),
new VectorIconsPackage(),
new PickerPackage(),
new DocumentPickerPackage(),
new LinearGradientPackage(),
BugsnagReactNative.getPackage(),
new ReactNativeYouTube(),
// new StripeReactPackage(),
new RNDeviceInfo(),
new ImagePickerPackage(),
new RNI18nPackage(),
new SvgPackage()
// new RNTooltipsPackage()
);
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}

@Override
protected String getJSMainModuleName() {
return "index";
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
};

@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}

@Override
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
}
}
Loading