Skip to content

Commit f75ff30

Browse files
authored
Merge pull request #283 from AntonPuko/rn057
Rn057
2 parents 7830660 + a990ce8 commit f75ff30

32 files changed

+2630
-1227
lines changed

.babelrc

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"presets": ["react-native"],
3-
"plugins": ["transform-decorators-legacy", "autobind-class-methods"]
2+
"presets": ["module:metro-react-native-babel-preset"],
3+
"plugins": [["@babel/plugin-proposal-decorators", { "legacy": true }]]
44
}

.flowconfig

+17-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,23 @@ node_modules/react-native/flow-github/
3535
[options]
3636
emoji=true
3737

38+
esproposal.optional_chaining=enable
39+
esproposal.nullish_coalescing=enable
40+
3841
module.system=haste
42+
module.system.haste.use_name_reducers=true
43+
# get basename
44+
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
45+
# strip .js or .js.flow suffix
46+
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
47+
# strip .ios suffix
48+
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
49+
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
50+
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
51+
module.system.haste.paths.blacklist=.*/__tests__/.*
52+
module.system.haste.paths.blacklist=.*/__mocks__/.*
53+
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
54+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
3955

4056
munge_underscores=true
4157

@@ -61,4 +77,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
6177
esproposal.decorators=ignore
6278
esproposal.export_star_as=enable
6379
[version]
64-
^0.67.0
80+
^0.78.0

android/app/build.gradle

+23-38
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ def enableSeparateBuildPerCPUArchitecture = false
9494
def enableProguardInReleaseBuilds = false
9595

9696
android {
97-
compileSdkVersion 26
98-
buildToolsVersion '27.0.3'
97+
compileSdkVersion rootProject.ext.compileSdkVersion
98+
buildToolsVersion rootProject.ext.buildToolsVersion
9999

100100
defaultConfig {
101101
applicationId "com.brewskey.app"
102-
minSdkVersion 16
103-
targetSdkVersion 23
102+
minSdkVersion rootProject.ext.minSdkVersion
103+
targetSdkVersion rootProject.ext.targetSdkVersion
104104
versionCode 1
105105
versionName "1.0"
106106
ndk {
@@ -137,40 +137,25 @@ android {
137137
}
138138

139139
dependencies {
140-
compile project(':react-native-splash-screen')
141-
compile project(':react-native-push-notification')
142-
compile project(':react-native-device-info')
143-
compile project(':react-native-app-settings')
144-
compile (project(':react-native-device-info')){
145-
exclude group: "com.google.android.gms"
146-
}
147-
compile project(':react-native-randombytes')
148-
compile project(':react-native-contacts')
149-
compile project(':react-native-fetch-blob')
150-
compile project(':react-native-image-picker')
151-
compile(project(':react-native-maps')){
152-
exclude group: 'com.google.android.gms'
153-
}
154-
compile project(':react-native-nfc-manager')
155-
compile project(':react-native-vector-icons')
156-
compile fileTree(dir: "libs", include: ["*.jar"])
157-
compile "com.facebook.react:react-native:+" // From node_modules
140+
implementation project(':react-native-splash-screen')
141+
implementation project(':react-native-push-notification')
142+
implementation project(':react-native-device-info')
143+
implementation project(':react-native-app-settings')
144+
implementation project(':react-native-device-info')
145+
implementation project(':react-native-randombytes')
146+
implementation project(':react-native-contacts')
147+
implementation project(':rn-fetch-blob')
148+
implementation project(':react-native-image-picker')
149+
150+
implementation project(':react-native-maps')
151+
152+
implementation project(':react-native-nfc-manager')
153+
implementation project(':react-native-vector-icons')
154+
155+
implementation fileTree(dir: "libs", include: ["*.jar"])
156+
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
157+
implementation "com.facebook.react:react-native:+" // From node_modules
158158

159-
compile ("com.google.android.gms:play-services-base:10.0.1") {
160-
force = true;
161-
}
162-
compile ("com.google.android.gms:play-services-maps:10.0.1") {
163-
force = true;
164-
}
165-
compile ("com.google.android.gms:play-services-gcm:10.0.1") {
166-
force = true;
167-
}
168-
compile ('com.google.firebase:firebase-core:10.0.1') {
169-
force = true;
170-
}
171-
compile ('com.google.firebase:firebase-messaging:10.0.1') {
172-
force = true;
173-
}
174159
}
175160

176161
// Run this once to be able to run the application with BUCK
@@ -180,4 +165,4 @@ task copyDownloadableDepsToLibs(type: Copy) {
180165
into 'libs'
181166
}
182167

183-
apply plugin: 'com.google.gms.google-services'
168+
// apply plugin: 'com.google.gms.google-services'

android/app/proguard-rules.pro

-53
Original file line numberDiff line numberDiff line change
@@ -15,56 +15,3 @@
1515
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
1616
# public *;
1717
#}
18-
19-
# Disabling obfuscation is useful if you collect stack traces from production crashes
20-
# (unless you are using a system that supports de-obfuscate the stack traces).
21-
-dontobfuscate
22-
23-
# React Native
24-
25-
# Keep our interfaces so they can be used by other ProGuard rules.
26-
# See http://sourceforge.net/p/proguard/bugs/466/
27-
-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip
28-
-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters
29-
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
30-
31-
# Do not strip any method/class that is annotated with @DoNotStrip
32-
-keep @com.facebook.proguard.annotations.DoNotStrip class *
33-
-keep @com.facebook.common.internal.DoNotStrip class *
34-
-keepclassmembers class * {
35-
@com.facebook.proguard.annotations.DoNotStrip *;
36-
@com.facebook.common.internal.DoNotStrip *;
37-
}
38-
39-
-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * {
40-
void set*(***);
41-
*** get*();
42-
}
43-
44-
-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; }
45-
-keep class * extends com.facebook.react.bridge.NativeModule { *; }
46-
-keepclassmembers,includedescriptorclasses class * { native <methods>; }
47-
-keepclassmembers class * { @com.facebook.react.uimanager.UIProp <fields>; }
48-
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp <methods>; }
49-
-keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup <methods>; }
50-
51-
-dontwarn com.facebook.react.**
52-
53-
# TextLayoutBuilder uses a non-public Android constructor within StaticLayout.
54-
# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details.
55-
-dontwarn android.text.StaticLayout
56-
57-
# okhttp
58-
59-
-keepattributes Signature
60-
-keepattributes *Annotation*
61-
-keep class okhttp3.** { *; }
62-
-keep interface okhttp3.** { *; }
63-
-dontwarn okhttp3.**
64-
65-
# okio
66-
67-
-keep class sun.misc.Unsafe { *; }
68-
-dontwarn java.nio.file.*
69-
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
70-
-dontwarn okio.**

android/app/src/main/AndroidManifest.xml

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
<intent-filter>
5858
<action android:name="android.intent.action.MAIN" />
5959
<category android:name="android.intent.category.LAUNCHER" />
60+
<action android:name="android.intent.action.DOWNLOAD_COMPLETE"/>
6061
</intent-filter>
6162
</activity>
6263
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />

android/app/src/main/java/com/brewskey/app/MainApplication.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import com.airbnb.android.react.maps.MapsPackage;
66
import com.facebook.react.ReactApplication;
7+
import com.RNFetchBlob.RNFetchBlobPackage;
78
import org.devio.rn.splashscreen.SplashScreenReactPackage;
89
import com.dieam.reactnativepushnotification.ReactNativePushNotificationPackage;
910
import com.learnium.RNDeviceInfo.RNDeviceInfo;
@@ -15,7 +16,6 @@
1516
import com.facebook.soloader.SoLoader;
1617
import com.imagepicker.ImagePickerPackage;
1718
import com.oblador.vectoricons.VectorIconsPackage;
18-
import com.RNFetchBlob.RNFetchBlobPackage;
1919
import com.rt2zz.reactnativecontacts.ReactNativeContacts;
2020
import community.revteltech.nfc.NfcManagerPackage;
2121

@@ -34,6 +34,7 @@ public boolean getUseDeveloperSupport() {
3434
protected List<ReactPackage> getPackages() {
3535
return Arrays.<ReactPackage>asList(
3636
new MainReactPackage(),
37+
new RNFetchBlobPackage(),
3738
new SplashScreenReactPackage(),
3839
new ReactNativePushNotificationPackage(),
3940
new OpenAppSettingsPackage(),
@@ -43,7 +44,6 @@ protected List<ReactPackage> getPackages() {
4344
new MapsPackage(),
4445
new NfcManagerPackage(),
4546
new ReactNativeContacts(),
46-
new RNFetchBlobPackage(),
4747
new VectorIconsPackage()
4848
);
4949
}
Loading
Loading
Loading
Loading
Loading
Loading
Loading

android/build.gradle

+40-32
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,40 @@
1-
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2-
3-
buildscript {
4-
repositories {
5-
google()
6-
jcenter()
7-
}
8-
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.1.4'
10-
classpath 'com.google.gms:google-services:3.0.0'
11-
12-
// NOTE: Do not place your application dependencies here; they belong
13-
// in the individual module build.gradle files
14-
}
15-
}
16-
17-
allprojects {
18-
repositories {
19-
mavenLocal()
20-
jcenter()
21-
google()
22-
maven {
23-
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
24-
url "$rootDir/../node_modules/react-native/android"
25-
}
26-
}
27-
}
28-
29-
ext {
30-
// Other settings
31-
compileSdkVersion = 27 // default: 23
32-
}
1+
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2+
buildscript {
3+
ext {
4+
buildToolsVersion = "27.0.3"
5+
compileSdkVersion = 27
6+
googlePlayServicesVersion = "15.0.1"
7+
minSdkVersion = 16
8+
supportLibVersion = "27.1.1"
9+
targetSdkVersion = 26
10+
}
11+
repositories {
12+
jcenter()
13+
google()
14+
}
15+
dependencies {
16+
classpath 'com.android.tools.build:gradle:3.1.4'
17+
classpath 'com.google.gms:google-services:3.0.0'
18+
19+
// NOTE: Do not place your application dependencies here; they belong
20+
// in the individual module build.gradle files
21+
}
22+
}
23+
24+
allprojects {
25+
repositories {
26+
mavenLocal()
27+
jcenter()
28+
maven {
29+
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
30+
url "$rootDir/../node_modules/react-native/android"
31+
}
32+
google()
33+
}
34+
}
35+
36+
37+
task wrapper(type: Wrapper) {
38+
gradleVersion = '4.4'
39+
distributionUrl = distributionUrl.replace("bin", "all")
40+
}

android/gradle.properties

-2
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.

0 commit comments

Comments
 (0)