@smileid/usesmileid_huawei_face 12.0.0 → 12.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/android/build.gradle +36 -3
- package/android/src/main/AndroidManifest.xml +9 -1
- package/android/src/main/java/com/usesmileid/huawei/face/UseSmileIDHuaweiFaceModule.kt +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/src/index.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
## 12.0.2
|
|
2
|
+
|
|
3
|
+
See the repository CHANGELOG for the 12.0.2 release notes.
|
|
4
|
+
|
|
5
|
+
## 12.0.1
|
|
6
|
+
|
|
7
|
+
See the repository CHANGELOG for the 12.0.1 release notes.
|
|
8
|
+
|
|
1
9
|
## 12.0.0
|
|
2
10
|
|
|
3
11
|
First stable release of the Smile ID v12 SDK. Provides the Android Huawei HMS face detection module for `usesmileid` on GMS-free devices.
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Google Mobile Services (Huawei post-2019 hardware, etc.); use
|
|
|
10
10
|
|
|
11
11
|
The native side runs the entire face-scan pipeline. This package
|
|
12
12
|
contributes a Kotlin Expo Module that constructs
|
|
13
|
-
`UseSmileIDFaceSession(
|
|
13
|
+
`UseSmileIDFaceSession(HuaweiFaceDetectorAnalyzer())` against the Huawei
|
|
14
14
|
HMS-backed analyzer in the `com.usesmileid:huawei-face` AAR, and a
|
|
15
15
|
TS wrapper that bridges `configure / analyze / reset / close` with
|
|
16
16
|
Zod-validated wire payloads.
|
package/android/build.gradle
CHANGED
|
@@ -17,7 +17,34 @@ plugins {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
group = 'com.usesmileid.huawei.face'
|
|
20
|
-
version = '12.0.
|
|
20
|
+
version = '12.0.2'
|
|
21
|
+
|
|
22
|
+
// HMS ML is published only to Huawei's own Maven repository — none of the
|
|
23
|
+
// com.huawei.hms:ml-computer-vision-* artifacts exist on Maven Central. Expo
|
|
24
|
+
// autolinks this module as a Gradle subproject of the app's build, so it can
|
|
25
|
+
// add the repository itself and partner apps need no repo edits. The AAR
|
|
26
|
+
// underneath cannot — a published POM carries no repository information.
|
|
27
|
+
// Content-filtered so nothing else is ever looked up there.
|
|
28
|
+
rootProject.allprojects {
|
|
29
|
+
repositories {
|
|
30
|
+
maven {
|
|
31
|
+
url 'https://developer.huawei.com/repo/'
|
|
32
|
+
content { includeGroupByRegex 'com\\.huawei.*' }
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// HMS reads this from the merged application manifest to decide which model to
|
|
38
|
+
// fetch, and the document module declares the same key as "object". Two
|
|
39
|
+
// libraries cannot merge into one attribute, so both modules compute the same
|
|
40
|
+
// union and claim it with tools:replace — they outrank the AARs they depend on,
|
|
41
|
+
// and agreeing on the value keeps them from colliding with each other. Kept
|
|
42
|
+
// narrow when only one provider is present, so a selfie-only app does not pull
|
|
43
|
+
// the object model down onto the device. Matched on the project-name suffix
|
|
44
|
+
// because Expo derives it from the scoped package name.
|
|
45
|
+
def hmsModelDependency = rootProject.allprojects.any {
|
|
46
|
+
it.name.endsWith('usesmileid_huawei_document')
|
|
47
|
+
} ? 'face,object' : 'face'
|
|
21
48
|
|
|
22
49
|
android {
|
|
23
50
|
namespace 'com.usesmileid.huawei.face'
|
|
@@ -29,11 +56,12 @@ android {
|
|
|
29
56
|
// android/build.gradle and the rest of the @expo/* modules.
|
|
30
57
|
defaultConfig {
|
|
31
58
|
versionCode 1
|
|
32
|
-
versionName '12.0.
|
|
59
|
+
versionName '12.0.2'
|
|
33
60
|
// R8 keep-rules to bundle into partner apps that depend on this
|
|
34
61
|
// module. Without these, R8 may rename the Expo module entry
|
|
35
62
|
// point and the JS-bridged member functions, breaking autolinking.
|
|
36
63
|
consumerProguardFiles 'consumer-rules.pro'
|
|
64
|
+
manifestPlaceholders = [smileidHmsModelDependency: hmsModelDependency]
|
|
37
65
|
}
|
|
38
66
|
}
|
|
39
67
|
|
|
@@ -42,7 +70,7 @@ dependencies {
|
|
|
42
70
|
// Targets Huawei AppGallery / no-GMS devices via HMS ML kit. The
|
|
43
71
|
// Expo Module is a thin Kotlin shim that constructs the session
|
|
44
72
|
// and bridges its four methods to JS via Expo Modules.
|
|
45
|
-
implementation 'com.usesmileid:huawei-face:12.0.
|
|
73
|
+
implementation 'com.usesmileid:huawei-face:12.0.2'
|
|
46
74
|
|
|
47
75
|
// VisionCamera frame-processor plugin classes. The host app provides
|
|
48
76
|
// this dependency via RN autolinking — react-native-vision-camera >= 4.7.3
|
|
@@ -56,4 +84,9 @@ dependencies {
|
|
|
56
84
|
// app's VisionCamera provides the runtime classes (its camera-core is
|
|
57
85
|
// 1.5.0-alpha03; the `ImageProxy` surface used here is stable since 1.0).
|
|
58
86
|
compileOnly 'androidx.camera:camera-core:1.5.0-alpha03'
|
|
87
|
+
|
|
88
|
+
// `HuaweiFaceDetectorAnalyzer()` takes a defaulted `MLFaceAnalyzer` argument, so the compiler
|
|
89
|
+
// needs that type to emit the call. The AAR above declares HMS ML at runtime
|
|
90
|
+
// scope only — enough to execute, not to compile against.
|
|
91
|
+
compileOnly 'com.huawei.hms:ml-computer-vision-face:3.18.1.300'
|
|
59
92
|
}
|
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
2
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
3
|
+
xmlns:tools="http://schemas.android.com/tools">
|
|
4
|
+
<application>
|
|
5
|
+
<meta-data
|
|
6
|
+
android:name="com.huawei.hms.ml.DEPENDENCY"
|
|
7
|
+
android:value="${smileidHmsModelDependency}"
|
|
8
|
+
tools:replace="android:value" />
|
|
9
|
+
</application>
|
|
10
|
+
</manifest>
|
|
@@ -2,7 +2,7 @@ package com.usesmileid.huawei.face
|
|
|
2
2
|
|
|
3
3
|
import com.mrousavy.camera.frameprocessors.FrameProcessorPluginRegistry
|
|
4
4
|
import com.usesmileid.bridge.dsl.builder.FaceDetectorMode
|
|
5
|
-
import com.usesmileid.bridge.huawei.face.
|
|
5
|
+
import com.usesmileid.bridge.huawei.face.HuaweiFaceDetectorAnalyzer
|
|
6
6
|
import com.usesmileid.bridge.model.BoundingBox as NativeBoundingBox
|
|
7
7
|
import com.usesmileid.bridge.model.CaptureReadyEvent as NativeCaptureReadyEvent
|
|
8
8
|
import com.usesmileid.bridge.model.FaceDetectorOutput as NativeFaceOutput
|
|
@@ -22,7 +22,7 @@ import expo.modules.kotlin.modules.ModuleDefinition
|
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Expo Module bridging the existing native session
|
|
25
|
-
* `UseSmileIDFaceSession(
|
|
25
|
+
* `UseSmileIDFaceSession(HuaweiFaceDetectorAnalyzer())` (shipped in the
|
|
26
26
|
* `com.smileidentity:huawei-face` AAR) to the JS side. The Huawei
|
|
27
27
|
* variant targets devices without Google Mobile Services and uses
|
|
28
28
|
* Huawei HMS ML kit for face detection.
|
|
@@ -100,7 +100,7 @@ class UseSmileIDHuaweiFaceModule : Module() {
|
|
|
100
100
|
Name("UseSmileIDHuaweiFace")
|
|
101
101
|
|
|
102
102
|
OnCreate {
|
|
103
|
-
FaceAnalyzerFactoryRegistry.register(KEY) {
|
|
103
|
+
FaceAnalyzerFactoryRegistry.register(KEY) { HuaweiFaceDetectorAnalyzer() }
|
|
104
104
|
val ctx = appContext.reactContext
|
|
105
105
|
?: throw IllegalStateException("Module not attached to a React context")
|
|
106
106
|
executor.onAttach(ctx)
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { FaceConfig, FaceScanResult } from "@smileid/usesmileid_bridge";
|
|
|
4
4
|
* Google Mobile Services).
|
|
5
5
|
*
|
|
6
6
|
* Thin shim around the existing native session
|
|
7
|
-
* `com.usesmileid.bridge.session.UseSmileIDFaceSession(
|
|
7
|
+
* `com.usesmileid.bridge.session.UseSmileIDFaceSession(HuaweiFaceDetectorAnalyzer())`
|
|
8
8
|
* shipped in the `com.smileidentity:huawei-face` AAR. The native side
|
|
9
9
|
* runs the entire pipeline (analyzer + validator + transitioner +
|
|
10
10
|
* state machine); this TS layer routes calls and validates wire
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { useSmileIDAnalyzerExecutor } from "@smileid/usesmileid_platform_interfa
|
|
|
5
5
|
* Google Mobile Services).
|
|
6
6
|
*
|
|
7
7
|
* Thin shim around the existing native session
|
|
8
|
-
* `com.usesmileid.bridge.session.UseSmileIDFaceSession(
|
|
8
|
+
* `com.usesmileid.bridge.session.UseSmileIDFaceSession(HuaweiFaceDetectorAnalyzer())`
|
|
9
9
|
* shipped in the `com.smileidentity:huawei-face` AAR. The native side
|
|
10
10
|
* runs the entire pipeline (analyzer + validator + transitioner +
|
|
11
11
|
* state machine); this TS layer routes calls and validates wire
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smileid/usesmileid_huawei_face",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.2",
|
|
4
4
|
"description": "Huawei HMS face detection implementation for the UseSmileID React Native (Expo) SDK.",
|
|
5
5
|
"homepage": "https://usesmileid.com",
|
|
6
6
|
"repository": {
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"CHANGELOG.md"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@smileid/
|
|
47
|
-
"@smileid/
|
|
46
|
+
"@smileid/usesmileid_platform_interface": "12.0.2",
|
|
47
|
+
"@smileid/usesmileid_bridge": "12.0.2"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"expo": ">=56.0.0",
|
package/src/index.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { useSmileIDAnalyzerExecutor } from "@smileid/usesmileid_platform_interfa
|
|
|
7
7
|
* Google Mobile Services).
|
|
8
8
|
*
|
|
9
9
|
* Thin shim around the existing native session
|
|
10
|
-
* `com.usesmileid.bridge.session.UseSmileIDFaceSession(
|
|
10
|
+
* `com.usesmileid.bridge.session.UseSmileIDFaceSession(HuaweiFaceDetectorAnalyzer())`
|
|
11
11
|
* shipped in the `com.smileidentity:huawei-face` AAR. The native side
|
|
12
12
|
* runs the entire pipeline (analyzer + validator + transitioner +
|
|
13
13
|
* state machine); this TS layer routes calls and validates wire
|