Commit 7b53d97bd309ae4168530a6de12ab9cbef2949bc

Authored by 白云
1 parent dce0ee88

优化

.gitignore
... ... @@ -12,3 +12,4 @@ local.properties
12 12 Podfile.lock
13 13 yarn.lock
14 14 package-lock.json
  15 +/build/
... ...
README.md
... ... @@ -48,6 +48,7 @@ RNFwRnAliface;
48 48 https://www.jianshu.com/p/091a68ea1ca7/
49 49 https://youngjuning.js.org/2019/06/react-native-create-library%E4%B8%AD%E6%96%87%E6%96%87%E6%A1%A3/
50 50 https://www.jianshu.com/p/091a68ea1ca7/
  51 +签名: http://www.voidcn.com/article/p-bgrartlo-zw.html
51 52 ```
52 53 #### 2.修改package.json
53 54 ```
... ...
android/build.gradle
1 1 apply plugin: 'com.android.library'
2 2 apply plugin: 'maven'
3   -apply plugin: 'signing'
4 3  
5 4 buildscript {
6 5 repositories {
... ... @@ -10,9 +9,6 @@ buildscript {
10 9 maven() {
11 10 url '/usr/local/node/lib/node_modules/react-native/android'
12 11 }
13   - flatDir {
14   - dirs './libs'
15   - }
16 12 }
17 13  
18 14 dependencies {
... ... @@ -27,9 +23,6 @@ repositories {
27 23 maven {
28 24 url '/usr/local/node/lib/node_modules/react-native/android'
29 25 }
30   - flatDir {
31   - dirs './libs'
32   - }
33 26 }
34 27  
35 28  
... ... @@ -54,6 +47,9 @@ android {
54 47 minifyEnabled false
55 48 }
56 49 }
  50 + lintOptions {
  51 + abortOnError false
  52 + }
57 53  
58 54 compileOptions {
59 55 sourceCompatibility JavaVersion.VERSION_1_8
... ... @@ -61,20 +57,17 @@ android {
61 57 }
62 58 }
63 59  
64   -signing {
65   - sign configurations.archives
66   -}
67 60  
68 61 dependencies {
69 62 compileOnly 'com.facebook.react:react-native:+'
70 63 // 本地包依赖
71   - compile (name:'aligreen-release-2.0.0',ext:'aar')
72   - compile (name:'FaceLivenessOpen-3.2.0',ext:'aar')
73   - compile (name:'NoCaptchaSDK-external-release-5.4.29',ext:'aar')
74   - compile (name:'SecurityBodySDK-external-release-5.4.79',ext:'aar')
75   - compile (name:'SecurityGuardSDK-external-release-5.4.121',ext:'aar')
  64 + implementation files('libs/aligreen-release-2.0.0.aar')
  65 + implementation files('libs/FaceLivenessOpen-3.2.0.aar')
  66 + implementation files('libs/NoCaptchaSDK-external-release-5.4.29.aar')
  67 + implementation files('libs/SecurityBodySDK-external-release-5.4.79.aar')
  68 + implementation files('libs/SecurityGuardSDK-exte rnal-release-5.4.121.aar')
76 69 // 远程包依赖
77   - implementation 'com.alibaba:fastjson:1.2.62'
78   - implementation 'com.alibaba.android.mnnkit:core:0.0.5'
  70 + // implementation 'com.alibaba:fastjson:1.2.62'
  71 + // implementation 'com.alibaba.android.mnnkit:core:0.0.5'
79 72 compileOnly files('src/main/assets')
80 73 }
... ...
android/src/main/AndroidManifest.xml
1 1  
2 2 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 3 package="com.feewee.aliface">
  4 + <!-- 允许程序写入外部存储,如SD卡上写文件-->
4 5 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  6 + <!-- 程序可以读取设备外部存储空间(内置SDcard和外置SDCard)的文件,如果您的App已经添加了“WRITE_EXTERNAL_STORAGE ”权限 ,则就没必要添加读的权限了,写权限已经包含了读权限-->
5 7 <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
  8 + <!-- 允许程序访问摄像头进行拍照-->
6 9 <uses-permission android:name="android.permission.CAMERA" />
7   - <application
8   - android:name="com.feewee.keeperai.MainApplication"
9   - android:resizeableActivity="true"
10   - android:label="@string/app_name"
11   - android:icon="@mipmap/fw_ic_launcher"
12   - android:roundIcon="@mipmap/fw_ic_launcher_round"
13   - android:allowBackup="true"
14   - android:usesCleartextTraffic="true"
15   - android:theme="@style/AppTheme">
16   -
17   - <activity
18   - android:name="com.feewee.aliface.FaceActivity"
19   - android:hardwareAccelerated="true"
20   - android:launchMode="singleTop"
21   - android:windowDisablePreview="true"
22   - android:windowIsTranslucent="false" />
  10 + <application>
  11 + <activity android:name="com.feewee.aliface.FaceActivity" />
23 12  
24 13 </application>
25 14 </manifest>
... ...
license deleted
1   -MIT License
2   -
3   -Copyright (c) 2016-present, lovebing.org.
4   -
5   -Permission is hereby granted, free of charge, to any person obtaining a copy
6   -of this software and associated documentation files (the "Software"), to deal
7   -in the Software without restriction, including without limitation the rights
8   -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9   -copies of the Software, and to permit persons to whom the Software is
10   -furnished to do so, subject to the following conditions:
11   -
12   -The above copyright notice and this permission notice shall be included in all
13   -copies or substantial portions of the Software.
14   -
15   -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16   -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17   -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18   -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19   -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20   -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21   -SOFTWARE.
22 0 \ No newline at end of file
package.json
1 1 {
2 2 "name": "fw-rn-aliface",
3   - "version": "1.0.5",
  3 + "version": "1.0.8",
4 4 "description": "阿里人脸活体检测",
5 5 "main": "index.js",
6 6 "scripts": {
... ...