Skip to content

Commit b7b7800

Browse files
committed
react-native 0.59.5w & react-native-code-push 5.6.0
1 parent 95e32ab commit b7b7800

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+11642
-6744
lines changed

.babelrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.flowconfig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@
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
3130

31+
esproposal.optional_chaining=enable
32+
esproposal.nullish_coalescing=enable
33+
3234
module.system=haste
3335
module.system.haste.use_name_reducers=true
3436
# get basename
@@ -64,4 +66,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
6466
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
6567

6668
[version]
67-
^0.75.0
69+
^0.92.0

App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,4 @@ let codePushOptions = { checkFrequency: CodePush.CheckFrequency.MANUAL };
159159

160160
App = CodePush(codePushOptions)(App);
161161

162-
export default App;
162+
export default App;

README.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

__tests__/App-test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* @format
3+
*/
4+
5+
import 'react-native';
6+
import React from 'react';
7+
import App from '../App';
8+
9+
// Note: test renderer must be required after react-native.
10+
import renderer from 'react-test-renderer';
11+
12+
it('renders correctly', () => {
13+
renderer.create(<App />);
14+
});

android/app/BUCK

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,13 @@
88
# - `buck install -r android/app` - compile, install and run application
99
#
1010

11+
load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12+
1113
lib_deps = []
1214

13-
for jarfile in glob(['libs/*.jar']):
14-
name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
15-
lib_deps.append(':' + name)
16-
prebuilt_jar(
17-
name = name,
18-
binary_jar = jarfile,
19-
)
15+
create_aar_targets(glob(["libs/*.aar"]))
2016

21-
for aarfile in glob(['libs/*.aar']):
22-
name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]
23-
lib_deps.append(':' + name)
24-
android_prebuilt_aar(
25-
name = name,
26-
aar = aarfile,
27-
)
17+
create_jar_targets(glob(["libs/*.jar"]))
2818

2919
android_library(
3020
name = "all-libs",
@@ -45,12 +35,12 @@ android_library(
4535

4636
android_build_config(
4737
name = "build_config",
48-
package = "com.codepushdemoapp",
38+
package = "com.codepushdemo",
4939
)
5040

5141
android_resource(
5242
name = "res",
53-
package = "com.codepushdemoapp",
43+
package = "com.codepushdemo",
5444
res = "src/main/res",
5545
)
5646

android/app/build.gradle

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,24 +96,25 @@ def enableProguardInReleaseBuilds = false
9696

9797
android {
9898
compileSdkVersion rootProject.ext.compileSdkVersion
99-
buildToolsVersion rootProject.ext.buildToolsVersion
99+
100+
compileOptions {
101+
sourceCompatibility JavaVersion.VERSION_1_8
102+
targetCompatibility JavaVersion.VERSION_1_8
103+
}
100104

101105
defaultConfig {
102-
applicationId "com.codepushdemoapp"
106+
applicationId "com.codepushdemo"
103107
minSdkVersion rootProject.ext.minSdkVersion
104108
targetSdkVersion rootProject.ext.targetSdkVersion
105-
versionCode 20180818
109+
versionCode 20190504
106110
versionName "5.6.0"
107-
ndk {
108-
abiFilters "armeabi-v7a", "x86"
109-
}
110111
}
111112
splits {
112113
abi {
113114
reset()
114115
enable enableSeparateBuildPerCPUArchitecture
115116
universalApk false // If true, also generate a universal APK
116-
include "armeabi-v7a", "x86"
117+
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
117118
}
118119
}
119120
signingConfigs {
@@ -136,7 +137,7 @@ android {
136137
variant.outputs.each { output ->
137138
// For each separate APK per architecture, set a unique version code as described here:
138139
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
139-
def versionCodes = ["armeabi-v7a":1, "x86":2]
140+
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]
140141
def abi = output.getFilter(OutputFile.ABI)
141142
if (abi != null) { // null for the universal-debug, universal-release variants
142143
output.versionCodeOverride =
@@ -147,10 +148,10 @@ android {
147148
}
148149

149150
dependencies {
150-
compile project(':react-native-code-push')
151-
compile fileTree(dir: "libs", include: ["*.jar"])
152-
compile "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
153-
compile "com.facebook.react:react-native:+" // From node_modules
151+
implementation project(':react-native-code-push')
152+
implementation fileTree(dir: "libs", include: ["*.jar"])
153+
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
154+
implementation "com.facebook.react:react-native:+" // From node_modules
154155
}
155156

156157
// Run this once to be able to run the application with BUCK

android/app/build_defs.bzl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""Helper definitions to glob .aar and .jar targets"""
2+
3+
def create_aar_targets(aarfiles):
4+
for aarfile in aarfiles:
5+
name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")]
6+
lib_deps.append(":" + name)
7+
android_prebuilt_aar(
8+
name = name,
9+
aar = aarfile,
10+
)
11+
12+
def create_jar_targets(jarfiles):
13+
for jarfile in jarfiles:
14+
name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")]
15+
lib_deps.append(":" + name)
16+
prebuilt_jar(
17+
name = name,
18+
binary_jar = jarfile,
19+
)
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>

android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.codepushdemoapp">
2+
package="com.codepushdemo">
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"
98
android:label="@string/app_name"
109
android:icon="@mipmap/ic_launcher"
10+
android:roundIcon="@mipmap/ic_launcher_round"
1111
android:allowBackup="false"
1212
android:theme="@style/AppTheme">
1313
<activity

android/app/src/main/java/com/codepushdemoapp/MainActivity.java renamed to android/app/src/main/java/com/codepushdemo/MainActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.codepushdemoapp;
1+
package com.codepushdemo;
22

33
import com.facebook.react.ReactActivity;
44

@@ -10,6 +10,6 @@ public class MainActivity extends ReactActivity {
1010
*/
1111
@Override
1212
protected String getMainComponentName() {
13-
return "CodePushDemoApp";
13+
return "CodePushDemo";
1414
}
1515
}

android/app/src/main/java/com/codepushdemoapp/MainApplication.java renamed to android/app/src/main/java/com/codepushdemo/MainApplication.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.codepushdemoapp;
1+
package com.codepushdemo;
22

33
import android.app.Application;
44

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<resources>
2-
<string moduleConfig="true" name="reactNativeCodePush_androidDeploymentKey">BPPCDEeergFkpHur4YNXCjqXVjR6qLF160UDg</string>
2+
<string moduleConfig="true" name="reactNativeCodePush_androidDeploymentKey">BPPCDEeergFkpHur4YNXCjqXVjR6qLF160UDg</string>
33
<string moduleConfig="true" name="reactNativeCodePush_androidServerURL">http://api.code-push.com/</string>
4-
<string name="app_name">CodePushDemoApp</string>
4+
<string name="app_name">CodePushDemo</string>
55
</resources>

android/build.gradle

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4+
ext {
5+
buildToolsVersion = "28.0.3"
6+
minSdkVersion = 16
7+
compileSdkVersion = 28
8+
targetSdkVersion = 28
9+
supportLibVersion = "28.0.0"
10+
}
411
repositories {
12+
google()
513
jcenter()
6-
maven {
7-
url 'https://maven.google.com/'
8-
name 'Google'
9-
}
1014
}
1115
dependencies {
12-
classpath 'com.android.tools.build:gradle:2.3.3'
16+
classpath 'com.android.tools.build:gradle:3.3.1'
1317

1418
// NOTE: Do not place your application dependencies here; they belong
1519
// in the individual module build.gradle files
@@ -19,22 +23,11 @@ buildscript {
1923
allprojects {
2024
repositories {
2125
mavenLocal()
26+
google()
2227
jcenter()
2328
maven {
2429
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
2530
url "$rootDir/../node_modules/react-native/android"
2631
}
27-
maven {
28-
url 'https://maven.google.com/'
29-
name 'Google'
30-
}
3132
}
3233
}
33-
34-
ext {
35-
buildToolsVersion = "26.0.3"
36-
minSdkVersion = 16
37-
compileSdkVersion = 26
38-
targetSdkVersion = 26
39-
supportLibVersion = "26.1.0"
40-
}

android/gradle.properties

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,3 @@
1616
# This option should only be used with decoupled projects. More details, visit
1717
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
1818
# org.gradle.parallel=true
19-
20-
android.useDeprecatedNdk=true
2.01 KB
Binary file not shown.

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-3.5.1-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip

0 commit comments

Comments
 (0)