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.
csamsclient/foreground/build.gradle.kts

92 lines
3.1 KiB

plugins {
id("com.android.application")
id("kotlin-android")
}
android {
signingConfigs {
getByName("debug") {
storeFile = file("..\\jks\\csams.jks")
storePassword = rootProject.extra["store_password"] as String
keyAlias = rootProject.extra["key_alias"] as String
keyPassword = rootProject.extra["key_password"] as String
}
}
compileSdk = 30
defaultConfig {
applicationId = "com.gyf.csams.foreground"
minSdk = 21
targetSdk = 30
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
}
signingConfig = signingConfigs.getByName("debug")
}
buildTypes {
//APP应用名字
val appName = "学生社团"
val serverAddress = rootProject.extra["SERVER_ADDRESS"]
debug {
manifestPlaceholders.apply {
this["foreground_app_name"] = appName
}
buildConfigField(type = "String", name = "foreground_app_name", value = "\"$appName\"")
buildConfigField(type = "String", name = "SERVER_ADDRESS", value = "\"$serverAddress\"")
}
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
manifestPlaceholders.apply {
this["foreground_app_name"] = appName
}
buildConfigField(type = "String", name = "foreground_app_name", value = "\"$appName\"")
buildConfigField(type = "String", name = "SERVER_ADDRESS", value = "\"$serverAddress\"")
}
}
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
}
packagingOptions {
resources.excludes.add("META-INF/AL2.0")
resources.excludes.add("META-INF/LGPL2.1")
}
}
dependencies {
implementation(project(":lib"))
implementation(files("libs\\BaiduLBS_Android.jar"))
//测试
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"]}")
}