a
This commit is contained in:
@@ -0,0 +1,151 @@
|
||||
|
||||
plugins {
|
||||
id "com.android.application"
|
||||
id "kotlin-android"
|
||||
id "kotlin-kapt"
|
||||
id "dagger.hilt.android.plugin"
|
||||
id "kotlin-parcelize"
|
||||
id "androidx.navigation.safeargs.kotlin"
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdk = androidCompileSdk
|
||||
buildToolsVersion = androidBuildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.mm.hamcompose"
|
||||
minSdk = project.minSdkVersion
|
||||
targetSdk = project.targetSdkVersion
|
||||
versionCode = project.currentVersionCode
|
||||
versionName = project.currentVersionName
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables {
|
||||
useSupportLibrary = true
|
||||
}
|
||||
|
||||
multiDexEnabled 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 = composeVersion
|
||||
kotlinCompilerVersion = "1.4.30"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation "androidx.core:core-ktx:$coreKtxVersion"
|
||||
implementation "androidx.appcompat:appcompat:$appcompatVersion"
|
||||
implementation "com.google.android.material:material:$materialVersion"
|
||||
implementation "androidx.activity:activity-compose:$activityComposeVersion"
|
||||
|
||||
/** 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:$accompanistVersion"
|
||||
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"
|
||||
//implementation "com.google.accompanist:accompanist-placeholder:$accompanistVersion"
|
||||
|
||||
//约束布局
|
||||
implementation "androidx.constraintlayout:constraintlayout-compose:$constraintComposeVersion"
|
||||
|
||||
//compose插件
|
||||
implementation "androidx.compose.ui:ui:$composeVersion"
|
||||
implementation "androidx.compose.ui:ui-tooling:$composeVersion"
|
||||
implementation "androidx.compose.ui:ui-util:$composeVersion"
|
||||
implementation "androidx.compose.material:material:$composeVersion"
|
||||
implementation "androidx.compose.foundation:foundation:$composeVersion"
|
||||
implementation "androidx.compose.foundation:foundation-layout:$composeVersion"
|
||||
implementation "androidx.compose.runtime:runtime-livedata:$composeVersion"
|
||||
|
||||
//lifecycle插件
|
||||
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion"
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion"
|
||||
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$viewModelComposeVersion"
|
||||
//协程
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutineVersion"
|
||||
implementation "com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:$coroutineAdapterVersion"
|
||||
|
||||
//hilt inject framework
|
||||
implementation "com.google.dagger:hilt-android:$hiltVersion"
|
||||
kapt "com.google.dagger:hilt-compiler:$hiltVersion"
|
||||
androidTestImplementation "com.google.dagger:hilt-android-testing:$hiltVersion"
|
||||
kaptAndroidTest "com.google.dagger:hilt-compiler:$hiltVersion"
|
||||
testImplementation "com.google.dagger:hilt-android-testing:$hiltVersion"
|
||||
kaptTest "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"
|
||||
|
||||
//util
|
||||
implementation "com.blankj:utilcode:$blankjToolVersion"
|
||||
|
||||
//测试
|
||||
testImplementation "junit:junit:$junitVersion"
|
||||
androidTestImplementation "androidx.test.ext:junit:$extJunitVersion"
|
||||
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion"
|
||||
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$composeVersion"
|
||||
|
||||
//glide
|
||||
implementation "com.github.bumptech.glide:glide:$glideVersion"
|
||||
annotationProcessor "com.github.bumptech.glide:compiler:$glideVersion"
|
||||
//picasso
|
||||
implementation "com.squareup.picasso:picasso:$picassoVersion"
|
||||
|
||||
//paging分页库
|
||||
implementation "androidx.paging:paging-runtime:$pagingVersion"
|
||||
testImplementation "androidx.paging:paging-common:$pagingVersion"
|
||||
implementation "androidx.paging:paging-compose:$pagingComposeVersion"
|
||||
//room数据库
|
||||
implementation "androidx.room:room-runtime:$roomVersion"
|
||||
implementation "androidx.room:room-ktx:$roomVersion"
|
||||
kapt "androidx.room:room-compiler:$roomVersion"
|
||||
implementation "androidx.room:room-paging:$roomPagingVersion"
|
||||
|
||||
implementation "androidx.navigation:navigation-compose:$navigationComposeVersion"
|
||||
|
||||
//数据保存,用于cookie持久化
|
||||
implementation "androidx.datastore:datastore-preferences:$datastoreVersion"
|
||||
implementation "androidx.datastore:datastore-core:$datastoreVersion"
|
||||
implementation "org.jetbrains.kotlin:kotlin-reflect:1.5.21"
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user