agent-bigo/app/build.gradle

116 lines
3.3 KiB
Groovy
Raw Permalink Normal View History

2025-05-20 16:39:05 +08:00
plugins {
alias(libs.plugins.android.application)
2025-07-08 22:01:28 +08:00
alias(libs.plugins.kotlin.android)
2025-05-20 16:39:05 +08:00
}
android {
namespace 'com.example.studyapp'
compileSdk 35
signingConfigs {
release {
storeFile file('agent_add.jks')
storePassword 'agent_add'
keyAlias 'agent_add'
keyPassword 'agent_add'
}
}
2025-05-20 16:39:05 +08:00
defaultConfig {
applicationId "com.example.studyapp"
minSdk 24
2025-05-20 16:39:05 +08:00
targetSdk 35
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// 指定支持的 ABI 类型(如果需要限制支持的 ABI
externalNativeBuild {
cmake {
arguments "-DANDROID_ABI=arm64-v8a"
}
}
sourceSets {
main {
jniLibs.srcDirs = ['src/main/jniLibs']
}
}
2025-05-20 16:39:05 +08:00
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled true
2025-05-20 16:39:05 +08:00
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
// 禁用符号剥离
ndk {
debugSymbolLevel 'none'
}
}
2025-05-20 16:39:05 +08:00
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
// 添加 CMake 支持
externalNativeBuild {
cmake {
// 指定 CMakeLists.txt 的路径
path file("src/main/cpp/CMakeLists.txt")
}
}
2025-07-08 22:01:28 +08:00
kotlinOptions {
jvmTarget = '11'
}
2025-06-28 14:38:05 +08:00
applicationVariants.all { variant ->
variant.outputs.all { output ->
def versionName = variant.versionName ?: "1.0"
def versionCode = variant.versionCode ?: 1
output.outputFileName = "app-${variant.applicationId}-v${versionName}-${versionCode}.apk"
}
}
2025-05-20 16:39:05 +08:00
}
dependencies {
implementation libs.appcompat
implementation libs.material
implementation libs.activity
implementation libs.constraintlayout
implementation libs.play.services.ads.identifier
2025-07-08 22:01:28 +08:00
implementation libs.core.ktx
2025-05-20 16:39:05 +08:00
testImplementation libs.junit
androidTestImplementation libs.ext.junit
androidTestImplementation libs.espresso.core
implementation 'androidx.work:work-runtime:2.9.0'
// Retrofit 核心库
2025-07-08 22:01:28 +08:00
// implementation 'com.squareup.retrofit2:retrofit:2.9.0'
//
// // 如果需要用 Gson 作为 JSON 序列化/反序列化工具,还需添加以下依赖
// implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
//
// // 如果需要 RxJava 支持(可选)
// implementation 'com.squareup.retrofit2:adapter-rxjava3:2.9.0'
implementation 'org.nanohttpd:nanohttpd:2.3.1'
// 添加 Mockito 核心依赖
testImplementation 'org.mockito:mockito-core:5.4.0'
// 如果需要在 Android Instrumented Tests 中使用 Mockito
androidTestImplementation 'org.mockito:mockito-android:5.4.0'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-inline:4.8.0'
2025-07-08 22:01:28 +08:00
implementation(platform("com.squareup.okhttp3:okhttp-bom:4.12.0"))
implementation("com.squareup.okhttp3:okhttp")
implementation("com.squareup.okhttp3:logging-interceptor")
implementation ("com.google.code.gson:gson:2.10.1")
}