85 lines
2.9 KiB
Kotlin
85 lines
2.9 KiB
Kotlin
plugins {
|
|
id("com.android.application")
|
|
id("org.jetbrains.kotlin.android")
|
|
id("kotlin-kapt")
|
|
id("com.google.dagger.hilt.android")
|
|
}
|
|
|
|
android {
|
|
namespace = "com.example.voiceapp"
|
|
compileSdk = 34
|
|
|
|
defaultConfig {
|
|
applicationId = "com.example.voiceapp"
|
|
minSdk = 26
|
|
targetSdk = 34
|
|
versionCode = 1
|
|
versionName = "1.0.0"
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
vectorDrawables { useSupportLibrary = true }
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
kotlinOptions { jvmTarget = "17" }
|
|
buildFeatures { compose = true }
|
|
composeOptions { kotlinCompilerExtensionVersion = "1.5.8" }
|
|
packaging { resources { excludes += "/META-INF/{AL2.0,LGPL2.1}" } }
|
|
}
|
|
|
|
kapt {
|
|
correctErrorTypes = true
|
|
}
|
|
|
|
dependencies {
|
|
implementation("androidx.core:core-ktx:1.12.0")
|
|
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")
|
|
implementation("androidx.activity:activity-compose:1.8.2")
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
|
|
|
|
implementation(platform("androidx.compose:compose-bom:2024.02.00"))
|
|
implementation("androidx.compose.ui:ui")
|
|
implementation("androidx.compose.ui:ui-graphics")
|
|
implementation("androidx.compose.ui:ui-tooling-preview")
|
|
implementation("androidx.compose.material3:material3")
|
|
implementation("androidx.compose.material:material-icons-extended")
|
|
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0")
|
|
|
|
implementation("com.google.dagger:hilt-android:2.50")
|
|
kapt("com.google.dagger:hilt-compiler:2.50")
|
|
implementation("androidx.hilt:hilt-navigation-compose:1.1.0")
|
|
|
|
implementation("com.squareup.retrofit2:retrofit:2.9.0")
|
|
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
|
|
implementation("com.squareup.okhttp3:okhttp:4.12.0")
|
|
implementation("androidx.media:media:1.7.0")
|
|
|
|
implementation("androidx.datastore:datastore-preferences:1.0.0")
|
|
|
|
testImplementation("junit:junit:4.13.2")
|
|
testImplementation("io.mockk:mockk:1.13.9")
|
|
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.7.3")
|
|
testImplementation("app.cash.turbine:turbine:1.0.0")
|
|
testImplementation("org.mockito:mockito-core:5.8.0")
|
|
}
|
|
|
|
afterEvaluate {
|
|
tasks.register<JavaExec>("runSimulation") {
|
|
group = "application"
|
|
description = "Runs the voice app simulation CLI"
|
|
dependsOn("compileDebugKotlin")
|
|
|
|
val runtimeClasspath = files(
|
|
android.bootClasspath,
|
|
configurations.getByName("debugRuntimeClasspath"),
|
|
layout.buildDirectory.dir("tmp/kotlin-classes/debug")
|
|
)
|
|
classpath = runtimeClasspath
|
|
mainClass.set("com.example.voiceapp.RunAppSimulationKt")
|
|
standardInput = System.`in`
|
|
}
|
|
}
|