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.
74 lines
2.2 KiB
74 lines
2.2 KiB
plugins {
|
|
id("com.android.application")
|
|
id("kotlin-android")
|
|
}
|
|
|
|
android {
|
|
compileSdk = 30
|
|
|
|
defaultConfig {
|
|
applicationId = "com.gyf.csams.background"
|
|
minSdk = 21
|
|
targetSdk = 30
|
|
versionCode = 1
|
|
versionName = "1.0"
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
vectorDrawables {
|
|
useSupportLibrary = true
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
val appName = "${rootProject.extra["background_app_name"]}"
|
|
debug {
|
|
manifestPlaceholders.apply {
|
|
this["background_app_name"] = appName
|
|
}
|
|
}
|
|
release {
|
|
isMinifyEnabled = false
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
manifestPlaceholders.apply {
|
|
this["background_app_name"] = appName
|
|
}
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = "1.8"
|
|
}
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
composeOptions {
|
|
kotlinCompilerExtensionVersion = rootProject.extra["compose_version"] as String
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation(project(":lib"))
|
|
|
|
// optional - Test helpers
|
|
testImplementation("androidx.room:room-testing:${rootProject.extra["room_version"]}")
|
|
//测试
|
|
testImplementation("junit:junit:4.13.2")
|
|
/**
|
|
* A cross environment JUnit4 runner for Android tests.
|
|
* https://developer.android.com/reference/androidx/test/ext/junit/runners/package-summary?hl=en
|
|
*/
|
|
androidTestImplementation("androidx.test.ext:junit:1.1.2")
|
|
/**
|
|
* https://developer.android.com/training/testing/espresso
|
|
* 使用 Espresso 来编写简洁、美观且可靠的 Android 界面测试。
|
|
* 包含核心和基本的 View 匹配器、操作和断言
|
|
*/
|
|
androidTestImplementation("androidx.test.espresso:espresso-core:3.3.0")
|
|
androidTestImplementation("androidx.compose.ui:ui-test-junit4:${rootProject.extra["compose_version"]}")
|
|
} |