2025-09-25 16:19:06 +08:00
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
|
2025-11-25 15:28:24 +08:00
|
|
|
|
/*
|
|
|
|
|
|
修订说明:
|
|
|
|
|
|
- 增加 repositories(包含 google/mavenCentral + flatDir 指向 libs)
|
|
|
|
|
|
- 合并 fileTree 引入(同时包含 .jar 和 .aar)
|
|
|
|
|
|
- 保留 uniapp 必需配置和 packagingOptions
|
|
|
|
|
|
- 请确保 app/libs 下只有一份 share-weixin-release.aar,且没有重复同名 AAR
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
|
|
google()
|
|
|
|
|
|
mavenCentral()
|
|
|
|
|
|
// 把 app/libs 当作本地仓库(部分环境需要)
|
|
|
|
|
|
flatDir {
|
|
|
|
|
|
dirs 'libs'
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-09-25 16:19:06 +08:00
|
|
|
|
android {
|
|
|
|
|
|
compileSdk 35
|
|
|
|
|
|
|
2025-11-11 17:28:07 +08:00
|
|
|
|
namespace 'com.android.hldy'
|
2025-11-25 15:28:24 +08:00
|
|
|
|
|
2025-09-25 16:19:06 +08:00
|
|
|
|
defaultConfig {
|
2025-11-11 17:28:07 +08:00
|
|
|
|
applicationId "com.android.hldy"
|
2025-09-25 16:19:06 +08:00
|
|
|
|
minSdkVersion 21
|
2025-11-25 15:28:24 +08:00
|
|
|
|
targetSdkVersion 33
|
2025-12-01 10:34:07 +08:00
|
|
|
|
versionCode 10011
|
|
|
|
|
|
versionName "1.0.011"
|
2025-09-25 16:19:06 +08:00
|
|
|
|
multiDexEnabled true
|
2025-11-25 15:28:24 +08:00
|
|
|
|
|
2025-09-25 16:19:06 +08:00
|
|
|
|
ndk {
|
2025-11-25 15:28:24 +08:00
|
|
|
|
abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
|
2025-09-25 16:19:06 +08:00
|
|
|
|
}
|
2025-11-25 15:28:24 +08:00
|
|
|
|
|
2025-09-25 16:19:06 +08:00
|
|
|
|
compileOptions {
|
|
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
signingConfigs {
|
|
|
|
|
|
config {
|
|
|
|
|
|
keyAlias 'key0'
|
|
|
|
|
|
keyPassword '123456'
|
|
|
|
|
|
storeFile file('uniplugin.jks')
|
|
|
|
|
|
storePassword '123456'
|
|
|
|
|
|
v1SigningEnabled true
|
|
|
|
|
|
v2SigningEnabled true
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
|
|
release {
|
|
|
|
|
|
signingConfig signingConfigs.config
|
|
|
|
|
|
zipAlignEnabled false
|
|
|
|
|
|
minifyEnabled false
|
|
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
|
|
|
}
|
|
|
|
|
|
debug {
|
|
|
|
|
|
signingConfig signingConfigs.config
|
|
|
|
|
|
zipAlignEnabled false
|
|
|
|
|
|
minifyEnabled false
|
|
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-11-25 15:28:24 +08:00
|
|
|
|
|
|
|
|
|
|
/* uniapp 必需配置 */
|
2025-09-25 16:19:06 +08:00
|
|
|
|
aaptOptions {
|
|
|
|
|
|
additionalParameters '--auto-add-overlay'
|
|
|
|
|
|
ignoreAssetsPattern "!.svn:!.git:.*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~"
|
|
|
|
|
|
}
|
2025-11-25 15:28:24 +08:00
|
|
|
|
|
2025-09-25 16:19:06 +08:00
|
|
|
|
lint {
|
|
|
|
|
|
baseline = file("lint-baseline.xml")
|
|
|
|
|
|
}
|
2025-11-25 15:28:24 +08:00
|
|
|
|
|
2025-09-25 16:19:06 +08:00
|
|
|
|
compileOptions {
|
|
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
packagingOptions {
|
|
|
|
|
|
pickFirst 'lib/arm64-v8a/libc++_shared.so'
|
|
|
|
|
|
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
|
|
|
|
|
|
pickFirst 'lib/x86/libc++_shared.so'
|
|
|
|
|
|
jniLibs {
|
|
|
|
|
|
useLegacyPackaging true
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-11-25 15:28:24 +08:00
|
|
|
|
|
2025-09-25 16:19:06 +08:00
|
|
|
|
sourceSets {
|
|
|
|
|
|
main {
|
|
|
|
|
|
jniLibs.srcDirs = ['libs']
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-11-25 15:28:24 +08:00
|
|
|
|
|
2025-09-25 16:19:06 +08:00
|
|
|
|
dependencies {
|
2025-11-25 15:28:24 +08:00
|
|
|
|
// 一行同时包含 .jar 和 .aar,避免重复引用问题
|
|
|
|
|
|
implementation fileTree(dir: 'libs', include: ['*.jar','*.aar'])
|
2025-09-25 16:19:06 +08:00
|
|
|
|
|
2025-11-25 15:28:24 +08:00
|
|
|
|
/* uniapp 所需基础库 */
|
2025-09-25 16:19:06 +08:00
|
|
|
|
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
|
|
|
|
|
implementation 'com.facebook.fresco:fresco:1.13.0'
|
|
|
|
|
|
implementation "com.facebook.fresco:animated-gif:1.13.0"
|
|
|
|
|
|
implementation 'com.github.bumptech.glide:glide:4.9.0'
|
|
|
|
|
|
implementation 'com.alibaba:fastjson:1.2.83'
|
|
|
|
|
|
implementation 'androidx.webkit:webkit:1.3.0'
|
|
|
|
|
|
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
|
|
|
|
|
|
implementation 'androidx.core:core:1.1.0'
|
|
|
|
|
|
implementation "androidx.fragment:fragment:1.1.0"
|
|
|
|
|
|
implementation 'androidx.appcompat:appcompat:1.1.0'
|
2025-11-25 15:28:24 +08:00
|
|
|
|
implementation 'com.google.android.material:material:1.5.0'
|
|
|
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
2025-09-25 16:19:06 +08:00
|
|
|
|
|
2025-11-25 15:28:24 +08:00
|
|
|
|
/* Kotlin & 协程 */
|
2025-09-25 16:19:06 +08:00
|
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.6.0"
|
|
|
|
|
|
implementation "org.jetbrains.kotlin:kotlin-reflect:1.6.0"
|
|
|
|
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8"
|
|
|
|
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.8"
|
2025-11-25 15:28:24 +08:00
|
|
|
|
|
|
|
|
|
|
/* 网络 & 权限库 */
|
|
|
|
|
|
implementation "com.squareup.okhttp3:okhttp:3.12.12"
|
2025-09-25 16:19:06 +08:00
|
|
|
|
implementation "com.github.getActivity:XXPermissions:18.0"
|
|
|
|
|
|
|
2025-11-25 15:28:24 +08:00
|
|
|
|
/* 项目模块 */
|
|
|
|
|
|
implementation project(':mylibrary')
|
|
|
|
|
|
|
|
|
|
|
|
/* 微信 SDK(无 MTA 版本) - 通过 Maven 引入 */
|
|
|
|
|
|
implementation 'com.tencent.mm.opensdk:wechat-sdk-android-without-mta:6.8.0'
|
|
|
|
|
|
|
2025-12-01 17:13:01 +08:00
|
|
|
|
// 必须加上这个,不然离线打包的 wgt install 会崩溃
|
|
|
|
|
|
implementation 'net.lingala.zip4j:zip4j:2.11.5'
|
2025-09-25 16:19:06 +08:00
|
|
|
|
}
|