@smileid/usesmileid_huawei_face 12.0.1 → 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 CHANGED
@@ -1,3 +1,7 @@
1
+ ## 12.0.2
2
+
3
+ See the repository CHANGELOG for the 12.0.2 release notes.
4
+
1
5
  ## 12.0.1
2
6
 
3
7
  See the repository CHANGELOG for the 12.0.1 release notes.
@@ -17,7 +17,34 @@ plugins {
17
17
  }
18
18
 
19
19
  group = 'com.usesmileid.huawei.face'
20
- version = '12.0.1'
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.1'
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.1'
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>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smileid/usesmileid_huawei_face",
3
- "version": "12.0.1",
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/usesmileid_bridge": "12.0.1",
47
- "@smileid/usesmileid_platform_interface": "12.0.1"
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",