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 = "社团管理" debug { manifestPlaceholders.apply { this["background_app_name"] = appName } buildConfigField(type = "String", name = "background_app_name", value = "\"$appName\"") } release { isMinifyEnabled = false proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" ) manifestPlaceholders.apply { this["background_app_name"] = appName } buildConfigField(type = "String", name = "background_app_name", value = "\"$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")) //测试 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"]}") }