plugins { id 'com.android.application' id 'kotlin-android' id "kotlin-kapt" id "kotlin-parcelize" id "dagger.hilt.android.plugin" id "androidx.navigation.safeargs.kotlin" } android { compileSdk 31 defaultConfig { applicationId "com.zj.wanandroid" minSdk 21 targetSdk 31 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { useSupportLibrary true } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' useIR = true } buildFeatures { compose true } composeOptions { kotlinCompilerExtensionVersion compose_version kotlinCompilerVersion kotlin_version } packagingOptions { resources { excludes += '/META-INF/{AL2.0,LGPL2.1}' } } } dependencies { implementation 'androidx.core:core-ktx:1.6.0' implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'com.google.android.material:material:1.4.0' implementation "androidx.compose.ui:ui:$compose_version" implementation "androidx.compose.material:material:$compose_version" implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1' implementation 'androidx.activity:activity-compose:1.3.1' testImplementation 'junit:junit:4.+' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" implementation "androidx.navigation:navigation-compose:2.4.0-beta02" /** accompanist辅助插件 */ implementation "com.google.accompanist:accompanist-insets:$accompanistVersion" implementation "com.google.accompanist:accompanist-coil:0.15.0" //系统ui控制器 implementation "com.google.accompanist:accompanist-systemuicontroller:$accompanistVersion" //glide implementation "com.google.accompanist:accompanist-glide:0.15.0" //viewPager implementation "com.google.accompanist:accompanist-pager:0.20.2" implementation "com.google.accompanist:accompanist-pager-indicators:$accompanistVersion" //下拉刷新 implementation "com.google.accompanist:accompanist-swiperefresh:$accompanistVersion" //流式布局 implementation "com.google.accompanist:accompanist-flowlayout:$accompanistVersion" //placeholder implementation "com.google.accompanist:accompanist-placeholder-material:$accompanistVersion" //hilt inject framework implementation "com.google.dagger:hilt-android:$hiltVersion" kapt "com.google.dagger:hilt-compiler:$hiltVersion" implementation "androidx.hilt:hilt-navigation-compose:$hiltComposeVersion" implementation "androidx.hilt:hilt-lifecycle-viewmodel:$hiltComposeVersion" kapt "androidx.hilt:hilt-compiler:$hiltCompilerVersion" //http request implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion" implementation "com.squareup.retrofit2:retrofit:$retrofitVersion" implementation "com.google.code.gson:gson:$gsonVersion" //数据保存,用于cookie持久化 implementation "androidx.datastore:datastore-preferences:$datastoreVersion" implementation "androidx.datastore:datastore-core:$datastoreVersion" implementation "org.jetbrains.kotlin:kotlin-reflect:1.5.31" //paging分页库 implementation "androidx.paging:paging-runtime:$pagingVersion" testImplementation "androidx.paging:paging-common:$pagingVersion" implementation "androidx.paging:paging-compose:$pagingComposeVersion" //约束布局 implementation "androidx.constraintlayout:constraintlayout-compose:$constraintComposeVersion" }