You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
3.1 KiB
83 lines
3.1 KiB
group = "com.yimai.device_smartcar"
|
|
version = "1.0-SNAPSHOT"
|
|
|
|
buildscript {
|
|
ext.kotlin_version = "2.1.0"
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
classpath("com.android.tools.build:gradle:8.7.3")
|
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version")
|
|
}
|
|
}
|
|
|
|
allprojects {
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
}
|
|
|
|
apply plugin: "com.android.library"
|
|
apply plugin: "kotlin-android"
|
|
|
|
// 杰理 SDK 以「解包后的 jar + jniLibs」形态随插件分发(原始 aar 留在 third_party/aar/):
|
|
// Android Gradle Plugin 不允许 library 模块直接依赖本地 .aar
|
|
// ("Direct local .aar file dependencies are not supported when building an Android library"),
|
|
// 走 flatDir 又要求每个宿主 App 自己配仓库。解包成 jar 就完全自包含。
|
|
// 升级 SDK:换 third_party/aar/ 下的文件,重跑 tool/unpack_aars.sh,提交产物。
|
|
//
|
|
// 只带一个:jl_rcsp —— RcspAuth(设备认证,libjl_auth.so / libjl_crc.so),**BLE 能不能连上全靠它**。
|
|
// 它在 maven 上没有坐标,只能 vendor;包名 com.jieli.jl_rcsp.* / jl_filebrowse.*,
|
|
// 与工程里已有的 com.jieli.jl_bt_ota.* / com.jieli.audio.* 不重叠(已用 javap 核过)。
|
|
//
|
|
// ⚠️ **jl_bt_ota 必须走 maven,不能 vendor**:`ble_service` 与 `recorder_holder` 已经
|
|
// 依赖 com.jieli.jl_bt_ota:jl_bt_ota(解析到 1.11.0),再 vendor 一份 1.10.0 会直接
|
|
// Duplicate class 编不过(2026-09-10 踩过)。这里显式声明同一个坐标即可,
|
|
// 它自带 libjl_ota_auth.so,所以 jniLibs 里也不要放那个 so。
|
|
//
|
|
// ⚠️ 刻意**没有**带 jl_audio_decode / JL_Watch / jl_bluetooth_connect:
|
|
// - 音频解码(opus)阶段 6 才用,且 ble_service 已经带了 com.jieli.audio:jl_audio_decode;
|
|
// - JL_Watch 的 WatchOpImpl 是手表专用,我们直接继承 jl_rcsp 的 RcspOpImpl;
|
|
// - jl_bluetooth_connect 只被 lumi 的状态码转换用到,RcspAuth 本身不依赖它。
|
|
android {
|
|
namespace = "com.yimai.device_smartcar"
|
|
compileSdk = 36
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = JavaVersion.VERSION_17
|
|
}
|
|
|
|
sourceSets {
|
|
main.java.srcDirs += "src/main/kotlin"
|
|
main.jniLibs.srcDirs = ["src/main/jniLibs"]
|
|
}
|
|
|
|
defaultConfig {
|
|
minSdk = 21
|
|
}
|
|
|
|
// 杰理的 so 没有 16KB 对齐等新要求,按原样打包
|
|
packagingOptions {
|
|
jniLibs {
|
|
useLegacyPackaging = false
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation "androidx.core:core-ktx:1.13.1"
|
|
implementation fileTree(dir: "libs", include: ["*.jar"])
|
|
// 与 ble_service / recorder_holder 同一个坐标,版本由 Gradle 统一解析
|
|
implementation "com.jieli.jl_bt_ota:jl_bt_ota:1.11.0"
|
|
// 麦克风上行的 opus 解码(同上,坐标与 ble_service/recorder_holder 一致)
|
|
implementation "com.jieli.audio:jl_audio_decode:2.1.0"
|
|
}
|
|
}
|
|
|