111 lines
2.7 KiB
Groovy
111 lines
2.7 KiB
Groovy
plugins {
|
|
//alias(libs.plugins.android.application)
|
|
alias(libs.plugins.android.library)
|
|
id 'org.jetbrains.kotlin.android'
|
|
}
|
|
|
|
ext.vvl_version='1.4.321.0'
|
|
apply from: "./download_vvl.gradle"
|
|
|
|
android {
|
|
namespace 'com.hmwl.face_sdk'
|
|
compileSdk 36
|
|
defaultConfig {
|
|
//applicationId "com.hmwl.face_sdk"
|
|
minSdk 30
|
|
targetSdk 36
|
|
versionCode 1
|
|
versionName "1.0"
|
|
|
|
ndk {
|
|
abiFilters 'arm64-v8a'
|
|
}
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
consumerProguardFiles "consumer-rules.pro"
|
|
}
|
|
|
|
buildTypes {
|
|
debug {
|
|
debuggable true
|
|
jniDebuggable true
|
|
}
|
|
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
}
|
|
|
|
// 添加 Kotlin 编译选项
|
|
kotlinOptions {
|
|
jvmTarget = '17' // 与 Java 版本保持一致
|
|
}
|
|
|
|
kotlin {
|
|
jvmToolchain(17)
|
|
}
|
|
|
|
buildFeatures {
|
|
prefab true
|
|
}
|
|
|
|
|
|
sourceSets {
|
|
main {
|
|
jniLibs.srcDirs += [
|
|
'libs/tasks-vision/jni',
|
|
'libs/tasks-core/jni'
|
|
]
|
|
//java.srcDirs += [
|
|
// 'libs/tasks-vision/vision_classes',
|
|
// 'libs/tasks-core/core_classes'
|
|
//]
|
|
res.srcDirs += [
|
|
'libs/tasks-vision/res',
|
|
'libs/tasks-core/res'
|
|
]
|
|
}
|
|
}
|
|
|
|
externalNativeBuild {
|
|
cmake {
|
|
path file('../CMakeLists.txt')
|
|
version '3.22.1'
|
|
}
|
|
}
|
|
|
|
packagingOptions {
|
|
pickFirst '**/*.jar'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
|
|
implementation libs.appcompat
|
|
implementation libs.material
|
|
implementation libs.games.activity
|
|
testImplementation libs.junit
|
|
androidTestImplementation libs.ext.junit
|
|
androidTestImplementation libs.espresso.core
|
|
|
|
|
|
implementation 'com.google.protobuf:protobuf-javalite:3.21.12'
|
|
implementation files('libs/tasks-vision.jar', 'libs/tasks-core.jar')
|
|
|
|
//implementation fileTree(dir: 'libs/tasks-vision', include: ['*.jar'])
|
|
//implementation fileTree(dir: 'libs/tasks-core', include: ['*.jar'])
|
|
|
|
|
|
def camerax_version = '1.4.2'
|
|
implementation "androidx.camera:camera-core:$camerax_version"
|
|
implementation "androidx.camera:camera-camera2:$camerax_version"
|
|
implementation "androidx.camera:camera-lifecycle:$camerax_version"
|
|
implementation "androidx.camera:camera-view:$camerax_version"
|
|
|
|
} |