104 lines
3.4 KiB
Plaintext
104 lines
3.4 KiB
Plaintext
plugins {
|
|
alias(libs.plugins.android.application)
|
|
id("com.chaquo.python")
|
|
}
|
|
|
|
android {
|
|
namespace = "com.example.myapplication"
|
|
compileSdk = 35
|
|
|
|
defaultConfig {
|
|
applicationId = "com.example.myapplication"
|
|
minSdk = 28
|
|
targetSdk = 35
|
|
versionCode = 1
|
|
versionName = "1.0"
|
|
ndk {
|
|
// On Apple silicon, you can omit x86_64.
|
|
abiFilters += listOf("arm64-v8a", "x86_64")
|
|
}
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
javaCompileOptions {
|
|
annotationProcessorOptions {
|
|
arguments += mapOf(
|
|
"room.schemaLocation" to "$projectDir/schemas".toString(),
|
|
"room.incremental" to "true"
|
|
)
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = true
|
|
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
|
|
// 添加以下配置确保混淆规则生效
|
|
matchingFallbacks += listOf("release")
|
|
}
|
|
|
|
debug {
|
|
isMinifyEnabled = false // 确保debug不混淆
|
|
}
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
}
|
|
buildFeatures {
|
|
viewBinding = true
|
|
}
|
|
|
|
}
|
|
chaquopy {
|
|
defaultConfig {
|
|
version = "3.11"
|
|
buildPython("C:\\Users\\cuizhibin\\AppData\\Local\\Programs\\Python\\Python311\\python.exe")
|
|
pip {
|
|
install("typing_extensions")
|
|
install("lxml==5.3.0") // python-docx 的依赖
|
|
install("python-docx") // 使用兼容性较好的版本
|
|
install("Pillow") // 可选,处理图片
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(libs.room.runtime)
|
|
implementation(libs.firebase.crashlytics.buildtools)
|
|
implementation(libs.activity)
|
|
annotationProcessor(libs.room.compiler)
|
|
implementation(libs.appcompat)
|
|
implementation(libs.material)
|
|
implementation(libs.constraintlayout)
|
|
implementation(libs.navigation.fragment)
|
|
implementation(libs.navigation.ui)
|
|
testImplementation(libs.junit)
|
|
androidTestImplementation(libs.ext.junit)
|
|
androidTestImplementation(libs.espresso.core)
|
|
implementation(libs.okhttp)
|
|
implementation ("androidx.core:core-ktx:1.12.0")
|
|
implementation ("androidx.lifecycle:lifecycle-livedata-ktx:2.7.0")
|
|
implementation ("androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0")
|
|
implementation("com.google.android.gms:play-services-location:21.0.1")
|
|
implementation("androidx.exifinterface:exifinterface:1.3.3")
|
|
implementation ("commons-io:commons-io:2.11.0")
|
|
implementation ("com.getbase:floatingactionbutton:1.10.1")
|
|
implementation ("com.android.volley:volley:1.2.1")
|
|
implementation ("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4")
|
|
implementation ("com.google.android.material:material:1.6.0")
|
|
implementation ("com.squareup.retrofit2:retrofit:2.9.0")
|
|
implementation ("com.squareup.retrofit2:converter-gson:2.9.0")
|
|
implementation ("com.squareup.retrofit2:adapter-rxjava2:2.9.0")
|
|
implementation ("com.squareup.okhttp3:logging-interceptor:4.9.3")
|
|
implementation ("com.google.code.gson:gson:2.10.1")
|
|
}
|