Upgrade to React Native 0.59.3 #513
28 changed files with 2109 additions and 1337 deletions
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"presets": ["react-native"],
|
"presets": ["module:metro-react-native-babel-preset"],
|
||||||
"plugins": [
|
"plugins": [
|
||||||
|
"@babel/plugin-proposal-nullish-coalescing-operator",
|
||||||
["module-resolver", {
|
["module-resolver", {
|
||||||
root: ["./src"],
|
root: ["./src"],
|
||||||
}],
|
}],
|
||||||
|
|
3219
app/package-lock.json
generated
3219
app/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -13,18 +13,19 @@
|
||||||
"lodash": ">=4.17.11",
|
"lodash": ">=4.17.11",
|
||||||
"merge": ">=1.2.1",
|
"merge": ">=1.2.1",
|
||||||
"moment": "^2.22.1",
|
"moment": "^2.22.1",
|
||||||
"react": "16.2.0",
|
"react": "16.8.6",
|
||||||
"react-native": "0.55.3",
|
"react-native": "0.59.3",
|
||||||
|
"@react-native-community/async-storage": "^1.2.2",
|
||||||
"react-native-country-picker-modal": "^0.6.2",
|
"react-native-country-picker-modal": "^0.6.2",
|
||||||
"react-native-exception-handler": "2.9.0",
|
"react-native-exception-handler": "2.9.0",
|
||||||
"react-native-fast-image": "^5.0.3",
|
"react-native-fast-image": "^5.0.3",
|
||||||
"rn-fetch-blob": "^0.10.15",
|
"react-native-gesture-handler": "^1.1.0",
|
||||||
"react-native-image-zoom-viewer": "^2.2.5",
|
"react-native-image-zoom-viewer": "^2.2.5",
|
||||||
"react-native-phone-input": "lbryio/react-native-phone-input",
|
"react-native-phone-input": "lbryio/react-native-phone-input",
|
||||||
"react-native-vector-icons": "^5.0.0",
|
"react-native-vector-icons": "^5.0.0",
|
||||||
"react-native-video": "lbryio/react-native-video#exoplayer-lbry-android",
|
"react-native-video": "lbryio/react-native-video#exoplayer-lbry-android",
|
||||||
"react-navigation": "^2.18.3",
|
"react-navigation": "^3.6.1",
|
||||||
"react-navigation-redux-helpers": "^2.0.9",
|
"react-navigation-redux-helpers": "^3.0.0",
|
||||||
"react-redux": "^5.0.3",
|
"react-redux": "^5.0.3",
|
||||||
"redux": "^3.6.0",
|
"redux": "^3.6.0",
|
||||||
"redux-logger": "3.0.6",
|
"redux-logger": "3.0.6",
|
||||||
|
@ -32,10 +33,13 @@
|
||||||
"redux-persist-filesystem-storage": "^1.3.2",
|
"redux-persist-filesystem-storage": "^1.3.2",
|
||||||
"redux-persist-transform-compress": "^4.2.0",
|
"redux-persist-transform-compress": "^4.2.0",
|
||||||
"redux-persist-transform-filter": "0.0.10",
|
"redux-persist-transform-filter": "0.0.10",
|
||||||
"redux-thunk": "^2.2.0"
|
"redux-thunk": "^2.2.0",
|
||||||
|
"rn-fetch-blob": "^0.10.15"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@babel/core": "^7.4.3",
|
||||||
"babel-preset-env": "^1.6.1",
|
"babel-preset-env": "^1.6.1",
|
||||||
|
"babel-preset-react-native": "5.0.2",
|
||||||
"babel-preset-stage-2": "^6.18.0",
|
"babel-preset-stage-2": "^6.18.0",
|
||||||
"babel-plugin-module-resolver": "^3.1.1",
|
"babel-plugin-module-resolver": "^3.1.1",
|
||||||
"flow-babel-webpack-plugin": "^1.1.1"
|
"flow-babel-webpack-plugin": "^1.1.1"
|
||||||
|
|
|
@ -14,19 +14,19 @@ import TransactionHistoryPage from 'page/transactionHistory';
|
||||||
import WalletPage from 'page/wallet';
|
import WalletPage from 'page/wallet';
|
||||||
import SearchInput from 'component/searchInput';
|
import SearchInput from 'component/searchInput';
|
||||||
import {
|
import {
|
||||||
|
createAppContainer,
|
||||||
createDrawerNavigator,
|
createDrawerNavigator,
|
||||||
createStackNavigator,
|
createStackNavigator,
|
||||||
NavigationActions
|
NavigationActions
|
||||||
} from 'react-navigation';
|
} from 'react-navigation';
|
||||||
import {
|
import {
|
||||||
addListener,
|
addListener,
|
||||||
reduxifyNavigator,
|
createReduxContainer,
|
||||||
createReactNavigationReduxMiddleware,
|
createReactNavigationReduxMiddleware,
|
||||||
} from 'react-navigation-redux-helpers';
|
} from 'react-navigation-redux-helpers';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import {
|
import {
|
||||||
AppState,
|
AppState,
|
||||||
AsyncStorage,
|
|
||||||
BackHandler,
|
BackHandler,
|
||||||
Linking,
|
Linking,
|
||||||
NativeModules,
|
NativeModules,
|
||||||
|
@ -48,6 +48,7 @@ import {
|
||||||
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
||||||
import { decode as atob } from 'base-64';
|
import { decode as atob } from 'base-64';
|
||||||
import { dispatchNavigateBack, dispatchNavigateToUri } from 'utils/helper';
|
import { dispatchNavigateBack, dispatchNavigateToUri } from 'utils/helper';
|
||||||
|
import AsyncStorage from '@react-native-community/async-storage';
|
||||||
import Colors from 'styles/colors';
|
import Colors from 'styles/colors';
|
||||||
import Constants from 'constants';
|
import Constants from 'constants';
|
||||||
import Icon from 'react-native-vector-icons/FontAwesome5';
|
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||||
|
@ -195,7 +196,7 @@ const drawer = createDrawerNavigator({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export const AppNavigator = new createStackNavigator({
|
const mainStackNavigator = new createStackNavigator({
|
||||||
FirstRun: {
|
FirstRun: {
|
||||||
screen: FirstRunScreen,
|
screen: FirstRunScreen,
|
||||||
navigationOptions: {
|
navigationOptions: {
|
||||||
|
@ -214,12 +215,11 @@ export const AppNavigator = new createStackNavigator({
|
||||||
}, {
|
}, {
|
||||||
headerMode: 'none'
|
headerMode: 'none'
|
||||||
});
|
});
|
||||||
|
export const AppNavigator = mainStackNavigator;
|
||||||
export const reactNavigationMiddleware = createReactNavigationReduxMiddleware(
|
export const reactNavigationMiddleware = createReactNavigationReduxMiddleware(
|
||||||
"root",
|
|
||||||
state => state.nav,
|
state => state.nav,
|
||||||
);
|
);
|
||||||
const App = reduxifyNavigator(AppNavigator, "root");
|
const App = createReduxContainer(mainStackNavigator, "root");
|
||||||
const appMapStateToProps = (state) => ({
|
const appMapStateToProps = (state) => ({
|
||||||
state: state.nav,
|
state: state.nav,
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import {
|
import {
|
||||||
doUserEmailNew,
|
doUserEmailNew,
|
||||||
|
doUserEmailToVerify,
|
||||||
doUserResendVerificationEmail,
|
doUserResendVerificationEmail,
|
||||||
selectEmailNewErrorMessage,
|
selectEmailNewErrorMessage,
|
||||||
selectEmailNewIsPending,
|
selectEmailNewIsPending,
|
||||||
|
@ -17,6 +18,7 @@ const select = state => ({
|
||||||
|
|
||||||
const perform = dispatch => ({
|
const perform = dispatch => ({
|
||||||
addUserEmail: email => dispatch(doUserEmailNew(email)),
|
addUserEmail: email => dispatch(doUserEmailNew(email)),
|
||||||
|
setEmailToVerify: email => dispatch(doUserEmailToVerify(email)),
|
||||||
notify: data => dispatch(doToast(data)),
|
notify: data => dispatch(doToast(data)),
|
||||||
resendVerificationEmail: email => dispatch(doUserResendVerificationEmail(email))
|
resendVerificationEmail: email => dispatch(doUserResendVerificationEmail(email))
|
||||||
});
|
});
|
||||||
|
|
|
@ -2,42 +2,43 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {
|
import {
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
AsyncStorage,
|
|
||||||
Text,
|
Text,
|
||||||
TextInput,
|
TextInput,
|
||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
View
|
View
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
|
import AsyncStorage from '@react-native-community/async-storage';
|
||||||
import Icon from 'react-native-vector-icons/FontAwesome5';
|
import Icon from 'react-native-vector-icons/FontAwesome5';
|
||||||
import Button from '../button';
|
import Button from 'component/button';
|
||||||
import Colors from '../../styles/colors';
|
import Colors from 'styles/colors';
|
||||||
import Constants from '../../constants';
|
import Constants from 'constants';
|
||||||
import Link from '../link';
|
import Link from 'component/link';
|
||||||
import rewardStyle from '../../styles/reward';
|
import rewardStyle from 'styles/reward';
|
||||||
|
|
||||||
class EmailRewardSubcard extends React.PureComponent {
|
class EmailRewardSubcard extends React.PureComponent {
|
||||||
state = {
|
constructor(props) {
|
||||||
email: null,
|
super(props);
|
||||||
emailAlreadySet: false,
|
this.state = {
|
||||||
previousEmail: null,
|
email: null,
|
||||||
verfiyStarted: false
|
emailAlreadySet: false,
|
||||||
};
|
previousEmail: null,
|
||||||
|
verfiyStarted: false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
const { emailToVerify } = this.props;
|
const { setEmailToVerify } = this.props;
|
||||||
AsyncStorage.getItem(Constants.KEY_FIRST_RUN_EMAIL).then(email => {
|
AsyncStorage.getItem(Constants.KEY_FIRST_RUN_EMAIL).then(email => setEmailToVerify(email));
|
||||||
if (email && email.trim().length > 0) {
|
|
||||||
this.setState({ email, emailAlreadySet: true, previousEmail: email });
|
|
||||||
} else {
|
|
||||||
this.setState({ email: emailToVerify, previousEmail: emailToVerify });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillReceiveProps(nextProps) {
|
componentWillReceiveProps(nextProps) {
|
||||||
const { emailNewErrorMessage, emailNewPending } = nextProps;
|
const { emailNewErrorMessage, emailNewPending, emailToVerify } = nextProps;
|
||||||
const { notify } = this.props;
|
const { notify } = this.props;
|
||||||
|
|
||||||
|
if (emailToVerify && emailToVerify.trim().length > 0 && !this.state.email && !this.state.previousEmail) {
|
||||||
|
this.setState({ email: emailToVerify, previousEmail: emailToVerify, emailAlreadySet: true });
|
||||||
|
}
|
||||||
|
|
||||||
if (this.state.verifyStarted && !emailNewPending) {
|
if (this.state.verifyStarted && !emailNewPending) {
|
||||||
if (emailNewErrorMessage) {
|
if (emailNewErrorMessage) {
|
||||||
notify({ message: String(emailNewErrorMessage), isError: true });
|
notify({ message: String(emailNewErrorMessage), isError: true });
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {
|
import {
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
AsyncStorage,
|
|
||||||
DeviceEventEmitter,
|
DeviceEventEmitter,
|
||||||
NativeModules,
|
NativeModules,
|
||||||
StyleSheet,
|
StyleSheet,
|
||||||
|
@ -11,6 +10,7 @@ import {
|
||||||
TouchableOpacity,
|
TouchableOpacity,
|
||||||
View
|
View
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
|
import AsyncStorage from '@react-native-community/async-storage';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import Colors from 'styles/colors';
|
import Colors from 'styles/colors';
|
||||||
import Constants from 'constants';
|
import Constants from 'constants';
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { AsyncStorage, NativeModules, Text, TouchableOpacity, View } from 'react-native';
|
import { NativeModules, Text, TouchableOpacity, View } from 'react-native';
|
||||||
import Button from '../../component/button';
|
import AsyncStorage from '@react-native-community/async-storage';
|
||||||
import rewardStyle from '../../styles/reward';
|
import Button from 'component/button';
|
||||||
|
import rewardStyle from 'styles/reward';
|
||||||
|
|
||||||
class RewardSummary extends React.Component {
|
class RewardSummary extends React.Component {
|
||||||
static itemKey = 'rewardSummaryDismissed';
|
static itemKey = 'rewardSummaryDismissed';
|
||||||
|
|
|
@ -4,7 +4,6 @@ import { Provider, connect } from 'react-redux';
|
||||||
import {
|
import {
|
||||||
AppRegistry,
|
AppRegistry,
|
||||||
AppState,
|
AppState,
|
||||||
AsyncStorage,
|
|
||||||
Text,
|
Text,
|
||||||
View,
|
View,
|
||||||
NativeModules
|
NativeModules
|
||||||
|
@ -32,6 +31,7 @@ import { createLogger } from 'redux-logger';
|
||||||
import { AppNavigator } from 'component/AppNavigator';
|
import { AppNavigator } from 'component/AppNavigator';
|
||||||
import { persistStore, autoRehydrate } from 'redux-persist';
|
import { persistStore, autoRehydrate } from 'redux-persist';
|
||||||
import AppWithNavigationState, { reactNavigationMiddleware } from './component/AppNavigator';
|
import AppWithNavigationState, { reactNavigationMiddleware } from './component/AppNavigator';
|
||||||
|
import AsyncStorage from '@react-native-community/async-storage';
|
||||||
import FilesystemStorage from 'redux-persist-filesystem-storage';
|
import FilesystemStorage from 'redux-persist-filesystem-storage';
|
||||||
import createCompressor from 'redux-persist-transform-compress';
|
import createCompressor from 'redux-persist-transform-compress';
|
||||||
import createFilter from 'redux-persist-transform-filter';
|
import createFilter from 'redux-persist-transform-filter';
|
||||||
|
|
|
@ -3,7 +3,6 @@ import NavigationActions from 'react-navigation';
|
||||||
import {
|
import {
|
||||||
Alert,
|
Alert,
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
AsyncStorage,
|
|
||||||
Linking,
|
Linking,
|
||||||
NativeModules,
|
NativeModules,
|
||||||
SectionList,
|
SectionList,
|
||||||
|
@ -11,6 +10,7 @@ import {
|
||||||
View
|
View
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { Lbry, normalizeURI, parseURI } from 'lbry-redux';
|
import { Lbry, normalizeURI, parseURI } from 'lbry-redux';
|
||||||
|
import AsyncStorage from '@react-native-community/async-storage';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import Constants from 'constants';
|
import Constants from 'constants';
|
||||||
import Colors from 'styles/colors';
|
import Colors from 'styles/colors';
|
||||||
|
|
|
@ -2,7 +2,6 @@ import React from 'react';
|
||||||
import { Lbry } from 'lbry-redux';
|
import { Lbry } from 'lbry-redux';
|
||||||
import {
|
import {
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
AsyncStorage,
|
|
||||||
Linking,
|
Linking,
|
||||||
NativeModules,
|
NativeModules,
|
||||||
Platform,
|
Platform,
|
||||||
|
@ -10,9 +9,10 @@ import {
|
||||||
TextInput,
|
TextInput,
|
||||||
View
|
View
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import Colors from '../../../styles/colors';
|
import AsyncStorage from '@react-native-community/async-storage';
|
||||||
import Constants from '../../../constants';
|
import Colors from 'styles/colors';
|
||||||
import firstRunStyle from '../../../styles/firstRun';
|
import Constants from 'constants';
|
||||||
|
import firstRunStyle from 'styles/firstRun';
|
||||||
|
|
||||||
class EmailCollectPage extends React.PureComponent {
|
class EmailCollectPage extends React.PureComponent {
|
||||||
static MAX_STATUS_TRIES = 30;
|
static MAX_STATUS_TRIES = 30;
|
||||||
|
|
|
@ -2,7 +2,6 @@ import React from 'react';
|
||||||
import { Lbry } from 'lbry-redux';
|
import { Lbry } from 'lbry-redux';
|
||||||
import {
|
import {
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
AsyncStorage,
|
|
||||||
Linking,
|
Linking,
|
||||||
NativeModules,
|
NativeModules,
|
||||||
Text,
|
Text,
|
||||||
|
@ -10,11 +9,12 @@ import {
|
||||||
View
|
View
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { NavigationActions, StackActions } from 'react-navigation';
|
import { NavigationActions, StackActions } from 'react-navigation';
|
||||||
import Colors from '../../styles/colors';
|
import AsyncStorage from '@react-native-community/async-storage';
|
||||||
import Constants from '../../constants';
|
import Colors from 'styles/colors';
|
||||||
|
import Constants from 'constants';
|
||||||
import WelcomePage from './internal/welcome-page';
|
import WelcomePage from './internal/welcome-page';
|
||||||
import EmailCollectPage from './internal/email-collect-page';
|
import EmailCollectPage from './internal/email-collect-page';
|
||||||
import firstRunStyle from '../../styles/firstRun';
|
import firstRunStyle from 'styles/firstRun';
|
||||||
|
|
||||||
class FirstRunScreen extends React.PureComponent {
|
class FirstRunScreen extends React.PureComponent {
|
||||||
static pages = [
|
static pages = [
|
||||||
|
|
|
@ -2,7 +2,6 @@ import React from 'react';
|
||||||
import { Lbry } from 'lbry-redux';
|
import { Lbry } from 'lbry-redux';
|
||||||
import {
|
import {
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
AsyncStorage,
|
|
||||||
Linking,
|
Linking,
|
||||||
NativeModules,
|
NativeModules,
|
||||||
Platform,
|
Platform,
|
||||||
|
@ -13,10 +12,11 @@ import {
|
||||||
import { NavigationActions, StackActions } from 'react-navigation';
|
import { NavigationActions, StackActions } from 'react-navigation';
|
||||||
import { decode as atob } from 'base-64';
|
import { decode as atob } from 'base-64';
|
||||||
import { navigateToUri } from '../../utils/helper';
|
import { navigateToUri } from '../../utils/helper';
|
||||||
|
import AsyncStorage from '@react-native-community/async-storage';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import Colors from '../../styles/colors';
|
import Colors from 'styles/colors';
|
||||||
import Constants from '../../constants';
|
import Constants from 'constants';
|
||||||
import splashStyle from '../../styles/splash';
|
import splashStyle from 'styles/splash';
|
||||||
|
|
||||||
const BLOCK_HEIGHT_INTERVAL = 1000 * 60 * 2.5; // every 2.5 minutes
|
const BLOCK_HEIGHT_INTERVAL = 1000 * 60 * 2.5; // every 2.5 minutes
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ import React from 'react';
|
||||||
import NavigationActions from 'react-navigation';
|
import NavigationActions from 'react-navigation';
|
||||||
import {
|
import {
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
AsyncStorage,
|
|
||||||
FlatList,
|
FlatList,
|
||||||
NativeModules,
|
NativeModules,
|
||||||
SectionList,
|
SectionList,
|
||||||
|
@ -12,6 +11,7 @@ import {
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { buildURI, parseURI } from 'lbry-redux';
|
import { buildURI, parseURI } from 'lbry-redux';
|
||||||
import { uriFromFileInfo } from 'utils/helper';
|
import { uriFromFileInfo } from 'utils/helper';
|
||||||
|
import AsyncStorage from '@react-native-community/async-storage';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import Colors from 'styles/colors';
|
import Colors from 'styles/colors';
|
||||||
|
|
|
@ -2,13 +2,13 @@ import React from 'react';
|
||||||
import NavigationActions from 'react-navigation';
|
import NavigationActions from 'react-navigation';
|
||||||
import {
|
import {
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
AsyncStorage,
|
|
||||||
NativeModules,
|
NativeModules,
|
||||||
FlatList,
|
FlatList,
|
||||||
Text,
|
Text,
|
||||||
View
|
View
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { normalizeURI } from 'lbry-redux';
|
import { normalizeURI } from 'lbry-redux';
|
||||||
|
import AsyncStorage from '@react-native-community/async-storage';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import FileItem from '/component/fileItem';
|
import FileItem from '/component/fileItem';
|
||||||
import discoverStyle from 'styles/discover';
|
import discoverStyle from 'styles/discover';
|
||||||
|
|
|
@ -89,7 +89,7 @@ fullscreen = 0
|
||||||
android.permissions = ACCESS_NETWORK_STATE,BLUETOOTH,INTERNET,READ_EXTERNAL_STORAGE,WRITE_EXTERNAL_STORAGE
|
android.permissions = ACCESS_NETWORK_STATE,BLUETOOTH,INTERNET,READ_EXTERNAL_STORAGE,WRITE_EXTERNAL_STORAGE
|
||||||
|
|
||||||
# (int) Android API to use
|
# (int) Android API to use
|
||||||
android.api = 27
|
android.api = 28
|
||||||
|
|
||||||
# (int) Minimum API required
|
# (int) Minimum API required
|
||||||
android.minapi = 21
|
android.minapi = 21
|
||||||
|
@ -148,7 +148,7 @@ android.react_src = ./app
|
||||||
|
|
||||||
# (list) Gradle dependencies to add (currently works only with sdl2_gradle
|
# (list) Gradle dependencies to add (currently works only with sdl2_gradle
|
||||||
# bootstrap)
|
# bootstrap)
|
||||||
android.gradle_dependencies = com.android.support:support-v4:27.1.1, com.android.support:support-media-compat:27.1.1, com.android.support:appcompat-v7:27.1.1, com.facebook.react:react-native:0.55.3, com.mixpanel.android:mixpanel-android:5+, com.google.android.gms:play-services-gcm:11.0.4+, com.facebook.fresco:fresco:1.9.0, com.facebook.fresco:animated-gif:1.9.0, com.squareup.picasso:picasso:2.71828
|
android.gradle_dependencies = com.android.support:support-v4:27.1.1, com.android.support:support-media-compat:27.1.1, com.android.support:appcompat-v7:27.1.1, com.facebook.react:react-native:0.59.3, com.mixpanel.android:mixpanel-android:5+, com.google.android.gms:play-services-gcm:11.0.4+, com.facebook.fresco:fresco:1.9.0, com.facebook.fresco:animated-gif:1.9.0, com.squareup.picasso:picasso:2.71828
|
||||||
|
|
||||||
# (str) python-for-android branch to use, defaults to master
|
# (str) python-for-android branch to use, defaults to master
|
||||||
#p4a.branch = stable
|
#p4a.branch = stable
|
||||||
|
|
|
@ -89,7 +89,7 @@ fullscreen = 0
|
||||||
android.permissions = ACCESS_NETWORK_STATE,BLUETOOTH,INTERNET,READ_EXTERNAL_STORAGE,WRITE_EXTERNAL_STORAGE
|
android.permissions = ACCESS_NETWORK_STATE,BLUETOOTH,INTERNET,READ_EXTERNAL_STORAGE,WRITE_EXTERNAL_STORAGE
|
||||||
|
|
||||||
# (int) Android API to use
|
# (int) Android API to use
|
||||||
android.api = 27
|
android.api = 28
|
||||||
|
|
||||||
# (int) Minimum API required
|
# (int) Minimum API required
|
||||||
android.minapi = 21
|
android.minapi = 21
|
||||||
|
@ -148,7 +148,7 @@ android.react_src = ./app
|
||||||
|
|
||||||
# (list) Gradle dependencies to add (currently works only with sdl2_gradle
|
# (list) Gradle dependencies to add (currently works only with sdl2_gradle
|
||||||
# bootstrap)
|
# bootstrap)
|
||||||
android.gradle_dependencies = com.android.support:support-v4:27.1.1, com.android.support:support-media-compat:27.1.1, com.android.support:appcompat-v7:27.1.1, com.facebook.react:react-native:0.55.3, com.mixpanel.android:mixpanel-android:5+, com.google.android.gms:play-services-gcm:11.0.4+, com.facebook.fresco:fresco:1.9.0, com.facebook.fresco:animated-gif:1.9.0, com.squareup.picasso:picasso:2.71828
|
android.gradle_dependencies = com.android.support:support-v4:27.1.1, com.android.support:support-media-compat:27.1.1, com.android.support:appcompat-v7:27.1.1, com.facebook.react:react-native:0.59.3, com.mixpanel.android:mixpanel-android:5+, com.google.android.gms:play-services-gcm:11.0.4+, com.facebook.fresco:fresco:1.9.0, com.facebook.fresco:animated-gif:1.9.0, com.squareup.picasso:picasso:2.71828
|
||||||
|
|
||||||
# (str) python-for-android branch to use, defaults to master
|
# (str) python-for-android branch to use, defaults to master
|
||||||
#p4a.branch = stable
|
#p4a.branch = stable
|
||||||
|
|
|
@ -89,7 +89,7 @@ fullscreen = 0
|
||||||
android.permissions = ACCESS_NETWORK_STATE,BLUETOOTH,INTERNET,READ_EXTERNAL_STORAGE,WRITE_EXTERNAL_STORAGE
|
android.permissions = ACCESS_NETWORK_STATE,BLUETOOTH,INTERNET,READ_EXTERNAL_STORAGE,WRITE_EXTERNAL_STORAGE
|
||||||
|
|
||||||
# (int) Android API to use
|
# (int) Android API to use
|
||||||
android.api = 27
|
android.api = 28
|
||||||
|
|
||||||
# (int) Minimum API required
|
# (int) Minimum API required
|
||||||
android.minapi = 21
|
android.minapi = 21
|
||||||
|
@ -148,7 +148,7 @@ android.react_src = ./app
|
||||||
|
|
||||||
# (list) Gradle dependencies to add (currently works only with sdl2_gradle
|
# (list) Gradle dependencies to add (currently works only with sdl2_gradle
|
||||||
# bootstrap)
|
# bootstrap)
|
||||||
android.gradle_dependencies = com.android.support:support-v4:27.1.1, com.android.support:support-media-compat:27.1.1, com.android.support:appcompat-v7:27.1.1, com.facebook.react:react-native:0.55.3, com.mixpanel.android:mixpanel-android:5+, com.google.android.gms:play-services-gcm:11.0.4+, com.facebook.fresco:fresco:1.9.0, com.facebook.fresco:animated-gif:1.9.0, com.squareup.picasso:picasso:2.71828
|
android.gradle_dependencies = com.android.support:support-v4:27.1.1, com.android.support:support-media-compat:27.1.1, com.android.support:appcompat-v7:27.1.1, com.facebook.react:react-native:0.59.3, com.mixpanel.android:mixpanel-android:5+, com.google.android.gms:play-services-gcm:11.0.4+, com.facebook.fresco:fresco:1.9.0, com.facebook.fresco:animated-gif:1.9.0, com.squareup.picasso:picasso:2.71828
|
||||||
|
|
||||||
# (str) python-for-android branch to use, defaults to master
|
# (str) python-for-android branch to use, defaults to master
|
||||||
#p4a.branch = stable
|
#p4a.branch = stable
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
<!-- OpenGL ES 2.0 -->
|
<!-- OpenGL ES 2.0 -->
|
||||||
<uses-feature android:glEsVersion="0x00020000" />
|
<uses-feature android:glEsVersion="0x00020000" />
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||||
{% for perm in args.permissions %}
|
{% for perm in args.permissions %}
|
||||||
{% if '.' in perm %}
|
{% if '.' in perm %}
|
||||||
<uses-permission android:name="{{ perm }}" />
|
<uses-permission android:name="{{ perm }}" />
|
||||||
|
@ -54,7 +55,8 @@
|
||||||
android:icon="@drawable/icon"
|
android:icon="@drawable/icon"
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:theme="@style/LbryAppTheme"
|
android:theme="@style/LbryAppTheme"
|
||||||
android:hardwareAccelerated="true">
|
android:hardwareAccelerated="true"
|
||||||
|
android:usesCleartextTraffic="true">
|
||||||
|
|
||||||
{% for m in args.meta_data %}
|
{% for m in args.meta_data %}
|
||||||
<meta-data android:name="{{ m.split('=', 1)[0] }}" android:value="{{ m.split('=', 1)[-1] }}"/>{% endfor %}
|
<meta-data android:name="{{ m.split('=', 1)[0] }}" android:value="{{ m.split('=', 1)[-1] }}"/>{% endfor %}
|
||||||
|
|
|
@ -19,52 +19,52 @@ allprojects {
|
||||||
// All of React Native (JS, Android binaries) is installed from npm
|
// All of React Native (JS, Android binaries) is installed from npm
|
||||||
url "$rootDir/react/node_modules/react-native/android"
|
url "$rootDir/react/node_modules/react-native/android"
|
||||||
}
|
}
|
||||||
flatDir {
|
flatDir {
|
||||||
dirs 'libs'
|
dirs 'libs'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'com.android.application'
|
apply plugin: 'com.android.application'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion {{ android_api }}
|
compileSdkVersion {{ android_api }}
|
||||||
buildToolsVersion '{{ build_tools_version }}'
|
buildToolsVersion '{{ build_tools_version }}'
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion {{ args.min_sdk_version }}
|
minSdkVersion {{ args.min_sdk_version }}
|
||||||
targetSdkVersion {{ android_api }}
|
targetSdkVersion {{ android_api }}
|
||||||
versionCode {{ args.numeric_version }}
|
versionCode {{ args.numeric_version }}
|
||||||
versionName '{{ args.version }}'
|
versionName '{{ args.version }}'
|
||||||
|
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters "armeabi-v7a", "x86"
|
abiFilters "armeabi-v7a", "x86"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dexOptions {
|
dexOptions {
|
||||||
jumboMode true
|
jumboMode true
|
||||||
}
|
}
|
||||||
|
|
||||||
{% if args.sign -%}
|
{% if args.sign -%}
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
storeFile file(System.getenv("P4A_RELEASE_KEYSTORE"))
|
storeFile file(System.getenv("P4A_RELEASE_KEYSTORE"))
|
||||||
keyAlias System.getenv("P4A_RELEASE_KEYALIAS")
|
keyAlias System.getenv("P4A_RELEASE_KEYALIAS")
|
||||||
storePassword System.getenv("P4A_RELEASE_KEYSTORE_PASSWD")
|
storePassword System.getenv("P4A_RELEASE_KEYSTORE_PASSWD")
|
||||||
keyPassword System.getenv("P4A_RELEASE_KEYALIAS_PASSWD")
|
keyPassword System.getenv("P4A_RELEASE_KEYALIAS_PASSWD")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
debug {
|
debug {
|
||||||
}
|
}
|
||||||
release {
|
release {
|
||||||
{% if args.sign -%}
|
{% if args.sign -%}
|
||||||
signingConfig signingConfigs.release
|
signingConfig signingConfigs.release
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
|
@ -77,7 +77,7 @@ ext {
|
||||||
compileSdkVersion = {{ android_api }}
|
compileSdkVersion = {{ android_api }}
|
||||||
buildToolsVersion = '{{ build_tools_version }}'
|
buildToolsVersion = '{{ build_tools_version }}'
|
||||||
minSdkVersion = {{ args.min_sdk_version }}
|
minSdkVersion = {{ args.min_sdk_version }}
|
||||||
targetSdkVersion = {{ android_api }}
|
targetSdkVersion = {{ android_api }}
|
||||||
}
|
}
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
|
@ -92,16 +92,18 @@ subprojects {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
compile project(':@react-native-community_async-storage')
|
||||||
compile project(':react-native-exception-handler')
|
compile project(':react-native-exception-handler')
|
||||||
compile project(':react-native-fast-image')
|
compile project(':react-native-fast-image')
|
||||||
|
compile project(':react-native-gesture-handler')
|
||||||
|
compile project(':react-native-video')
|
||||||
compile project(':rn-fetch-blob')
|
compile project(':rn-fetch-blob')
|
||||||
compile project(':react-native-video')
|
|
||||||
{%- for aar in aars %}
|
{%- for aar in aars %}
|
||||||
compile(name: '{{ aar }}', ext: 'aar')
|
compile(name: '{{ aar }}', ext: 'aar')
|
||||||
{%- endfor -%}
|
{%- endfor -%}
|
||||||
{%- if args.depends -%}
|
{%- if args.depends -%}
|
||||||
{%- for depend in args.depends %}
|
{%- for depend in args.depends %}
|
||||||
compile '{{ depend }}'
|
compile '{{ depend }}'
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
rootProject.name = 'browser'
|
rootProject.name = 'browser'
|
||||||
|
include ':@react-native-community_async-storage'
|
||||||
|
project(':@react-native-community_async-storage').projectDir = new File(rootProject.projectDir, './react/node_modules/@react-native-community/async-storage/android')
|
||||||
include ':react-native-exception-handler'
|
include ':react-native-exception-handler'
|
||||||
project(':react-native-exception-handler').projectDir = new File(rootProject.projectDir, './react/node_modules/react-native-exception-handler/android')
|
project(':react-native-exception-handler').projectDir = new File(rootProject.projectDir, './react/node_modules/react-native-exception-handler/android')
|
||||||
include ':react-native-fast-image'
|
include ':react-native-fast-image'
|
||||||
project(':react-native-fast-image').projectDir = new File(rootProject.projectDir, './react/node_modules/react-native-fast-image/android')
|
project(':react-native-fast-image').projectDir = new File(rootProject.projectDir, './react/node_modules/react-native-fast-image/android')
|
||||||
include ':rn-fetch-blob'
|
include ':react-native-gesture-handler'
|
||||||
project(':rn-fetch-blob').projectDir = new File(rootProject.projectDir, './react/node_modules/rn-fetch-blob/android')
|
project(':react-native-gesture-handler').projectDir = new File(rootProject.projectDir, './react/node_modules/react-native-gesture-handler/android')
|
||||||
include ':react-native-video'
|
include ':react-native-video'
|
||||||
project(':react-native-video').projectDir = new File(rootProject.projectDir, './react/node_modules/react-native-video/android-exoplayer')
|
project(':react-native-video').projectDir = new File(rootProject.projectDir, './react/node_modules/react-native-video/android-exoplayer')
|
||||||
|
include ':rn-fetch-blob'
|
||||||
|
project(':rn-fetch-blob').projectDir = new File(rootProject.projectDir, './react/node_modules/rn-fetch-blob/android')
|
||||||
|
|
|
@ -31,6 +31,10 @@ import com.facebook.react.bridge.ReactContext;
|
||||||
import com.facebook.react.bridge.WritableMap;
|
import com.facebook.react.bridge.WritableMap;
|
||||||
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
||||||
import com.facebook.react.shell.MainReactPackage;
|
import com.facebook.react.shell.MainReactPackage;
|
||||||
|
import com.facebook.react.ReactRootView;
|
||||||
|
import com.reactnativecommunity.asyncstorage.AsyncStoragePackage;
|
||||||
|
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
|
||||||
|
import com.swmansion.gesturehandler.react.RNGestureHandlerPackage;
|
||||||
import com.RNFetchBlob.RNFetchBlobPackage;
|
import com.RNFetchBlob.RNFetchBlobPackage;
|
||||||
|
|
||||||
import io.lbry.browser.reactpackages.LbryReactPackage;
|
import io.lbry.browser.reactpackages.LbryReactPackage;
|
||||||
|
@ -116,15 +120,17 @@ public class MainActivity extends Activity implements DefaultHardwareBackBtnHand
|
||||||
ServiceHelper.start(this, "", LbrynetService.class, "lbrynetservice");
|
ServiceHelper.start(this, "", LbrynetService.class, "lbrynetservice");
|
||||||
}
|
}
|
||||||
|
|
||||||
mReactRootView = new ReactRootView(this);
|
mReactRootView = new RNGestureHandlerEnabledRootView(this);
|
||||||
mReactInstanceManager = ReactInstanceManager.builder()
|
mReactInstanceManager = ReactInstanceManager.builder()
|
||||||
.setApplication(getApplication())
|
.setApplication(getApplication())
|
||||||
.setBundleAssetName("index.android.bundle")
|
.setBundleAssetName("index.android.bundle")
|
||||||
.setJSMainModulePath("index")
|
.setJSMainModulePath("index")
|
||||||
.addPackage(new MainReactPackage())
|
.addPackage(new MainReactPackage())
|
||||||
|
.addPackage(new AsyncStoragePackage())
|
||||||
.addPackage(new FastImageViewPackage())
|
.addPackage(new FastImageViewPackage())
|
||||||
.addPackage(new ReactVideoPackage())
|
.addPackage(new ReactVideoPackage())
|
||||||
.addPackage(new RNFetchBlobPackage())
|
.addPackage(new RNFetchBlobPackage())
|
||||||
|
.addPackage(new RNGestureHandlerPackage())
|
||||||
.addPackage(new LbryReactPackage())
|
.addPackage(new LbryReactPackage())
|
||||||
.setUseDeveloperSupport(true)
|
.setUseDeveloperSupport(true)
|
||||||
.setInitialLifecycleState(LifecycleState.RESUMED)
|
.setInitialLifecycleState(LifecycleState.RESUMED)
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 134 B |
Binary file not shown.
After Width: | Height: | Size: 100 B |
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 134 B |
Binary file not shown.
After Width: | Height: | Size: 167 B |
Binary file not shown.
After Width: | Height: | Size: 207 B |
Loading…
Reference in a new issue