downgrade native-base version

This commit is contained in:
Dawid Wysokiński 2021-04-04 13:36:35 +02:00
parent 0b6f1718ea
commit f9cecc1f8e
9 changed files with 248 additions and 2312 deletions

View File

@ -1,7 +1,6 @@
apply plugin: "com.android.application" apply plugin: "com.android.application"
apply plugin: "com.google.gms.google-services" apply plugin: "com.google.gms.google-services"
apply plugin: "com.google.firebase.crashlytics" apply plugin: "com.google.firebase.crashlytics"
apply from: '../../node_modules/react-native-unimodules/gradle.groovy'
import com.android.build.OutputFile import com.android.build.OutputFile
@ -193,8 +192,6 @@ dependencies {
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
addUnimodulesDependencies()
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni' exclude group:'com.facebook.fbjni'
} }

View File

@ -3,7 +3,6 @@ package com.dawidwysokinski.zdamegzaminzawodowy;
import android.app.Application; import android.app.Application;
import android.content.Context; import android.content.Context;
import com.dawidwysokinski.zdamegzaminzawodowy.generated.BasePackageList;
import com.facebook.react.PackageList; import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication; import com.facebook.react.ReactApplication;
import com.facebook.react.ReactInstanceManager; import com.facebook.react.ReactInstanceManager;
@ -11,15 +10,10 @@ import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage; import com.facebook.react.ReactPackage;
import com.facebook.soloader.SoLoader; import com.facebook.soloader.SoLoader;
import org.unimodules.adapters.react.ModuleRegistryAdapter;
import org.unimodules.adapters.react.ReactModuleRegistryProvider;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.util.Arrays;
import java.util.List; import java.util.List;
public class MainApplication extends Application implements ReactApplication { public class MainApplication extends Application implements ReactApplication {
private final ReactModuleRegistryProvider mModuleRegistryProvider = new ReactModuleRegistryProvider(new BasePackageList().getPackageList(), null);
private final ReactNativeHost mReactNativeHost = private final ReactNativeHost mReactNativeHost =
new ReactNativeHost(this) { new ReactNativeHost(this) {
@ -34,10 +28,6 @@ public class MainApplication extends Application implements ReactApplication {
List<ReactPackage> packages = new PackageList(this).getPackages(); List<ReactPackage> packages = new PackageList(this).getPackages();
// Packages that cannot be autolinked yet can be added manually here, for example: // Packages that cannot be autolinked yet can be added manually here, for example:
// packages.add(new MyReactNativePackage()); // packages.add(new MyReactNativePackage());
List<ReactPackage> unimodules = Arrays.<ReactPackage>asList(
new ModuleRegistryAdapter(mModuleRegistryProvider)
);
packages.addAll(unimodules);
return packages; return packages;
} }

View File

@ -1,17 +0,0 @@
package com.dawidwysokinski.zdamegzaminzawodowy.generated;
import java.util.Arrays;
import java.util.List;
import org.unimodules.core.interfaces.Package;
public class BasePackageList {
public List<Package> getPackageList() {
return Arrays.<Package>asList(
new expo.modules.constants.ConstantsPackage(),
new expo.modules.filesystem.FileSystemPackage(),
new expo.modules.font.FontLoaderPackage(),
new expo.modules.imageloader.ImageLoaderPackage(),
new expo.modules.permissions.PermissionsPackage()
);
}
}

View File

@ -10,7 +10,7 @@
# Specifies the JVM arguments used for the daemon process. # Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings. # The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m # Default value: -Xmx10248m -XX:MaxPermSize=256m
org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode. # When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit # This option should only be used with decoupled projects. More details, visit

View File

@ -1,4 +1,3 @@
rootProject.name = 'ZdamEgzaminZawodowy' rootProject.name = 'ZdamEgzaminZawodowy'
apply from: '../node_modules/react-native-unimodules/gradle.groovy'; includeUnimodulesProjects()
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app' include ':app'

View File

@ -12,7 +12,6 @@
}, },
"dependencies": { "dependencies": {
"@apollo/client": "^3.3.13", "@apollo/client": "^3.3.13",
"@expo/vector-icons": "^12.0.4",
"@react-native-async-storage/async-storage": "^1.15.1", "@react-native-async-storage/async-storage": "^1.15.1",
"@react-native-community/masked-view": "^0.1.10", "@react-native-community/masked-view": "^0.1.10",
"@react-native-firebase/analytics": "^11.2.0", "@react-native-firebase/analytics": "^11.2.0",
@ -24,7 +23,7 @@
"date-fns": "^2.19.0", "date-fns": "^2.19.0",
"graphql": "^15.5.0", "graphql": "^15.5.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"native-base": "^3.0.0-next.36", "native-base": "^2.15.2",
"react": "17.0.1", "react": "17.0.1",
"react-native": "0.64.0", "react-native": "0.64.0",
"react-native-bootsplash": "^3.2.0", "react-native-bootsplash": "^3.2.0",
@ -32,10 +31,7 @@
"react-native-reanimated": "^2.1.0", "react-native-reanimated": "^2.1.0",
"react-native-safe-area-context": "^3.2.0", "react-native-safe-area-context": "^3.2.0",
"react-native-screens": "^3.0.0", "react-native-screens": "^3.0.0",
"react-native-svg": "^12.1.0", "react-native-svg": "^12.1.0"
"react-native-unimodules": "~0.10.1",
"styled-components": "^5.2.3",
"styled-system": "^5.1.5"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.12.9", "@babel/core": "^7.12.9",

View File

@ -2,33 +2,20 @@ import 'react-native-gesture-handler';
import React, { useEffect, useRef } from 'react'; import React, { useEffect, useRef } from 'react';
import { ApolloProvider } from '@apollo/client'; import { ApolloProvider } from '@apollo/client';
import RNBootSplash from 'react-native-bootsplash'; import RNBootSplash from 'react-native-bootsplash';
import { extendTheme, NativeBaseProvider } from 'native-base';
import { createClient } from 'libs/graphql'; import { createClient } from 'libs/graphql';
import { API_URI } from 'config/api'; import { API_URI } from 'config/api';
import Navigation from './Navigation'; import Navigation from './Navigation';
const App = () => { const App = () => {
const client = useRef(createClient(API_URI)).current; const client = useRef(createClient(API_URI)).current;
const theme = useRef(
extendTheme({
colors: {
// Add new color
primary: {
200: '#448AFF',
},
},
}),
).current;
useEffect(() => { useEffect(() => {
RNBootSplash.hide({ fade: true }); RNBootSplash.hide({ fade: true });
}, []); }, []);
return ( return (
<NativeBaseProvider theme={theme}> <ApolloProvider client={client}>
<ApolloProvider client={client}> <Navigation />
<Navigation /> </ApolloProvider>
</ApolloProvider>
</NativeBaseProvider>
); );
}; };

View File

@ -1,11 +1,13 @@
import React from 'react'; import React from 'react';
import { View, Heading } from 'native-base'; import { Container, Content, H1 } from 'native-base';
const HomeScreen = () => { const HomeScreen = () => {
return ( return (
<View> <Container>
<Heading color="primary.200">Zdam Egzamin Zawodowy</Heading> <Content>
</View> <H1>Zdam Egzamin Zawodowy</H1>
</Content>
</Container>
); );
}; };

2490
yarn.lock

File diff suppressed because it is too large Load Diff