122 lines
3.4 KiB
Kotlin
122 lines
3.4 KiB
Kotlin
plugins {
|
|
id("com.android.application")
|
|
id("org.jetbrains.kotlin.android")
|
|
}
|
|
|
|
android {
|
|
namespace = "com.roubao.autopilot"
|
|
compileSdk = 34
|
|
|
|
defaultConfig {
|
|
applicationId = "com.roubao.autopilot"
|
|
minSdk = 26
|
|
targetSdk = 34
|
|
versionCode = 20
|
|
versionName = "1.4.15"
|
|
|
|
vectorDrawables {
|
|
useSupportLibrary = true
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
}
|
|
|
|
buildFeatures {
|
|
compose = true
|
|
aidl = true
|
|
buildConfig = true
|
|
}
|
|
|
|
composeOptions {
|
|
kotlinCompilerExtensionVersion = "1.5.5"
|
|
}
|
|
|
|
packaging {
|
|
resources {
|
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
|
}
|
|
}
|
|
|
|
val generatedProbeAssets = layout.buildDirectory.dir("generated/probeFixtures")
|
|
sourceSets.getByName("debug").assets.srcDir(generatedProbeAssets)
|
|
|
|
val configuredProbeFixtures = providers.gradleProperty("probeFixturesDir")
|
|
val syncProbeFixtures = tasks.register<Sync>("syncProbeFixtures") {
|
|
if (configuredProbeFixtures.isPresent) {
|
|
from(rootProject.file(configuredProbeFixtures.get()))
|
|
}
|
|
into(generatedProbeAssets.map { it.dir("probe-fixtures") })
|
|
}
|
|
tasks.matching {
|
|
it.name == "mergeDebugAssets" ||
|
|
(
|
|
it.name.contains("Debug") &&
|
|
it.name.contains("lint", ignoreCase = true)
|
|
)
|
|
}.configureEach {
|
|
dependsOn(syncProbeFixtures)
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(project(":task-contract"))
|
|
|
|
// AndroidX Core
|
|
implementation("androidx.core:core-ktx:1.12.0")
|
|
implementation("androidx.core:core-splashscreen:1.0.1")
|
|
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
|
|
implementation("androidx.activity:activity-compose:1.8.1")
|
|
|
|
// Security (Encrypted SharedPreferences)
|
|
implementation("androidx.security:security-crypto:1.1.0-alpha06")
|
|
|
|
// Compose
|
|
implementation(platform("androidx.compose:compose-bom:2023.10.01"))
|
|
implementation("androidx.compose.ui:ui")
|
|
implementation("androidx.compose.ui:ui-graphics")
|
|
implementation("androidx.compose.ui:ui-tooling-preview")
|
|
implementation("androidx.compose.material3:material3")
|
|
|
|
// Coroutines
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
|
|
|
|
// OkHttp for API calls
|
|
implementation("com.squareup.okhttp3:okhttp:4.12.0")
|
|
|
|
// Shizuku
|
|
implementation("dev.rikka.shizuku:api:13.1.5")
|
|
implementation("dev.rikka.shizuku:provider:13.1.5")
|
|
|
|
// JSON
|
|
implementation("org.json:json:20231013")
|
|
|
|
// Bundled on-device OCR for Pinduoduo WebView checkout evidence
|
|
implementation("com.google.mlkit:text-recognition-chinese:16.0.1")
|
|
|
|
// Unit tests
|
|
testImplementation("junit:junit:4.13.2")
|
|
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3")
|
|
testImplementation("com.squareup.okhttp3:mockwebserver:4.12.0")
|
|
|
|
// Debug
|
|
debugImplementation("androidx.compose.ui:ui-tooling")
|
|
debugImplementation("androidx.compose.ui:ui-test-manifest")
|
|
}
|