Skip to content

Commit a5a1e26

Browse files
authored
Merge pull request #14 from Jimmy-Chung/feat/new-demo
feat: new demo init
2 parents e495250 + a177d7e commit a5a1e26

Some content is hidden

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

42 files changed

+14140
-19138
lines changed

App.js

Lines changed: 325 additions & 70 deletions
Large diffs are not rendered by default.

Gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source 'https://rubygems.org'
2+
3+
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4+
ruby '2.7.4'
5+
6+
gem 'cocoapods', '~> 1.11', '>= 1.11.2'

Gemfile.lock

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.5)
5+
rexml
6+
activesupport (6.1.5)
7+
concurrent-ruby (~> 1.0, >= 1.0.2)
8+
i18n (>= 1.6, < 2)
9+
minitest (>= 5.1)
10+
tzinfo (~> 2.0)
11+
zeitwerk (~> 2.3)
12+
addressable (2.8.0)
13+
public_suffix (>= 2.0.2, < 5.0)
14+
algoliasearch (1.27.5)
15+
httpclient (~> 2.8, >= 2.8.3)
16+
json (>= 1.5.1)
17+
atomos (0.1.3)
18+
claide (1.1.0)
19+
cocoapods (1.11.3)
20+
addressable (~> 2.8)
21+
claide (>= 1.0.2, < 2.0)
22+
cocoapods-core (= 1.11.3)
23+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
24+
cocoapods-downloader (>= 1.4.0, < 2.0)
25+
cocoapods-plugins (>= 1.0.0, < 2.0)
26+
cocoapods-search (>= 1.0.0, < 2.0)
27+
cocoapods-trunk (>= 1.4.0, < 2.0)
28+
cocoapods-try (>= 1.1.0, < 2.0)
29+
colored2 (~> 3.1)
30+
escape (~> 0.0.4)
31+
fourflusher (>= 2.3.0, < 3.0)
32+
gh_inspector (~> 1.0)
33+
molinillo (~> 0.8.0)
34+
nap (~> 1.0)
35+
ruby-macho (>= 1.0, < 3.0)
36+
xcodeproj (>= 1.21.0, < 2.0)
37+
cocoapods-core (1.11.3)
38+
activesupport (>= 5.0, < 7)
39+
addressable (~> 2.8)
40+
algoliasearch (~> 1.0)
41+
concurrent-ruby (~> 1.1)
42+
fuzzy_match (~> 2.0.4)
43+
nap (~> 1.0)
44+
netrc (~> 0.11)
45+
public_suffix (~> 4.0)
46+
typhoeus (~> 1.0)
47+
cocoapods-deintegrate (1.0.5)
48+
cocoapods-downloader (1.5.1)
49+
cocoapods-plugins (1.0.0)
50+
nap
51+
cocoapods-search (1.0.1)
52+
cocoapods-trunk (1.6.0)
53+
nap (>= 0.8, < 2.0)
54+
netrc (~> 0.11)
55+
cocoapods-try (1.2.0)
56+
colored2 (3.1.2)
57+
concurrent-ruby (1.1.9)
58+
escape (0.0.4)
59+
ethon (0.15.0)
60+
ffi (>= 1.15.0)
61+
ffi (1.15.5)
62+
fourflusher (2.3.1)
63+
fuzzy_match (2.0.4)
64+
gh_inspector (1.1.3)
65+
httpclient (2.8.3)
66+
i18n (1.10.0)
67+
concurrent-ruby (~> 1.0)
68+
json (2.6.1)
69+
minitest (5.15.0)
70+
molinillo (0.8.0)
71+
nanaimo (0.3.0)
72+
nap (1.1.0)
73+
netrc (0.11.0)
74+
public_suffix (4.0.6)
75+
rexml (3.2.5)
76+
ruby-macho (2.5.1)
77+
typhoeus (1.4.0)
78+
ethon (>= 0.9.0)
79+
tzinfo (2.0.4)
80+
concurrent-ruby (~> 1.0)
81+
xcodeproj (1.21.0)
82+
CFPropertyList (>= 2.3.3, < 4.0)
83+
atomos (~> 0.1.3)
84+
claide (>= 1.0.2, < 2.0)
85+
colored2 (~> 3.1)
86+
nanaimo (~> 0.3.0)
87+
rexml (~> 3.2.4)
88+
zeitwerk (2.5.4)
89+
90+
PLATFORMS
91+
ruby
92+
93+
DEPENDENCIES
94+
cocoapods (~> 1.11, >= 1.11.2)
95+
96+
RUBY VERSION
97+
ruby 2.7.4p191
98+
99+
BUNDLED WITH
100+
2.2.27

Readme.md

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

android/app/BUCK renamed to android/app/_BUCK

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ android_library(
3535

3636
android_build_config(
3737
name = "build_config",
38-
package = "com.finogeeks.mop.rnexample",
38+
package = "com.rnsdkdemo",
3939
)
4040

4141
android_resource(
4242
name = "res",
43-
package = "com.finogeeks.mop.rnexample",
43+
package = "com.rnsdkdemo",
4444
res = "src/main/res",
4545
)
4646

android/app/build.gradle

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,23 +114,33 @@ def jscFlavor = 'org.webkit:android-jsc:+'
114114
/**
115115
* Whether to enable the Hermes VM.
116116
*
117-
* This should be set on project.ext.react and mirrored here. If it is not set
117+
* This should be set on project.ext.react and that value will be read here. If it is not set
118118
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
119119
* and the benefits of using Hermes will therefore be sharply reduced.
120120
*/
121121
def enableHermes = project.ext.react.get("enableHermes", false);
122122

123+
/**
124+
* Architectures to build native code for in debug.
125+
*/
126+
def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures")
127+
123128
android {
124129
ndkVersion rootProject.ext.ndkVersion
125130

126131
compileSdkVersion rootProject.ext.compileSdkVersion
127132

128133
defaultConfig {
129-
applicationId "com.finogeeks.mop.rnexample"
134+
applicationId "org.reactjs.native.example.react-native-mopsdk-demo"
130135
minSdkVersion rootProject.ext.minSdkVersion
131136
targetSdkVersion rootProject.ext.targetSdkVersion
137+
multiDexEnabled true
132138
versionCode 1
133139
versionName "1.0"
140+
141+
missingDimensionStrategy 'react-native-camera', 'general'
142+
143+
manifestPlaceholders.put("network_security_config", "@xml/network_security_config")
134144
}
135145
splits {
136146
abi {
@@ -140,6 +150,20 @@ android {
140150
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
141151
}
142152
}
153+
packagingOptions {
154+
// libsdkcore.so、libyuvutil.so是被加固过的,不能被压缩,否则加载动态库时会报错
155+
doNotStrip "*/x86/libsdkcore.so"
156+
doNotStrip "*/x86_64/libsdkcore.so"
157+
doNotStrip "*/armeabi/libsdkcore.so"
158+
doNotStrip "*/armeabi-v7a/libsdkcore.so"
159+
doNotStrip "*/arm64-v8a/libsdkcore.so"
160+
161+
doNotStrip "*/x86/libyuvutil.so"
162+
doNotStrip "*/x86_64/libyuvutil.so"
163+
doNotStrip "*/armeabi/libyuvutil.so"
164+
doNotStrip "*/armeabi-v7a/libyuvutil.so"
165+
doNotStrip "*/arm64-v8a/libyuvutil.so"
166+
}
143167
signingConfigs {
144168
debug {
145169
storeFile file('debug.keystore')
@@ -151,6 +175,11 @@ android {
151175
buildTypes {
152176
debug {
153177
signingConfig signingConfigs.debug
178+
if (nativeArchitectures) {
179+
ndk {
180+
abiFilters nativeArchitectures.split(',')
181+
}
182+
}
154183
}
155184
release {
156185
// Caution! In production, you need to generate your own keystore file.
@@ -186,7 +215,7 @@ dependencies {
186215
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
187216

188217
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
189-
exclude group:'com.facebook.fbjni'
218+
exclude group:'com.facebook.fbjni'
190219
}
191220

192221
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {

android/app/proguard-rules.pro

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

1010
# Add any project specific keep options here:
11+
-keep class com.finogeeks.** {*;}
12+
-keep class android.arch.** { *; }
13+
14+
# WebRTC
15+
-keep class org.webrtc.**{*;}

android/app/src/debug/java/com/mopdemo/ReactNativeFlipper.java renamed to android/app/src/debug/java/com/rnsdkdemo/ReactNativeFlipper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
55
* directory of this source tree.
66
*/
7-
package com.finogeeks.mop.rnexample;
7+
package com.rnsdkdemo;
88

99
import android.content.Context;
1010
import com.facebook.flipper.android.AndroidFlipperClient;

android/app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.finogeeks.mop.rnexample">
2+
package="com.rnsdkdemo">
33

44
<uses-permission android:name="android.permission.INTERNET" />
5+
<uses-permission android:name="android.permission.VIBRATE" />
6+
57

68
<application
79
android:name=".MainApplication"
810
android:label="@string/app_name"
911
android:icon="@mipmap/ic_launcher"
1012
android:roundIcon="@mipmap/ic_launcher_round"
1113
android:allowBackup="false"
14+
android:networkSecurityConfig="${network_security_config}"
1215
android:theme="@style/AppTheme">
1316
<activity
1417
android:name=".MainActivity"

android/app/src/main/java/com/mopdemo/MainActivity.java renamed to android/app/src/main/java/com/rnsdkdemo/MainActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.finogeeks.mop.rnexample;
1+
package com.rnsdkdemo;
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 "mopdemo";
13+
return "rnSDKDemo";
1414
}
1515
}

0 commit comments

Comments
 (0)