67 lines
2.1 KiB
Kotlin
67 lines
2.1 KiB
Kotlin
plugins {
|
|
id("com.android.library")
|
|
id("org.jetbrains.kotlin.android")
|
|
}
|
|
|
|
android {
|
|
namespace = "com.zui.animate"
|
|
val sdkVersion = rootProject.extra["sdkVersion"] as Int?
|
|
val minSdkVersion = rootProject.extra["minSdkVersion"] as Int?
|
|
compileSdk = sdkVersion
|
|
|
|
defaultConfig {
|
|
minSdk = minSdkVersion
|
|
targetSdk = sdkVersion
|
|
|
|
testInstrumentationRunner = rootProject.extra["testInstrumentationRunner"] as String?
|
|
rootProject.extra["consumerProguardFiles"]?.let { consumerProguardFiles(it) }
|
|
resourceConfigurations += listOf("en", "zh", "zh-rCN", "zh-rHK", "zh-rTW")
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
// 开启混淆
|
|
isMinifyEnabled = true
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
}
|
|
}
|
|
val javaVersion = rootProject.extra["javaVersion"] as JavaVersion
|
|
val javaVersionName = javaVersion.toString()
|
|
|
|
kotlin {
|
|
jvmToolchain {
|
|
languageVersion.set(JavaLanguageVersion.of(javaVersionName))
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = javaVersion
|
|
targetCompatibility = javaVersion
|
|
}
|
|
buildFeatures {
|
|
compose = true
|
|
viewBinding = true
|
|
}
|
|
|
|
composeOptions {
|
|
kotlinCompilerExtensionVersion = rootProject.extra["kotlinCompiler"] as String?
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
|
|
implementation("${rootProject.extra["coreKtx"] as String?}")
|
|
implementation("${rootProject.extra["appcompat"] as String?}")
|
|
|
|
val composeVersion = rootProject.extra["composeVersion"] as String?
|
|
implementation("androidx.compose.ui:ui:$composeVersion")
|
|
implementation("androidx.compose.ui:ui-tooling-preview:$composeVersion")
|
|
implementation("androidx.compose.runtime:runtime-livedata:$composeVersion")
|
|
implementation("androidx.compose.material:material:$composeVersion")
|
|
testImplementation("${rootProject.extra["junit"] as String?}")
|
|
androidTestImplementation("${rootProject.extra["extJunit"] as String?}")
|
|
androidTestImplementation("${rootProject.extra["espressoCore"] as String?}")
|
|
} |