Browse Source

Updated project to React Native 0.63.0

Arnaud Vergnet 4 years ago
parent
commit
8156782d10

+ 2
- 2
App.js View File

@@ -1,7 +1,7 @@
1 1
 // @flow
2 2
 
3 3
 import * as React from 'react';
4
-import {Platform, SafeAreaView, StatusBar, View, YellowBox} from 'react-native';
4
+import {LogBox, Platform, SafeAreaView, StatusBar, View} from 'react-native';
5 5
 import LocaleManager from './src/managers/LocaleManager';
6 6
 import AsyncStorageManager from "./src/managers/AsyncStorageManager";
7 7
 import CustomIntroSlider from "./src/components/Overrides/CustomIntroSlider";
@@ -23,7 +23,7 @@ import {OverflowMenuProvider} from "react-navigation-header-buttons";
23 23
 // enableScreens(true);
24 24
 
25 25
 
26
-YellowBox.ignoreWarnings([ // collapsible headers cause this warning, just ignore as it is not an issue
26
+LogBox.ignoreLogs([ // collapsible headers cause this warning, just ignore as it is not an issue
27 27
     'Non-serializable values were found in the navigation state',
28 28
 ]);
29 29
 

+ 2
- 17
android/app/build.gradle View File

@@ -18,7 +18,7 @@ import com.android.build.OutputFile
18 18
  *   // the entry file for bundle generation
19 19
  *   entryFile: "index.android.js",
20 20
  *
21
- *   // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
21
+ *   // https://reactnative.dev/docs/performance#enable-the-ram-format
22 22
  *   bundleCommand: "ram-bundle",
23 23
  *
24 24
  *   // whether to bundle JS and assets in debug mode
@@ -170,28 +170,13 @@ android {
170 170
         }
171 171
         release {
172 172
             // Caution! In production, you need to generate your own keystore file.
173
-            // see https://facebook.github.io/react-native/docs/signed-apk-android.
173
+            // see https://reactnative.dev/docs/signed-apk-android.
174 174
             signingConfig signingConfigs.release
175 175
             minifyEnabled enableProguardInReleaseBuilds
176 176
             proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
177 177
         }
178 178
     }
179 179
 
180
-    packagingOptions {
181
-        pickFirst "lib/armeabi-v7a/libc++_shared.so"
182
-        pickFirst "lib/arm64-v8a/libc++_shared.so"
183
-        pickFirst "lib/x86/libc++_shared.so"
184
-        pickFirst "lib/x86_64/libc++_shared.so"
185
-    }
186
-
187
-    // Force so_loader version to fix crash on apk release
188
-    configurations.all {
189
-        resolutionStrategy {
190
-            force "com.facebook.soloader:soloader:0.8.2"
191
-        }
192
-    }
193
-
194
-
195 180
     // applicationVariants are e.g. debug, release
196 181
     applicationVariants.all { variant ->
197 182
         variant.outputs.each { output ->

+ 4
- 4
android/build.gradle View File

@@ -2,17 +2,17 @@
2 2
 
3 3
 buildscript {
4 4
     ext {
5
-        buildToolsVersion = "28.0.3"
5
+        buildToolsVersion = "29.0.2"
6 6
         minSdkVersion = 21
7
-        compileSdkVersion = 28
8
-        targetSdkVersion = 28
7
+        compileSdkVersion = 29
8
+        targetSdkVersion = 29
9 9
     }
10 10
     repositories {
11 11
         google()
12 12
         jcenter()
13 13
     }
14 14
     dependencies {
15
-        classpath("com.android.tools.build:gradle:3.5.2")
15
+        classpath("com.android.tools.build:gradle:3.5.3")
16 16
 
17 17
         // NOTE: Do not place your application dependencies here; they belong
18 18
         // in the individual module build.gradle files

+ 1
- 1
android/gradle/wrapper/gradle-wrapper.properties View File

@@ -1,5 +1,5 @@
1 1
 distributionBase=GRADLE_USER_HOME
2 2
 distributionPath=wrapper/dists
3
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
3
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip
4 4
 zipStoreBase=GRADLE_USER_HOME
5 5
 zipStorePath=wrapper/dists

+ 12
- 17
android/gradlew View File

@@ -154,19 +154,19 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
154 154
         else
155 155
             eval `echo args$i`="\"$arg\""
156 156
         fi
157
-        i=$((i+1))
157
+        i=`expr $i + 1`
158 158
     done
159 159
     case $i in
160
-        (0) set -- ;;
161
-        (1) set -- "$args0" ;;
162
-        (2) set -- "$args0" "$args1" ;;
163
-        (3) set -- "$args0" "$args1" "$args2" ;;
164
-        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165
-        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166
-        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167
-        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168
-        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169
-        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
160
+        0) set -- ;;
161
+        1) set -- "$args0" ;;
162
+        2) set -- "$args0" "$args1" ;;
163
+        3) set -- "$args0" "$args1" "$args2" ;;
164
+        4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165
+        5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166
+        6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167
+        7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168
+        8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169
+        9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
170 170
     esac
171 171
 fi
172 172
 
@@ -175,14 +175,9 @@ save () {
175 175
     for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176 176
     echo " "
177 177
 }
178
-APP_ARGS=$(save "$@")
178
+APP_ARGS=`save "$@"`
179 179
 
180 180
 # Collect all arguments for the java command, following the shell quoting and substitution rules
181 181
 eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182 182
 
183
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
184
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
185
-  cd "$(dirname "$0")"
186
-fi
187
-
188 183
 exec "$JAVACMD" "$@"

+ 3
- 0
android/gradlew.bat View File

@@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
29 29
 set APP_BASE_NAME=%~n0
30 30
 set APP_HOME=%DIRNAME%
31 31
 
32
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
33
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34
+
32 35
 @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
33 36
 set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
34 37
 

+ 42
- 0
install.sh View File

@@ -0,0 +1,42 @@
1
+#!/bin/bash
2
+
3
+echo "Creating debug android keystore..."
4
+cd android/app && keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000
5
+echo -e "Done\n"
6
+
7
+cd ..
8
+echo "Creating gradle.properties file..."
9
+echo "# Project-wide Gradle settings.
10
+
11
+# IDE (e.g. Android Studio) users:
12
+# Gradle settings configured through the IDE *will override*
13
+# any settings specified in this file.
14
+
15
+# For more details on how to configure your build environment visit
16
+# http://www.gradle.org/docs/current/userguide/build_environment.html
17
+
18
+# Specifies the JVM arguments used for the daemon process.
19
+# The setting is particularly useful for tweaking memory settings.
20
+# Default value: -Xmx10248m -XX:MaxPermSize=256m
21
+# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
22
+
23
+# When configured, Gradle will run in incubating parallel mode.
24
+# This option should only be used with decoupled projects. More details, visit
25
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
26
+# org.gradle.parallel=true
27
+
28
+# AndroidX package structure to make it clearer which packages are bundled with the
29
+# Android operating system, and which are packaged with your app's APK
30
+# https://developer.android.com/topic/libraries/support-library/androidx-rn
31
+android.useAndroidX=true
32
+# Automatically convert third-party libraries to use AndroidX
33
+android.enableJetifier=true
34
+# Version of flipper SDK to use with React Native
35
+FLIPPER_VERSION=0.33.1
36
+# This file is not included in git because it may contain secrets concerning the release key.
37
+# To get those secrets, please contact the author at vergnet@etud.insa-toulouse.fr
38
+" > gradle.properties
39
+echo -e "Done\n"
40
+
41
+./clear-node-cache.sh
42
+

+ 2
- 2
ios/Campus/AppDelegate.m View File

@@ -15,7 +15,7 @@
15 15
 #import <RNCPushNotificationIOS.h>
16 16
 #import <UserNotifications/UserNotifications.h>
17 17
 
18
-#if DEBUG
18
+#ifdef FB_SONARKIT_ENABLED
19 19
 #import <FlipperKit/FlipperClient.h>
20 20
 #import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
21 21
 #import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
@@ -46,7 +46,7 @@ static void InitializeFlipper(UIApplication *application) {
46 46
 
47 47
 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
48 48
 {
49
-  #if DEBUG
49
+  #ifdef FB_SONARKIT_ENABLED
50 50
     InitializeFlipper(application);
51 51
   #endif
52 52
 

+ 5
- 80
ios/Podfile View File

@@ -1,82 +1,7 @@
1
-platform :ios, '9.0'
1
+require_relative '../node_modules/react-native/scripts/react_native_pods'
2 2
 require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3 3
 
4
-def add_flipper_pods!(versions = {})
5
-  versions['Flipper'] ||= '~> 0.33.1'
6
-  versions['DoubleConversion'] ||= '1.1.7'
7
-  versions['Flipper-Folly'] ||= '~> 2.1'
8
-  versions['Flipper-Glog'] ||= '0.3.6'
9
-  versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
10
-  versions['Flipper-RSocket'] ||= '~> 1.0'
11
-  pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug'
12
-  pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => 'Debug'
13
-  pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
14
-  pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => 'Debug'
15
-  pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => 'Debug'
16
-  # List all transitive dependencies for FlipperKit pods
17
-  # to avoid them being linked in Release builds
18
-  pod 'Flipper', versions['Flipper'], :configuration => 'Debug'
19
-  pod 'Flipper-DoubleConversion', versions['DoubleConversion'], :configuration => 'Debug'
20
-  pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => 'Debug'
21
-  pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug'
22
-  pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => 'Debug'
23
-  pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => 'Debug'
24
-  pod 'FlipperKit/Core', versions['Flipper'], :configuration => 'Debug'
25
-  pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => 'Debug'
26
-  pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => 'Debug'
27
-  pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => 'Debug'
28
-  pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => 'Debug'
29
-  pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => 'Debug'
30
-  pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => 'Debug'
31
-  pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
32
-end
33
-
34
-# Post Install processing for Flipper
35
-def flipper_post_install(installer)
36
-  installer.pods_project.targets.each do |target|
37
-    if target.name == 'YogaKit'
38
-      target.build_configurations.each do |config|
39
-        config.build_settings['SWIFT_VERSION'] = '4.1'
40
-      end
41
-    end
42
-  end
43
-end
44
-
45 4
 target 'Campus' do
46
-  # Pods for Campus
47
-  rnPrefix = "../node_modules/react-native"
48
-  pod 'FBLazyVector', :path => "#{rnPrefix}/Libraries/FBLazyVector"
49
-  pod 'FBReactNativeSpec', :path => "#{rnPrefix}/Libraries/FBReactNativeSpec"
50
-  pod 'RCTRequired', :path => "#{rnPrefix}/Libraries/RCTRequired"
51
-  pod 'RCTTypeSafety', :path => "#{rnPrefix}/Libraries/TypeSafety"
52
-  pod 'React', :path => "#{rnPrefix}/"
53
-  pod 'React-Core', :path => "#{rnPrefix}/"
54
-  pod 'React-CoreModules', :path => "#{rnPrefix}/React/CoreModules"
55
-  pod 'React-RCTActionSheet', :path => "#{rnPrefix}/Libraries/ActionSheetIOS"
56
-  pod 'React-RCTAnimation', :path => "#{rnPrefix}/Libraries/NativeAnimation"
57
-  pod 'React-RCTBlob', :path => "#{rnPrefix}/Libraries/Blob"
58
-  pod 'React-RCTImage', :path => "#{rnPrefix}/Libraries/Image"
59
-  pod 'React-RCTLinking', :path => "#{rnPrefix}/Libraries/LinkingIOS"
60
-  pod 'React-RCTNetwork', :path => "#{rnPrefix}/Libraries/Network"
61
-  pod 'React-RCTSettings', :path => "#{rnPrefix}/Libraries/Settings"
62
-  pod 'React-RCTText', :path => "#{rnPrefix}/Libraries/Text"
63
-  pod 'React-RCTVibration', :path => "#{rnPrefix}/Libraries/Vibration"
64
-  pod 'React-Core/RCTWebSocket', :path => "#{rnPrefix}/"
65
-  
66
-  pod 'React-cxxreact', :path => "#{rnPrefix}/ReactCommon/cxxreact"
67
-  pod 'React-jsi', :path => "#{rnPrefix}/ReactCommon/jsi"
68
-  pod 'React-jsiexecutor', :path => "#{rnPrefix}/ReactCommon/jsiexecutor"
69
-  pod 'React-jsinspector', :path => "#{rnPrefix}/ReactCommon/jsinspector"
70
-  pod 'ReactCommon/callinvoker', :path => "#{rnPrefix}/ReactCommon"
71
-  pod 'ReactCommon/turbomodule/core', :path => "#{rnPrefix}/ReactCommon"
72
-  pod 'Yoga', :path => "#{rnPrefix}/ReactCommon/yoga", :modular_headers => true
73
-
74
-  pod 'DoubleConversion', :podspec => "#{rnPrefix}/third-party-podspecs/DoubleConversion.podspec"
75
-  pod 'glog', :podspec => "#{rnPrefix}/third-party-podspecs/glog.podspec"
76
-  pod 'Folly', :podspec => "#{rnPrefix}/third-party-podspecs/Folly.podspec"
77
-
78
-  # react-native-cli autolinking
79
-  use_native_modules!
80 5
 
81 6
   # Permissions
82 7
   permissions_path = '../node_modules/react-native-permissions/ios'
@@ -88,9 +13,9 @@ target 'Campus' do
88 13
   #
89 14
   # Note that if you have use_frameworks! enabled, Flipper will not work and
90 15
   # you should disable these next few lines.
91
-  #add_flipper_pods!
92
-  #post_install do |installer|
93
-  #  flipper_post_install(installer)
94
-  #end
16
+  # use_flipper!
17
+  # post_install do |installer|
18
+  #   flipper_post_install(installer)
19
+  # end
95 20
 
96 21
 end

+ 9
- 9
package.json View File

@@ -28,8 +28,8 @@
28 28
     "@react-navigation/native": "^5.7.0",
29 29
     "@react-navigation/stack": "^5.7.0",
30 30
     "i18n-js": "^3.7.1",
31
-    "react": "16.11.0",
32
-    "react-native": "0.62.2",
31
+    "react": "16.13.1",
32
+    "react-native": "0.63.0",
33 33
     "react-native-animatable": "^1.3.3",
34 34
     "react-native-app-intro-slider": "^4.0.0",
35 35
     "react-native-appearance": "^0.3.4",
@@ -57,15 +57,15 @@
57 57
     "react-navigation-header-buttons": "^4.0.2"
58 58
   },
59 59
   "devDependencies": {
60
-    "@babel/core": "^7.6.2",
61
-    "@babel/runtime": "^7.6.2",
62
-    "@react-native-community/eslint-config": "^0.0.5",
63
-    "babel-jest": "^25.5.1",
60
+    "@babel/core": "^7.8.4",
61
+    "@babel/runtime": "^7.8.4",
62
+    "@react-native-community/eslint-config": "^1.1.0",
63
+    "babel-jest": "^25.1.0",
64 64
     "eslint": "6.5.1",
65 65
     "flow-bin": "^0.123.0",
66
-    "jest": "^25.5.3",
66
+    "jest": "^25.1.0",
67 67
     "jest-extended": "^0.11.5",
68
-    "metro-react-native-babel-preset": "^0.58.0",
69
-    "react-test-renderer": "16.11.0"
68
+    "metro-react-native-babel-preset": "^0.59.0",
69
+    "react-test-renderer": "16.13.1"
70 70
   }
71 71
 }

Loading…
Cancel
Save