94 lines
3.4 KiB
Kotlin
94 lines
3.4 KiB
Kotlin
fun properties(key: String) = project.findProperty(key).toString()
|
|
|
|
plugins {
|
|
id("com.android.application")
|
|
id("org.jetbrains.kotlin.android")
|
|
id("com.google.dagger.hilt.android")
|
|
kotlin("kapt")
|
|
}
|
|
|
|
android {
|
|
namespace = "com.postliu.wanandroid"
|
|
compileSdk = 33
|
|
|
|
defaultConfig {
|
|
applicationId = "com.postliu.wanandroid"
|
|
minSdk = 24
|
|
targetSdk = 33
|
|
versionCode = 100
|
|
versionName = "1.0.0"
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
vectorDrawables {
|
|
useSupportLibrary = true
|
|
}
|
|
|
|
buildConfigField("String", "BASE_IP", properties("BASE_URL"))
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = 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"
|
|
}
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
composeOptions {
|
|
kotlinCompilerExtensionVersion = "1.3.2"
|
|
}
|
|
packagingOptions {
|
|
resources {
|
|
excludes.add("/META-INF/{AL2.0,LGPL2.1}")
|
|
}
|
|
}
|
|
hilt {
|
|
enableExperimentalClasspathAggregation = true
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
val composeVersion = "1.3.0"
|
|
val accompanistVersion = "0.27.0"
|
|
implementation("androidx.paging:paging-compose:1.0.0-alpha17")
|
|
implementation("com.github.zhujiang521:Banner:2.4.0")
|
|
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.6.0-alpha03")
|
|
implementation("com.github.ihsanbal:LoggingInterceptor:3.1.0") {
|
|
exclude(group = "org.json", module = "json")
|
|
}
|
|
implementation("com.google.code.gson:gson:2.10")
|
|
implementation("com.squareup.retrofit2:retrofit:2.9.0")
|
|
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
|
|
implementation("io.coil-kt:coil-compose:2.2.2")
|
|
implementation("androidx.hilt:hilt-navigation-compose:1.0.0")
|
|
implementation("androidx.navigation:navigation-compose:2.5.3")
|
|
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1")
|
|
implementation("com.google.dagger:hilt-android:2.44")
|
|
kapt("com.google.dagger:hilt-compiler:2.44")
|
|
implementation("com.google.accompanist:accompanist-swiperefresh:$accompanistVersion")
|
|
implementation("com.google.accompanist:accompanist-drawablepainter:$accompanistVersion")
|
|
implementation("com.google.accompanist:accompanist-systemuicontroller:$accompanistVersion")
|
|
implementation("androidx.core:core-ktx:1.8.0")
|
|
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.4.1")
|
|
implementation("androidx.activity:activity-compose:1.5.1")
|
|
implementation("androidx.compose.ui:ui:$composeVersion")
|
|
implementation("androidx.compose.ui:ui-tooling-preview:$composeVersion")
|
|
implementation("androidx.compose.material:material:1.3.0")
|
|
testImplementation("junit:junit:4.13.2")
|
|
androidTestImplementation("androidx.test.ext:junit:1.1.3")
|
|
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
|
|
androidTestImplementation("androidx.compose.ui:ui-test-junit4:$composeVersion")
|
|
debugImplementation("androidx.compose.ui:ui-tooling:$composeVersion")
|
|
debugImplementation("androidx.compose.ui:ui-test-manifest:$composeVersion")
|
|
} |