Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jul 22, 2019. It is now read-only.

Commit 35bb200

Browse files
authored
Merge pull request #73 from bitnami/react-native-navigation
Switch to react-native-navigation
2 parents d201f7d + 0b92c55 commit 35bb200

File tree

124 files changed

+2670
-2725
lines changed

Some content is hidden

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

124 files changed

+2670
-2725
lines changed

.flowconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,3 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-8]\\|1[0-9]\\|[1-2
4141
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
4242

4343
unsafe.enable_getters_and_setters=true
44-
45-
[version]
46-
^0.38.0

android/app/build.gradle

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,29 +161,30 @@ protobuf {
161161
}
162162

163163
dependencies {
164+
compile project(':react-native-snackbar')
164165
compile project(':ReactAndroid')
165166
compile project(':react-native-fetch-blob')
166167
compile project(':react-native-config')
167168
compile project(':react-native-fs')
168169
compile project(':react-native-material-kit')
169170
compile fileTree(include: ['*.jar'], dir: 'libs')
170171
compile 'com.android.support:multidex:1.0.1'
172+
compile "com.android.support:appcompat-v7:25.0.1"
171173
compile 'com.facebook.react:react-native:+'
172-
// From node_modules
173174
compile project(':react-native-orientation')
175+
compile project(':react-native-navigation')
174176
compile(project(':react-native-google-signin')) {
175177
exclude group: "com.google.android.gms"
176178
}
177-
compile 'com.google.android.gms:play-services-auth:9.8.0'
178-
// grpc
179+
compile 'com.google.android.gms:play-services-auth:11.0.4'
180+
179181
compile 'com.google.protobuf:protobuf-java:3.0.2'
180182
compile 'javax.annotation:javax.annotation-api:1.2'
181183
compile 'io.grpc:grpc-protobuf:1.0.1'
182184
compile 'io.grpc:grpc-stub:1.0.1'
183185
compile 'org.kamranzafar:jtar:2.3'
184186
compile 'com.esotericsoftware.yamlbeans:yamlbeans:1.09'
185-
compile 'com.squareup.okhttp3:logging-interceptor:+'
186-
compile 'com.squareup.okhttp3:logging-interceptor:+'
187+
//compile 'com.squareup.okhttp3:logging-interceptor:+'
187188
}
188189

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

android/app/src/main/java/com/skippbox/cabin/CertificateModule.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
import javax.net.ssl.X509TrustManager;
4242

4343
import okhttp3.OkHttpClient;
44-
import okhttp3.logging.HttpLoggingInterceptor;
4544

4645
public class CertificateModule extends ReactContextBaseJavaModule {
4746

@@ -81,11 +80,8 @@ public boolean verify(String hostname, SSLSession session) {
8180
}
8281
});
8382

84-
HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
85-
logging.setLevel(HttpLoggingInterceptor.Level.BODY);
86-
8783
return builder
88-
.addInterceptor(logging)
84+
8985
.connectTimeout(30, TimeUnit.SECONDS)
9086
.writeTimeout(30, TimeUnit.SECONDS)
9187
.readTimeout(30, TimeUnit.SECONDS);

android/app/src/main/java/com/skippbox/cabin/MainActivity.java

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

33
import com.facebook.react.ReactActivity;
44
import com.rnfs.RNFSPackage;
5+
import com.reactnativenavigation.controllers.SplashActivity;
56

6-
public class MainActivity extends ReactActivity {
7+
public class MainActivity extends SplashActivity {
78

8-
/**
9-
* Returns the name of the main component registered from JavaScript.
10-
* This is used to schedule rendering of the component.
11-
*/
12-
@Override
13-
protected String getMainComponentName() {
14-
return "Cabin";
15-
}
169
}

android/app/src/main/java/com/skippbox/cabin/MainApplication.java

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
import android.util.Log;
77

88
import com.facebook.react.ReactApplication;
9+
import com.azendoo.reactnativesnackbar.SnackbarPackage;
910
import com.github.xinthink.rnmk.ReactMaterialKitPackage;
10-
import co.apptailor.googlesignin.RNGoogleSigninPackage;
1111
import com.RNFetchBlob.RNFetchBlobPackage;
1212
import co.apptailor.googlesignin.RNGoogleSigninPackage;
1313

@@ -18,14 +18,15 @@
1818
import com.facebook.react.shell.MainReactPackage;
1919
import com.github.yamill.orientation.OrientationPackage;
2020
import com.rnfs.RNFSPackage;
21+
import com.reactnativenavigation.NavigationApplication;
2122

2223
import java.util.Arrays;
2324
import java.util.List;
2425

2526
import co.apptailor.googlesignin.RNGoogleSigninPackage;
2627
import okhttp3.OkHttpClient;
2728

28-
public class MainApplication extends Application implements ReactApplication {
29+
public class MainApplication extends NavigationApplication {
2930

3031
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
3132
@Override
@@ -35,19 +36,29 @@ public boolean getUseDeveloperSupport() {
3536

3637
@Override
3738
protected List<ReactPackage> getPackages() {
38-
return Arrays.asList(
39-
new MainReactPackage(),
40-
new RNFetchBlobPackage(),
41-
new RNGoogleSigninPackage(),
42-
new ReactNativeConfigPackage(),
43-
new CabinPackage(),
44-
new OrientationPackage(),
45-
new ReactMaterialKitPackage(),
46-
new RNFSPackage()
47-
);
39+
return getPackages();
4840
}
4941
};
5042

43+
protected List<ReactPackage> getPackages() {
44+
return Arrays.asList(
45+
new MainReactPackage(),
46+
new SnackbarPackage(),
47+
new RNFetchBlobPackage(),
48+
new RNGoogleSigninPackage(),
49+
new ReactNativeConfigPackage(),
50+
new CabinPackage(),
51+
new OrientationPackage(),
52+
new ReactMaterialKitPackage(),
53+
new RNFSPackage()
54+
);
55+
}
56+
57+
@Override
58+
public boolean isDebug() {
59+
return BuildConfig.DEBUG;
60+
}
61+
5162
@Override
5263
public ReactNativeHost getReactNativeHost() {
5364
return mReactNativeHost;
@@ -64,4 +75,8 @@ public void onCreate() {
6475
super.onCreate();
6576
CertificateModule.setupClient(OkHttpClientProvider.getOkHttpClient());
6677
}
78+
79+
public List<ReactPackage> createAdditionalReactPackages() {
80+
return getPackages();
81+
}
6782
}

android/gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# org.gradle.parallel=true
1919

2020
android.useDeprecatedNdk=true
21+
org.gradle.jvmargs=-Xmx1536M
2122
MYAPP_RELEASE_STORE_FILE=android.jks
2223
MYAPP_RELEASE_KEY_ALIAS=cabin-app
2324
MYAPP_RELEASE_STORE_PASSWORD=skippbox2016

android/settings.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
rootProject.name = 'cabin'
2+
include ':react-native-snackbar'
3+
project(':react-native-snackbar').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-snackbar/android')
24
include ':ReactAndroid'
35
project(':ReactAndroid').projectDir = new File(rootProject.projectDir, '../node_modules/react-native/ReactAndroid')
6+
include ':react-native-navigation'
7+
project(':react-native-navigation').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-navigation/android/app')
48
include ':react-native-material-kit'
59
project(':react-native-material-kit').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-material-kit/android')
6-
include ':react-native-google-signin'
7-
project(':react-native-google-signin').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-google-signin/android')
810
include ':react-native-fetch-blob'
911
project(':react-native-fetch-blob').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fetch-blob/android')
1012
include ':react-native-google-signin'

0 commit comments

Comments
 (0)