Код: Выделить всё
dependencies {
// Other dependencies.
testImplementation(kotlin("test"))
}
tasks.test {
useJUnitPlatform()
}
[img]https:/ /i.sstatic.net/6lk0lXBM.png[/img]
Это мой build.gradle.kts. файл:
Код: Выделить всё
plugins {
alias(libs.plugins.androidApplication)
alias(libs.plugins.kotlinAndroid)
alias(libs.plugins.compose.compiler)
}
android {
namespace = "com.example.myapp"
compileSdk = 34
defaultConfig {
applicationId = "com.example.myapp"
minSdk = 24
targetSdk = 34
versionCode = 1
versionName = "1.0"
}
buildFeatures {
compose = true
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
buildTypes {
getByName("release") {
isMinifyEnabled = false
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
}
dependencies {
implementation(projects.shared)
implementation(libs.compose.ui)
implementation(libs.compose.ui.tooling.preview)
implementation(libs.compose.material3)
implementation(libs.androidx.activity.compose)
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1")
implementation("androidx.activity:activity-compose:1.8.0")
debugImplementation(libs.compose.ui.tooling)
testImplementation(kotlin("test"))
}
tasks.test {
useJUnitPlatform()
}
Подробнее здесь: https://stackoverflow.com/questions/791 ... -in-kotlin
Мобильная версия