You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
csamsclient/lib/build.gradle.kts

115 lines
4.0 KiB

plugins {
id("com.android.library")
id("kotlin-android")
// id("org.jetbrains.kotlin.plugin.serialization") version "1.4.32"
}
android {
compileSdk = 30
defaultConfig {
minSdk = 21
targetSdk = 30
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
}
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"
freeCompilerArgs = listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true"
)
}
buildFeatures {
compose = true
}
}
dependencies {
/**
* 针对最新的平台功能和 API 调整应用,同时还支持旧设备。
* https://developer.android.com/jetpack/androidx/releases/core
*/
api("androidx.core:core-ktx:1.3.2")
/**
* 允许在平台旧版 API 上访问新 API(很多使用 Material Design)。
* https://developer.android.com/jetpack/androidx/releases/appcompat
*/
api("androidx.appcompat:appcompat:1.2.0")
/**
* 与设备互动所需的 Compose UI 的基本组件,包括布局、绘图和输入。
* https://developer.android.com/jetpack/androidx/releases/compose-ui
*/
api("androidx.compose.ui:ui:${rootProject.extra["compose_version"]}")
api("androidx.compose.ui:ui-tooling:${rootProject.extra["compose_version"]}")
/**
* Compose 的编程模型和状态管理的基本构建块,以及 Compose 编译器插件针对的核心运行时。
* https://developer.android.com/jetpack/androidx/releases/compose-runtime
*/
api("androidx.compose.runtime:runtime-livedata:${rootProject.extra["compose_version"]}")
//Material Components
api("com.google.android.material:material:1.3.0")
/**
* 使用现成可用的 Material Design 组件构建 Jetpack Compose UI。这是更高层级的 Compose 入口点,旨在提供与 www.material.io 上描述的组件一致的组件。
* https://developer.android.com/jetpack/androidx/releases/compose-material
*/
api("androidx.compose.material:material:${rootProject.extra["compose_version"]}")
/**
* 生命周期感知型组件
* https://developer.android.com/jetpack/androidx/releases/lifecycle
*/
api("androidx.lifecycle:lifecycle-runtime-ktx:${rootProject.extra["lifecycle_version"]}")
api("androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha04")
/**
* 访问基于 Activity 构建的可组合 API。
* https://developer.android.com/jetpack/androidx/releases/activity
*/
api("androidx.activity:activity-compose:1.3.0-alpha07")
/**
* Simple, pretty and powerful logger for android
* https://github.com/orhanobut/logger
*/
api("com.orhanobut:logger:2.2.0")
/**
*
* https://github.com/square/okhttp
*/
api("com.squareup.okhttp3:okhttp:4.9.1")
/**
* https://github.com/google/gson
*/
api("com.google.code.gson:gson:2.8.6")
/**
* https://kotlinlang.org/docs/serialization.html
*/
api("org.jetbrains.kotlinx:kotlinx-serialization-json:1.2.1")
/**
* https://developer.android.com/jetpack/androidx/releases/navigation
*/
api("androidx.navigation:navigation-compose:1.0.0-alpha10")
/**
* https://developer.android.com/jetpack/androidx/releases/room
*/
api("androidx.room:room-runtime:${rootProject.extra["room_version"]}")
// optional - Kotlin Extensions and Coroutines support for Room
api("androidx.room:room-ktx:${rootProject.extra["room_version"]}")
// https://github.com/coil-kt/coil/blob/master/README-zh.md
api("io.coil-kt:coil:1.2.1")
}