1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Got app to build again

This commit is contained in:
Laurent Cozic 2020-10-13 17:02:59 +01:00
parent 89263ac742
commit 3b0e3f6f43
8 changed files with 76 additions and 36 deletions

View File

@ -134,6 +134,12 @@ android {
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
// https://github.com/react-native-community/react-native-camera/issues/2138
missingDimensionStrategy 'react-native-camera', 'general'
// Needed to fix: The number of method references in a .dex file cannot exceed 64K
multiDexEnabled true
}
splits {
abi {
@ -184,7 +190,7 @@ dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
@ -207,6 +213,9 @@ dependencies {
} else {
implementation jscFlavor
}
// Needed to fix: The number of method references in a .dex file cannot exceed 64K
implementation 'com.android.support:multidex:2.0.1'
}
// Run this once to be able to run the application with BUCK

View File

@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.joplin">
package="net.cozic.joplin">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

View File

@ -10,9 +10,17 @@ import com.facebook.react.ReactPackage;
import com.facebook.soloader.SoLoader;
import java.lang.reflect.InvocationTargetException;
import java.util.List;
import androidx.multidex.MultiDex;
public class MainApplication extends Application implements ReactApplication {
// Needed to fix: The number of method references in a .dex file cannot exceed 64K
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
private final ReactNativeHost mReactNativeHost =
new ReactNativeHost(this) {
@Override

View File

@ -1,3 +1,11 @@
const {main} = require('./main.js');
// const {main} = require('./main.js');
main();
// main();
import {AppRegistry} from 'react-native';
const {Root} = require('./root.js');
// import App from './App';
// import {name as appName} from './app.json';
AppRegistry.registerComponent('Joplin', () => Root);

View File

@ -1,3 +1,5 @@
// TODO: NOT USED ANYMORE, BUT COPY CONTENT BELOW TO index.js
// Note about the application structure:
// - The user interface and its state is managed by React/Redux.
// - Persistent storage to SQLite and Web API is handled outside of React/Redux using regular JavaScript (no middleware, no thunk, etc.).
@ -8,29 +10,39 @@
// console.disableYellowBox = true
import {YellowBox, AppRegistry} from 'react-native';
YellowBox.ignoreWarnings([
'Require cycle: node_modules/react-native-',
'Require cycle: node_modules/rn-fetch-blob',
'Warning: componentWillReceiveProps has been renamed',
'Warning: componentWillUpdate has been renamed',
'Warning: componentWillMount has been renamed',
]);
const {Root} = require('./root.js');
// import {YellowBox, AppRegistry} from 'react-native';
// YellowBox.ignoreWarnings([
// 'Require cycle: node_modules/react-native-',
// 'Require cycle: node_modules/rn-fetch-blob',
// 'Warning: componentWillReceiveProps has been renamed',
// 'Warning: componentWillUpdate has been renamed',
// 'Warning: componentWillMount has been renamed',
// ]);
// const {Root} = require('./root.js');
// Disable buggy Fast Refresh
// NOTE: not working - can make the app go into an infinite crash/restart loop
// if (__DEV__) {
// const { DevSettings } = NativeModules;
// DevSettings.setHotLoadingEnabled(false);
// DevSettings.setLiveReloadEnabled(false);
// // Disable buggy Fast Refresh
// // NOTE: not working - can make the app go into an infinite crash/restart loop
// // if (__DEV__) {
// // const { DevSettings } = NativeModules;
// // DevSettings.setHotLoadingEnabled(false);
// // DevSettings.setLiveReloadEnabled(false);
// // }
// function main() {
// AppRegistry.registerComponent('Joplin', () => Root);
// console.ignoredYellowBox = ['Remote debugger'];
// // Note: The final part of the initialization process is in
// // AppComponent.componentDidMount(), when the application is ready.
// }
function main() {
AppRegistry.registerComponent('Joplin', () => Root);
console.ignoredYellowBox = ['Remote debugger'];
// Note: The final part of the initialization process is in
// AppComponent.componentDidMount(), when the application is ready.
}
// module.exports = {main};
module.exports = {main};
// import {AppRegistry} from 'react-native';
// const {Root} = require('./root.js');
// // import App from './App';
// // import {name as appName} from './app.json';
// AppRegistry.registerComponent('Joplin', () => Root);

View File

@ -10703,9 +10703,12 @@
}
},
"react-native-action-button": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/react-native-action-button/-/react-native-action-button-2.6.9.tgz",
"integrity": "sha1-+WCdZaxAqsCuHCvQXceogROV1is="
"version": "2.8.5",
"resolved": "https://registry.npmjs.org/react-native-action-button/-/react-native-action-button-2.8.5.tgz",
"integrity": "sha512-BvGZpzuGeuFR2Y6j93+vKiSqDhsF87VHvNXFs/qEYKfzT4b1ASAT/GQbgS6gNt4jRJCUnJWYrIwlBzRjesZQmQ==",
"requires": {
"prop-types": "^15.5.10"
}
},
"react-native-camera": {
"version": "3.40.0",
@ -10821,9 +10824,9 @@
}
},
"react-native-popup-dialog": {
"version": "0.9.35",
"resolved": "https://registry.npmjs.org/react-native-popup-dialog/-/react-native-popup-dialog-0.9.35.tgz",
"integrity": "sha1-3yO918IYNphTUSXkaLjX/81bXG0=",
"version": "0.9.41",
"resolved": "https://registry.npmjs.org/react-native-popup-dialog/-/react-native-popup-dialog-0.9.41.tgz",
"integrity": "sha1-6006ApVHk3nM1qZWhozgNiQ/0h4=",
"requires": {
"babel-plugin-flow-react-proptypes": "^5.1.1",
"prop-types": "^15.5.8"

View File

@ -54,7 +54,7 @@
"react": "16.13.1",
"react-async": "^10.0.0",
"react-native": "0.63.3",
"react-native-action-button": "^2.6.9",
"react-native-action-button": "^2.8.5",
"react-native-camera": "^3.40.0",
"react-native-datepicker": "^1.7.2",
"react-native-device-info": "^6.2.0",
@ -65,7 +65,7 @@
"react-native-fs": "^2.16.6",
"react-native-image-picker": "^2.3.4",
"react-native-image-resizer": "^1.3.0",
"react-native-popup-dialog": "^0.9.35",
"react-native-popup-dialog": "^0.9.41",
"react-native-popup-menu": "^0.10.0",
"react-native-quick-actions": "^0.3.13",
"react-native-securerandom": "^1.0.0-rc.0",

View File

@ -8,7 +8,7 @@ const { connect, Provider } = require('react-redux');
const { BackButtonService } = require('lib/services/back-button.js');
const NavService = require('lib/services/NavService.js');
const AlarmService = require('lib/services/AlarmService.js').default;
const AlarmServiceDriver = require('lib/services/AlarmServiceDriver').default;
// const AlarmServiceDriver = require('lib/services/AlarmServiceDriver').default;
const Alarm = require('lib/models/Alarm').default;
const { createStore, applyMiddleware } = require('redux');
const reduxSharedMiddleware = require('lib/components/shared/reduxSharedMiddleware');
@ -442,7 +442,7 @@ async function initialize(dispatch) {
Resource.fsDriver_ = fsDriver;
FileApiDriverLocal.fsDriver_ = fsDriver;
AlarmService.setDriver(new AlarmServiceDriver());
// AlarmService.setDriver(new AlarmServiceDriver());
AlarmService.setLogger(mainLogger);
try {