Skip to content

Commit d8eec31

Browse files
committed
Update RN to 0.59.5
1 parent ba966c5 commit d8eec31

File tree

12 files changed

+2131
-1132
lines changed

12 files changed

+2131
-1132
lines changed

example/.flowconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
[libs]
2525
node_modules/react-native/Libraries/react-native/react-native-interface.js
2626
node_modules/react-native/flow/
27-
node_modules/react-native/flow-github/
2827

2928
[options]
3029
emoji=true
@@ -67,4 +66,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
6766
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
6867

6968
[version]
70-
^0.86.0
69+
^0.92.0

example/android/app/build.gradle

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ def enableProguardInReleaseBuilds = false
9595

9696
android {
9797
compileSdkVersion rootProject.ext.compileSdkVersion
98-
buildToolsVersion rootProject.ext.buildToolsVersion
98+
compileOptions {
99+
sourceCompatibility JavaVersion.VERSION_1_8
100+
targetCompatibility JavaVersion.VERSION_1_8
101+
}
99102

100103
defaultConfig {
101104
applicationId "com.progressviewexample"
@@ -109,7 +112,7 @@ android {
109112
reset()
110113
enable enableSeparateBuildPerCPUArchitecture
111114
universalApk false // If true, also generate a universal APK
112-
include "armeabi-v7a", "x86", "arm64-v8a"
115+
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
113116
}
114117
}
115118
buildTypes {
@@ -123,7 +126,7 @@ android {
123126
variant.outputs.each { output ->
124127
// For each separate APK per architecture, set a unique version code as described here:
125128
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
126-
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3]
129+
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]
127130
def abi = output.getFilter(OutputFile.ABI)
128131
if (abi != null) { // null for the universal-debug, universal-release variants
129132
output.versionCodeOverride =
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools">
4+
5+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
6+
7+
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
8+
</manifest>

example/android/app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
package="com.progressviewexample">
33

44
<uses-permission android:name="android.permission.INTERNET" />
5-
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
65

76
<application
87
android:name=".MainApplication"

example/android/build.gradle

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
buildscript {
44
ext {
5-
buildToolsVersion = "28.0.2"
5+
buildToolsVersion = "28.0.3"
66
minSdkVersion = 16
77
compileSdkVersion = 28
8-
targetSdkVersion = 27
8+
targetSdkVersion = 28
99
supportLibVersion = "28.0.0"
1010
}
1111
repositories {
1212
google()
1313
jcenter()
1414
}
1515
dependencies {
16-
classpath 'com.android.tools.build:gradle:3.2.1'
16+
classpath 'com.android.tools.build:gradle:3.3.1'
1717

1818
// NOTE: Do not place your application dependencies here; they belong
1919
// in the individual module build.gradle files
@@ -31,9 +31,3 @@ allprojects {
3131
}
3232
}
3333
}
34-
35-
36-
task wrapper(type: Wrapper) {
37-
gradleVersion = '4.7'
38-
distributionUrl = distributionUrl.replace("bin", "all")
39-
}

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip

example/babel.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: ["module:metro-react-native-babel-preset"]
3-
}
2+
presets: ['module:metro-react-native-babel-preset'],
3+
};

example/ios/ProgressViewExample/AppDelegate.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*/
7-
7+
#import <React/RCTBridgeDelegate.h>
88
#import <UIKit/UIKit.h>
99

10-
@interface AppDelegate : UIResponder <UIApplicationDelegate>
10+
@interface AppDelegate : UIResponder <UIApplicationDelegate, RCTBridgeDelegate>
1111

1212
@property (nonatomic, strong) UIWindow *window;
1313

example/ios/ProgressViewExample/AppDelegate.m

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,21 @@
77

88
#import "AppDelegate.h"
99

10+
#import <React/RCTBridge.h>
1011
#import <React/RCTBundleURLProvider.h>
1112
#import <React/RCTRootView.h>
1213

1314
@implementation AppDelegate
1415

1516
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
1617
{
17-
NSURL *jsCodeLocation;
18+
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
19+
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
20+
moduleName:@"RnDiffApp"
21+
initialProperties:nil];
1822

19-
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"example/index" fallbackResource:nil];
2023

21-
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
22-
moduleName:@"ProgressViewExample"
23-
initialProperties:nil
24-
launchOptions:launchOptions];
25-
rootView.backgroundColor = [UIColor blackColor];
24+
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
2625

2726
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
2827
UIViewController *rootViewController = [UIViewController new];
@@ -32,4 +31,13 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
3231
return YES;
3332
}
3433

34+
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
35+
{
36+
#if DEBUG
37+
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
38+
#else
39+
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
40+
#endif
41+
}
42+
3543
@end

example/metro.config.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* Metro configuration for React Native
3+
* https://github.com/facebook/react-native
4+
*
5+
* @format
6+
*/
7+
8+
module.exports = {
9+
transformer: {
10+
getTransformOptions: async () => ({
11+
transform: {
12+
experimentalImportSupport: false,
13+
inlineRequires: false
14+
}
15+
})
16+
}
17+
};

0 commit comments

Comments
 (0)