Skip to content

Commit 2d30f85

Browse files
authored
Merge pull request #236 from MOPCON/develop
release 3.0.0
2 parents ae99b8e + 099e248 commit 2d30f85

File tree

257 files changed

+11918
-9346
lines changed

Some content is hidden

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

257 files changed

+11918
-9346
lines changed

.travis.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,12 @@ jdk: oraclejdk8
33
sudo: required
44
android:
55
components:
6+
- android-28
7+
- build-tools-28.0.3
68
- platform-tools
79
- tools
8-
- build-tools-23.0.1
9-
- build-tools-27.0.3
10-
- build-tools-28.0.3
11-
- android-23
12-
- android-26
13-
- android-27
14-
- android-28
15-
- extra-android-m2repository
16-
- extra-google-google_play_services
17-
- extra-google-m2repository
10+
- extra
11+
- add-on
1812
licenses:
1913
- android-sdk-preview-license-.+
2014
- android-sdk-license-.+

__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/.project

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

android/.settings/org.eclipse.buildship.core.prefs

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

android/app/.classpath

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

android/app/.project

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

android/app/.settings/org.eclipse.buildship.core.prefs

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

android/app/build.gradle

Lines changed: 61 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ import com.android.build.OutputFile
1818
* // the entry file for bundle generation
1919
* entryFile: "index.android.js",
2020
*
21+
* // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
22+
* bundleCommand: "ram-bundle",
23+
*
2124
* // whether to bundle JS and assets in debug mode
2225
* bundleInDebug: false,
2326
*
@@ -73,7 +76,8 @@ import com.android.build.OutputFile
7376
*/
7477

7578
project.ext.react = [
76-
entryFile: "index.js"
79+
entryFile: "index.js",
80+
enableHermes: false, // clean and rebuild if changing
7781
]
7882

7983
apply from: "../../node_modules/react-native/react.gradle"
@@ -93,9 +97,31 @@ def enableSeparateBuildPerCPUArchitecture = false
9397
*/
9498
def enableProguardInReleaseBuilds = false
9599

100+
/**
101+
* The preferred build flavor of JavaScriptCore.
102+
*
103+
* For example, to use the international variant, you can use:
104+
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
105+
*
106+
* The international variant includes ICU i18n library and necessary data
107+
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
108+
* give correct results when using with locales other than en-US. Note that
109+
* this variant is about 6MiB larger per architecture than default.
110+
*/
111+
def jscFlavor = 'org.webkit:android-jsc:+'
112+
113+
/**
114+
* Whether to enable the Hermes VM.
115+
*
116+
* This should be set on project.ext.react and mirrored here. If it is not set
117+
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
118+
* and the benefits of using Hermes will therefore be sharply reduced.
119+
*/
120+
def enableHermes = project.ext.react.get("enableHermes", false);
121+
96122
android {
97123
compileSdkVersion rootProject.ext.compileSdkVersion
98-
124+
99125
compileOptions {
100126
sourceCompatibility JavaVersion.VERSION_1_8
101127
targetCompatibility JavaVersion.VERSION_1_8
@@ -106,8 +132,9 @@ android {
106132
minSdkVersion rootProject.ext.minSdkVersion
107133
targetSdkVersion rootProject.ext.targetSdkVersion
108134
multiDexEnabled true
109-
versionCode 20221
110-
versionName "2.3.7"
135+
versionCode 20222
136+
versionName "3.0.0"
137+
missingDimensionStrategy 'react-native-camera', 'general'
111138
}
112139
signingConfigs {
113140
release {
@@ -122,11 +149,14 @@ android {
122149
reset()
123150
enable enableSeparateBuildPerCPUArchitecture
124151
universalApk false // If true, also generate a universal APK
125-
include "armeabi-v7a", "x86", "arm64-v8a", "x86-64"
152+
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
126153
}
127154
}
128155
buildTypes {
129156
release {
157+
// Caution! In production, you need to generate your own keystore file.
158+
// see https://facebook.github.io/react-native/docs/signed-apk-android.
159+
signingConfig signingConfigs.debug
130160
minifyEnabled enableProguardInReleaseBuilds
131161
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
132162
signingConfig signingConfigs.release
@@ -136,52 +166,48 @@ android {
136166
applicationVariants.all { variant ->
137167
variant.outputs.each { output ->
138168
// For each separate APK per architecture, set a unique version code as described here:
139-
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
140-
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86-64": 4]
169+
// https://developer.android.com/studio/build/configure-apk-splits.html
170+
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
141171
def abi = output.getFilter(OutputFile.ABI)
142172
if (abi != null) { // null for the universal-debug, universal-release variants
143173
output.versionCodeOverride =
144174
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
145175
}
146176
}
147177
}
148-
}
149178

150-
dependencies {
151-
implementation project(':@react-native-community_async-storage')
152-
compile project(':react-native-rsa-native')
153-
compile project(':react-native-camera')
154-
compile project(':react-native-splash-screen')
155-
compile 'com.android.support:multidex:1.0.3'
156-
compile(project(':react-native-firebase')) {
157-
transitive = false
179+
packagingOptions {
180+
pickFirst '**/armeabi-v7a/libc++_shared.so'
181+
pickFirst '**/x86/libc++_shared.so'
182+
pickFirst '**/arm64-v8a/libc++_shared.so'
183+
pickFirst '**/x86_64/libc++_shared.so'
184+
pickFirst '**/x86/libjsc.so'
185+
pickFirst '**/armeabi-v7a/libjsc.so'
158186
}
187+
}
159188

160-
// RNFirebase required dependencies
161-
implementation "com.google.firebase:firebase-core:15.0.2"
162-
implementation "com.google.android.gms:play-services-base:15.0.0"
163-
164-
// RNFirebase optional dependencies
165-
// implementation "com.google.firebase:firebase-ads:15.0.0"
166-
// implementation "com.google.firebase:firebase-auth:15.1.0"
167-
// implementation "com.google.firebase:firebase-config:15.0.0"
168-
// implementation "com.google.firebase:firebase-database:15.0.0"
169-
// implementation "com.google.firebase:firebase-invites:15.0.1"
170-
implementation "com.google.firebase:firebase-firestore:16.0.0"
171-
implementation "com.google.firebase:firebase-messaging:15.0.2"
172-
// implementation "com.google.firebase:firebase-perf:15.1.0"
173-
// implementation "com.google.firebase:firebase-storage:15.0.2"
174-
175-
compile project(':react-native-i18n')
176-
compile project(':react-native-vector-icons')
189+
dependencies {
177190
implementation fileTree(dir: "libs", include: ["*.jar"])
178-
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
179191
implementation "com.facebook.react:react-native:+" // From node_modules
192+
implementation "com.google.android.gms:play-services-base:17.0.0"
193+
implementation "com.google.firebase:firebase-core:17.0.1"
194+
implementation "com.google.firebase:firebase-analytics:17.2.0"
195+
implementation "com.google.firebase:firebase-messaging:19.0.0"
196+
if (enableHermes) {
197+
def hermesPath = "../../node_modules/hermesvm/android/";
198+
debugImplementation files(hermesPath + "hermes-debug.aar")
199+
releaseImplementation files(hermesPath + "hermes-release.aar")
200+
} else {
201+
implementation jscFlavor
202+
}
180203
}
181204

182205
// Run this once to be able to run the application with BUCK
183206
// puts all compile dependencies into folder libs for BUCK to use
184207
task copyDownloadableDepsToLibs(type: Copy) {
185208
from configurations.compile
186209
into 'libs'
187-
}
210+
}
211+
212+
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
213+
apply plugin: 'com.google.gms.google-services'

android/app/proguard-rules.pro

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,3 @@
88
# http://developer.android.com/guide/developing/tools/proguard.html
99

1010
# Add any project specific keep options here:
11-
12-
# If your project uses WebView with JS, uncomment the following
13-
# and specify the fully qualified class name to the JavaScript interface
14-
# class:
15-
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16-
# public *;
17-
#}

android/app/src/debug/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
66

7-
<application tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" android:networkSecurityConfig="@xml/react_native_config" />
8-
</manifest>
7+
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
8+
</manifest>

0 commit comments

Comments
 (0)