Skip to content

Commit

Permalink
feat: Upgrade to react native 0.66
Browse files Browse the repository at this point in the history
  • Loading branch information
Marius Reimer committed Oct 24, 2021
1 parent c8526a1 commit aea081c
Show file tree
Hide file tree
Showing 19 changed files with 2,315 additions and 3,022 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
APP_VERSION_CODE=REPLACE_BUILD_NUMBER
APP_VERSION_CODE=5
APP_VERSION_NAME=1.2.0
APP_ID=com.reime005.spaceseek
APP_NAME=Space Seek
GOOGLE_MAPS_KEY=REPLACE_MAPS_KEY
GOOGLE_MAPS_KEY=11
10 changes: 3 additions & 7 deletions __tests__/Basic-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,18 @@ it('SubText renders correctly', async () => {
});

it('BasePage renders correctly', async () => {
const tree = renderer
.create(<BasePage theme={lightTheme}></BasePage>)
.toJSON();
const tree = renderer.create(<BasePage theme={lightTheme} />).toJSON();
expect(tree).toMatchSnapshot();
});

it('StyledBaseScroll renders correctly', async () => {
const tree = renderer
.create(<StyledBaseScroll theme={lightTheme}></StyledBaseScroll>)
.create(<StyledBaseScroll theme={lightTheme} />)
.toJSON();
expect(tree).toMatchSnapshot();
});

it('IconWrapper renders correctly', async () => {
const tree = renderer
.create(<IconWrapper theme={lightTheme}></IconWrapper>)
.toJSON();
const tree = renderer.create(<IconWrapper theme={lightTheme} />).toJSON();
expect(tree).toMatchSnapshot();
});
2 changes: 2 additions & 0 deletions __tests__/__snapshots__/Basic-test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

exports[`BasePage renders correctly 1`] = `
<View
collapsable={false}
nativeID="animatedComponent"
style={
Object {
"backgroundColor": "#fff",
Expand Down
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ dependencies {
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"

debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
exclude group:'com.facebook.fbjni'
}

debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import okhttp3.OkHttpClient;

public class ReactNativeFlipper {
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
public static void initializeFlipper(Context context, final ReactInstanceManager reactInstanceManager) {
if (FlipperUtils.shouldEnableFlipper(context)) {
final FlipperClient client = AndroidFlipperClient.getInstance(context);

Expand All @@ -35,7 +35,7 @@ public static void initializeFlipper(Context context, ReactInstanceManager react
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
client.addPlugin(CrashReporterPlugin.getInstance());

NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
final NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
NetworkingModule.setCustomClientBuilder(
new NetworkingModule.CustomClientBuilder() {
@Override
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
buildscript {
ext {
buildToolsVersion = "29.0.3"
minSdkVersion = 18
minSdkVersion = 21
compileSdkVersion = 29
targetSdkVersion = 29
kotlinVersion = '1.3.41'
Expand Down
2 changes: 1 addition & 1 deletion android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ android.useAndroidX=true
android.enableJetifier=true

# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.54.0
FLIPPER_VERSION=0.99.0
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.2.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 12 additions & 0 deletions detox.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,17 @@ module.exports = {
pathBuilder: './e2e/detox.pathbuilder.android.js',
},
},
'android.emu.debug': {
type: 'android.emulator',
build:
'cd android ; ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug ; cd -',
binaryPath: './android/app/build/outputs/apk/release/app-debug.apk',
device: {
avdName: 'emu',
},
artifacts: {
pathBuilder: './e2e/detox.pathbuilder.android.js',
},
},
},
};
11 changes: 9 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
declare module "*.svg" {
const content: any;
declare module '*.png' {
const content: ImageSourcePropType;
export default content;
}

declare module '*.svg' {
import React from 'react';
import { SvgProps } from 'react-native-svg';
const content: React.FC<SvgProps>;
export default content;
}
20 changes: 11 additions & 9 deletions ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '10.0'
platform :ios, '11.0'

target 'SpaceSeek' do
config = use_native_modules!

use_react_native!(:path => config["reactNativePath"])
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:hermes_enabled => true
)

# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
use_flipper!
post_install do |installer|
flipper_post_install(installer)
# you should disable the next line.
use_flipper!()

installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
post_install do |installer|
react_native_post_install(installer)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
Loading

0 comments on commit aea081c

Please sign in to comment.