2024-12-21 12:56:41 -07:00
|
|
|
plugins {
|
|
|
|
alias(libs.plugins.android.application)
|
|
|
|
alias(libs.plugins.kotlin.android)
|
2024-12-29 14:53:12 +00:00
|
|
|
alias(libs.plugins.kotlin.compose)
|
2024-12-21 12:56:41 -07:00
|
|
|
|
|
|
|
// For "Room", see below for more details.
|
|
|
|
kotlin("kapt")
|
|
|
|
}
|
|
|
|
|
|
|
|
android {
|
|
|
|
namespace = "com.hyperling.roomexample"
|
2024-12-29 14:53:12 +00:00
|
|
|
compileSdk = 35
|
2024-12-21 12:56:41 -07:00
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
applicationId = "com.hyperling.roomexample"
|
2024-12-29 14:53:12 +00:00
|
|
|
minSdk = 21
|
2024-12-21 12:56:41 -07:00
|
|
|
targetSdk = 34
|
|
|
|
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 {
|
2024-12-29 14:53:12 +00:00
|
|
|
compose = true
|
2024-12-21 12:56:41 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
|
|
|
implementation(libs.androidx.core.ktx)
|
2024-12-29 14:53:12 +00:00
|
|
|
implementation(libs.androidx.lifecycle.runtime.ktx)
|
|
|
|
implementation(libs.androidx.activity.compose)
|
|
|
|
implementation(platform(libs.androidx.compose.bom))
|
|
|
|
implementation(libs.androidx.ui)
|
|
|
|
implementation(libs.androidx.ui.graphics)
|
|
|
|
implementation(libs.androidx.ui.tooling.preview)
|
|
|
|
implementation(libs.androidx.material3)
|
2024-12-21 12:56:41 -07:00
|
|
|
testImplementation(libs.junit)
|
|
|
|
androidTestImplementation(libs.androidx.junit)
|
|
|
|
androidTestImplementation(libs.androidx.espresso.core)
|
2024-12-29 14:53:12 +00:00
|
|
|
androidTestImplementation(platform(libs.androidx.compose.bom))
|
|
|
|
androidTestImplementation(libs.androidx.ui.test.junit4)
|
|
|
|
debugImplementation(libs.androidx.ui.tooling)
|
|
|
|
debugImplementation(libs.androidx.ui.test.manifest)
|
2024-12-21 12:56:41 -07:00
|
|
|
|
|
|
|
// For Room
|
|
|
|
// https://www.youtube.com/watch?v=bOd3wO0uFr8&themeRefresh=1
|
|
|
|
/* build.gradle version * /
|
|
|
|
def room_version: String = "2.5.0"
|
|
|
|
implementation"androidx.room:room-ktx:$room_version"
|
|
|
|
kapt "androidx.room:room-compiler:$room_version"
|
|
|
|
// */
|
|
|
|
/* build.grade.kts version */
|
2024-12-29 14:53:12 +00:00
|
|
|
val room_version: String = "2.6.1"
|
2024-12-21 12:56:41 -07:00
|
|
|
implementation("androidx.room:room-ktx:$room_version")
|
|
|
|
kapt("androidx.room:room-compiler:$room_version")
|
|
|
|
// */
|
|
|
|
}
|