Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
aliyun_face_plugin
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
openSourceLibrary
aliyun_face_plugin
Commits
97152007
提交
97152007
authored
2月 02, 2026
作者:
史晓晨
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
适配flutter3.38(.aar问题待处理)
上级
5dc8add1
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
180 行增加
和
282 行删除
+180
-282
build.gradle
android/build.gradle
+0
-70
build.gradle.kts
android/build.gradle.kts
+76
-0
settings.gradle.kts
android/settings.gradle.kts
+0
-0
AndroidManifest.xml
android/src/main/AndroidManifest.xml
+1
-3
AliyunFacePlugin.java
.../com/aliyun/face/aliyun_face_plugin/AliyunFacePlugin.java
+0
-88
build.gradle
example/android/app/build.gradle
+0
-72
build.gradle.kts
example/android/app/build.gradle.kts
+45
-0
build.gradle
example/android/build.gradle
+0
-35
build.gradle.kts
example/android/build.gradle.kts
+28
-0
gradle.properties
example/android/gradle.properties
+1
-1
gradle-wrapper.properties
example/android/gradle/wrapper/gradle-wrapper.properties
+2
-1
settings.gradle
example/android/settings.gradle
+0
-11
settings.gradle.kts
example/android/settings.gradle.kts
+26
-0
pubspec.yaml
pubspec.yaml
+1
-1
没有找到文件。
android/build.gradle
deleted
100644 → 0
浏览文件 @
5dc8add1
group
'com.aliyun.face.aliyun_face_plugin'
version
'1.0'
buildscript
{
repositories
{
google
()
mavenCentral
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:7.1.0'
}
}
rootProject
.
allprojects
{
repositories
{
google
()
mavenCentral
()
flatDir
{
dirs
'libs'
}
}
}
apply
plugin:
'com.android.library'
android
{
compileSdkVersion
31
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
targetCompatibility
JavaVersion
.
VERSION_1_8
}
defaultConfig
{
minSdkVersion
18
}
}
dependencies
{
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
])
// 实人认证SDK
implementation
(
name:
'aliyun-base-2.3.25.4.241012105837'
,
ext:
'aar'
)
implementation
(
name:
'aliyun-facade-2.3.25.4.241012105837'
,
ext:
'aar'
)
implementation
(
name:
'aliyun-face-2.3.25.4.241012105837'
,
ext:
'aar'
)
implementation
(
name:
'aliyun-faceaudio-2.3.25.4.241012105837'
,
ext:
'aar'
)
implementation
(
name:
'aliyun-facelanguage-2.3.25.4.241012105837'
,
ext:
'aar'
)
implementation
(
name:
'aliyun-facequality-2.3.25.4.241012105837'
,
ext:
'aar'
)
implementation
(
name:
'aliyun-nfc-2.3.25.4.241012105837'
,
ext:
'aar'
)
implementation
(
name:
'aliyun-ocr-2.3.25.4.241012105837'
,
ext:
'aar'
)
implementation
(
name:
'aliyun-photinus-2.3.25.4.241012105837'
,
ext:
'aar'
)
implementation
(
name:
'aliyun-wishverify-2.3.25.4.241012105837'
,
ext:
'aar'
)
implementation
(
name:
'Android-AliyunFaceGuard-10052'
,
ext:
'aar'
)
implementation
(
name:
'APSecuritySDK-deepSec-7.0.1.20240528.jiagu'
,
ext:
'aar'
)
// implementation(name: 'aliyun-facelanguage-v2.1.2-20221027112723', ext: 'aar')
// implementation(name: 'aliyun-ocr-v2.1.2-20221027112723', ext: 'aar')
// implementation(name: 'aliyun-photinus-v2.1.2-20221027112723', ext: 'aar')
// implementation(name: 'aliyun-wishverify-v2.1.2-20221027112723', ext: 'aar')
// implementation(name: 'Android-AliyunFaceGuard-10033', ext: 'aar')
// implementation(name: 'APSecuritySDK-DeepSec-7.0.1.20220813.jiagu', ext: 'aar')
// 实人认证三方依赖库
implementation
'com.squareup.okhttp3:okhttp:3.11.0'
implementation
'com.squareup.okio:okio:1.14.0'
implementation
'com.alibaba:fastjson:1.2.83_noneautotype'
implementation
'com.aliyun.dpa:oss-android-sdk:2.9.11'
}
android/build.gradle.kts
0 → 100644
浏览文件 @
97152007
group = "com.aliyun.face.aliyun_face_plugin"
version = "1.0"
allprojects {
repositories {
google()
mavenCentral()
}
}
val newBuildDir: Directory = rootProject.layout.buildDirectory.dir("../../build").get()
rootProject.layout.buildDirectory.value(newBuildDir)
subprojects {
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
project.layout.buildDirectory.value(newSubprojectBuildDir)
}
subprojects {
project.evaluationDependsOn(":app")
}
plugins {
id("com.android.library")
id("kotlin-android")
}
android {
namespace = "com.aliyun.face.aliyun_face_plugin"
compileSdk = flutter.compileSdkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
defaultConfig {
minSdk = flutter.minSdkVersion
}
dependencies {
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))
// 实人认证SDK
implementation(files("libs/aliyun-base-2.3.25.4.241012105837.aar"))
implementation(files("libs/aliyun-facade-2.3.25.4.241012105837.aar"))
implementation(files("libs/aliyun-face-2.3.25.4.241012105837.aar"))
implementation(files("libs/aliyun-faceaudio-2.3.25.4.241012105837.aar"))
implementation(files("libs/aliyun-facelanguage-2.3.25.4.241012105837.aar"))
implementation(files("libs/aliyun-facequality-2.3.25.4.241012105837.aar"))
implementation(files("libs/aliyun-nfc-2.3.25.4.241012105837.aar"))
implementation(files("libs/aliyun-ocr-2.3.25.4.241012105837.aar"))
implementation(files("libs/aliyun-photinus-2.3.25.4.241012105837.aar"))
implementation(files("libs/aliyun-wishverify-2.3.25.4.241012105837.aar"))
implementation(files("libs/Android-AliyunFaceGuard-10052.aar"))
implementation(files("libs/APSecuritySDK-deepSec-7.0.1.20240528.jiagu.aar"))
// implementation(name: "aliyun-facelanguage-v2.1.2-20221027112723", ext: "aar")
// implementation(name: "aliyun-ocr-v2.1.2-20221027112723", ext: "aar")
// implementation(name: "aliyun-photinus-v2.1.2-20221027112723", ext: "aar")
// implementation(name: "aliyun-wishverify-v2.1.2-20221027112723", ext: "aar")
// implementation(name: "Android-AliyunFaceGuard-10033", ext: "aar")
// implementation(name: "APSecuritySDK-DeepSec-7.0.1.20220813.jiagu", ext: "aar")
// 实人认证三方依赖库
implementation("com.squareup.okhttp3:okhttp:3.11.0")
implementation("com.squareup.okio:okio:1.14.0")
implementation("com.alibaba:fastjson:1.2.83_noneautotype")
implementation("com.aliyun.dpa:oss-android-sdk:2.9.11")
}
}
android/settings.gradle
→
android/settings.gradle
.kts
浏览文件 @
97152007
File moved
android/src/main/AndroidManifest.xml
浏览文件 @
97152007
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.aliyun.face.aliyun_face_plugin"
>
</manifest>
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
></manifest>
android/src/main/java/com/aliyun/face/aliyun_face_plugin/AliyunFacePlugin.java
deleted
100644 → 0
浏览文件 @
5dc8add1
package
com
.
aliyun
.
face
.
aliyun_face_plugin
;
import
androidx.annotation.NonNull
;
import
java.util.HashMap
;
import
java.util.Map
;
import
android.content.Context
;
import
io.flutter.embedding.engine.plugins.FlutterPlugin
;
import
io.flutter.plugin.common.MethodCall
;
import
io.flutter.plugin.common.MethodChannel
;
import
io.flutter.plugin.common.MethodChannel.MethodCallHandler
;
import
io.flutter.plugin.common.MethodChannel.Result
;
import
io.flutter.Log
;
import
com.alipay.face.api.ZIMCallback
;
import
com.alipay.face.api.ZIMFacade
;
import
com.alipay.face.api.ZIMFacadeBuilder
;
import
com.alipay.face.api.ZIMResponse
;
/** AliyunFacePlugin */
public
class
AliyunFacePlugin
implements
FlutterPlugin
,
MethodCallHandler
{
/// The MethodChannel that will the communication between Flutter and native Android
///
/// This local reference serves to register the plugin with the Flutter Engine and unregister it
/// when the Flutter Engine is detached from the Activity
private
MethodChannel
channel
;
private
Context
mContext
;
private
static
String
TAG
=
"AliyunFace"
;
@Override
public
void
onAttachedToEngine
(
@NonNull
FlutterPluginBinding
flutterPluginBinding
)
{
channel
=
new
MethodChannel
(
flutterPluginBinding
.
getBinaryMessenger
(),
"aliyun_face_plugin"
);
channel
.
setMethodCallHandler
(
this
);
mContext
=
flutterPluginBinding
.
getApplicationContext
();
}
@Override
public
void
onMethodCall
(
@NonNull
MethodCall
call
,
@NonNull
Result
result
)
{
if
(
call
.
method
.
equals
(
"getPlatformVersion"
))
{
result
.
success
(
"android "
+
android
.
os
.
Build
.
VERSION
.
RELEASE
);
}
else
if
(
call
.
method
.
equals
(
"init"
))
{
Log
.
d
(
TAG
,
"enter init."
);
ZIMFacade
.
install
(
mContext
);
}
else
if
(
call
.
method
.
equals
(
"getMetaInfos"
))
{
Log
.
d
(
TAG
,
"enter getMetaInfos."
);
String
metaInfo
=
ZIMFacade
.
getMetaInfos
(
mContext
);
result
.
success
(
metaInfo
);
}
else
if
(
call
.
method
.
equals
(
"verify"
))
{
Log
.
d
(
TAG
,
"enter verify."
);
Map
<
String
,
String
>
params
=
call
.
arguments
();
String
certifyId
=
params
.
get
(
"certifyId"
);
String
useVideo
=
params
.
get
(
"ext_params_key_use_video"
);
HashMap
<
String
,
String
>
extParams
=
new
HashMap
<>();
if
(
useVideo
.
equals
(
"1"
)){
extParams
.
put
(
"ext_params_key_use_video"
,
"true"
);
}
if
(
certifyId
==
null
||
certifyId
.
isEmpty
())
{
Log
.
e
(
TAG
,
"certifyId is null"
);
return
;
}
ZIMFacade
zimFacade
=
ZIMFacadeBuilder
.
create
(
mContext
);
zimFacade
.
verify
(
certifyId
,
false
,
extParams
,
new
ZIMCallback
()
{
@Override
public
boolean
response
(
ZIMResponse
response
)
{
if
(
null
!=
response
&&
1000
==
response
.
code
)
{
Log
.
d
(
TAG
,
"face verify success."
);
}
else
{
Log
.
e
(
TAG
,
"face verify error."
);
}
result
.
success
(
response
.
code
+
","
+
response
.
reason
);
return
true
;
}
});
}
else
{
result
.
notImplemented
();
}
}
@Override
public
void
onDetachedFromEngine
(
@NonNull
FlutterPluginBinding
binding
)
{
channel
.
setMethodCallHandler
(
null
);
}
}
example/android/app/build.gradle
deleted
100644 → 0
浏览文件 @
5dc8add1
def
localProperties
=
new
Properties
()
def
localPropertiesFile
=
rootProject
.
file
(
'local.properties'
)
if
(
localPropertiesFile
.
exists
())
{
localPropertiesFile
.
withReader
(
'UTF-8'
)
{
reader
->
localProperties
.
load
(
reader
)
}
}
def
flutterRoot
=
localProperties
.
getProperty
(
'flutter.sdk'
)
if
(
flutterRoot
==
null
)
{
throw
new
GradleException
(
"Flutter SDK not found. Define location with flutter.sdk in the local.properties file."
)
}
def
flutterVersionCode
=
localProperties
.
getProperty
(
'flutter.versionCode'
)
if
(
flutterVersionCode
==
null
)
{
flutterVersionCode
=
'1'
}
def
flutterVersionName
=
localProperties
.
getProperty
(
'flutter.versionName'
)
if
(
flutterVersionName
==
null
)
{
flutterVersionName
=
'1.0'
}
apply
plugin:
'com.android.application'
apply
plugin:
'kotlin-android'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
namespace
"com.aliyun.face.aliyun_face_plugin_example"
compileSdkVersion
33
ndkVersion
flutter
.
ndkVersion
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
targetCompatibility
JavaVersion
.
VERSION_1_8
}
kotlinOptions
{
jvmTarget
=
'1.8'
}
sourceSets
{
main
.
java
.
srcDirs
+=
'src/main/kotlin'
}
defaultConfig
{
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId
"com.aliyun.face.aliyun_face_plugin_example"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion
21
targetSdkVersion
31
versionCode
flutterVersionCode
.
toInteger
()
versionName
flutterVersionName
}
buildTypes
{
release
{
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig
signingConfigs
.
debug
}
}
}
flutter
{
source
'../..'
}
dependencies
{
implementation
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
example/android/app/build.gradle.kts
0 → 100644
浏览文件 @
97152007
plugins {
id("com.android.application")
id("kotlin-android")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
}
android {
namespace = "com.aliyun.face.aliyun_face_plugin_example"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.aliyun.face.aliyun_face_plugin_example"
// You can update the following values to match your application needs.
// For more information, see: https://flutter.dev/to/review-gradle-config.
minSdk = flutter.minSdkVersion
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.getByName("debug")
}
}
}
flutter {
source = "../.."
}
example/android/build.gradle
deleted
100644 → 0
浏览文件 @
5dc8add1
buildscript
{
ext
.
kotlin_version
=
'1.7.10'
repositories
{
google
()
mavenCentral
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:7.3.0'
classpath
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects
{
repositories
{
google
()
mavenCentral
()
flatDir
{
dirs
project
(
':aliyun_face_plugin'
).
file
(
'libs'
)
}
}
}
rootProject
.
buildDir
=
'../build'
subprojects
{
project
.
buildDir
=
"${rootProject.buildDir}/${project.name}"
}
subprojects
{
project
.
evaluationDependsOn
(
':app'
)
}
tasks
.
register
(
"clean"
,
Delete
)
{
delete
rootProject
.
buildDir
}
example/android/build.gradle.kts
0 → 100644
浏览文件 @
97152007
allprojects {
repositories {
google()
mavenCentral()
flatDir {
dirs(project(":aliyun_face_plugin").file("libs"))
}
}
}
val newBuildDir: Directory =
rootProject.layout.buildDirectory
.dir("../../build")
.get()
rootProject.layout.buildDirectory.value(newBuildDir)
subprojects {
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
project.layout.buildDirectory.value(newSubprojectBuildDir)
}
subprojects {
project.evaluationDependsOn(":app")
}
tasks.register<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}
example/android/gradle.properties
浏览文件 @
97152007
org.gradle.jvmargs
=
-Xmx
1536
M
org.gradle.jvmargs
=
-Xmx
2048
M
android.useAndroidX
=
true
android.enableJetifier
=
true
example/android/gradle/wrapper/gradle-wrapper.properties
浏览文件 @
97152007
...
...
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath
=
wrapper/dists
zipStoreBase
=
GRADLE_USER_HOME
zipStorePath
=
wrapper/dists
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-
7.5
-all.zip
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-
8.14
-all.zip
\ No newline at end of file
example/android/settings.gradle
deleted
100644 → 0
浏览文件 @
5dc8add1
include
':app'
def
localPropertiesFile
=
new
File
(
rootProject
.
projectDir
,
"local.properties"
)
def
properties
=
new
Properties
()
assert
localPropertiesFile
.
exists
()
localPropertiesFile
.
withReader
(
"UTF-8"
)
{
reader
->
properties
.
load
(
reader
)
}
def
flutterSdkPath
=
properties
.
getProperty
(
"flutter.sdk"
)
assert
flutterSdkPath
!=
null
,
"flutter.sdk not set in local.properties"
apply
from:
"$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
example/android/settings.gradle.kts
0 → 100644
浏览文件 @
97152007
pluginManagement {
val flutterSdkPath =
run {
val properties = java.util.Properties()
file("local.properties").inputStream().use { properties.load(it) }
val flutterSdkPath = properties.getProperty("flutter.sdk")
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
flutterSdkPath
}
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.11.1" apply false
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
}
include(":app")
pubspec.yaml
浏览文件 @
97152007
...
...
@@ -10,7 +10,7 @@ environment:
dependencies
:
flutter
:
sdk
:
flutter
plugin_platform_interface
:
^2.
0.2
plugin_platform_interface
:
^2.
1.8
dev_dependencies
:
flutter_test
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论