1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- plugins {
- alias(libs.plugins.android.application)
- alias(libs.plugins.kotlin.android)
- alias(libs.plugins.kotlin.compose)
- }
- android {
- namespace = "com.example.pda"
- compileSdk = 35
- defaultConfig {
- applicationId = "com.example.pda"
- minSdk = 24
- targetSdk = 35
- versionCode = 1
- versionName = "1.0"
- testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
- }
- buildTypes {
- release {
- isMinifyEnabled = false
- proguardFiles(
- getDefaultProguardFile("proguard-android-optimize.txt"),
- "proguard-rules.pro"
- )
- }
- }
- compileOptions {
- sourceCompatibility = JavaVersion.VERSION_11
- targetCompatibility = JavaVersion.VERSION_11
- }
- kotlinOptions {
- jvmTarget = "11"
- }
- buildFeatures {
- compose = true
- }
- }
- dependencies {
- // 基础依赖
- implementation(libs.androidx.core.ktx)
- implementation(libs.androidx.lifecycle.runtime.ktx)
- implementation(libs.androidx.activity.compose)
- // Compose BOM(确保版本 ≥ 2023.08.00)
- 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")
- implementation ("androidx.compose.animation:animation:1.3.0")
- implementation ("androidx.compose.ui:ui:1.3.0")
- // 其他依赖...
- implementation(files("libs\\platform_sdk_v3.0.0514.jar"))
- implementation("androidx.navigation:navigation-compose:2.7.7")
- implementation("com.google.accompanist:accompanist-navigation-animation:0.28.0")
- // Retrofit
- implementation("com.squareup.retrofit2:retrofit:2.9.0")
- implementation("com.squareup.retrofit2:converter-gson:2.9.0")
- // OkHttp
- implementation("com.squareup.okhttp3:okhttp:4.10.0")
- implementation("com.squareup.okhttp3:logging-interceptor:4.10.0")
- // Coroutines
- implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
- implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
- // ViewModel
- implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.6.2")
- // 测试依赖...
- testImplementation ("junit:junit:4.13.2")
- }
|