139 lines
4.2 KiB
Kotlin
139 lines
4.2 KiB
Kotlin
@file:Suppress("UnstableApiUsage")
|
|
|
|
import Versions.gitHash
|
|
import Versions.keyprops
|
|
|
|
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.android)
|
|
kotlin("kapt")
|
|
alias(libs.plugins.hilt.android)
|
|
}
|
|
|
|
apply(from = "../buildSrc/tasks.gradle.kts")
|
|
|
|
kapt {
|
|
correctErrorTypes = true
|
|
}
|
|
|
|
android {
|
|
compileSdk = Versions.COMPILE_SDK
|
|
buildToolsVersion = Versions.BUILD_TOOLS
|
|
namespace = "com.dede.android_eggs"
|
|
|
|
defaultConfig {
|
|
applicationId = "com.dede.android_eggs"
|
|
minSdk = Versions.MIN_SDK
|
|
targetSdk = Versions.TARGET_SDK
|
|
versionCode = 33
|
|
versionName = "2.1.1"
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
|
|
resourceConfigurations += listOf(
|
|
"zh", "zh-rTW",
|
|
"ru", "uk-rUA",
|
|
"en", "it", "de", "fr", "nl-rNL", "hu-rHU",
|
|
"es", "pt", "pt-rBR", "pl-rPL", "tr-rTR", "fi-rFI",
|
|
"in-rID", "hr-rHR", /*"la-rLA", */"el-rGR", "no-rNO",
|
|
"ja-rJP", "ko", "vi-rVN", "th-rTH", "fil-rPH", "lo-rLA",
|
|
"ar-rSA",
|
|
)
|
|
|
|
setProperty("archivesBaseName", "easter_eggs_${versionName}_${versionCode}")
|
|
|
|
buildConfigField("String", "GIT_HASH", "\"${gitHash}\"")
|
|
// Language configuration only
|
|
buildConfigField("int", "LANGUAGE_RES", resourceConfigurations.size.toString())
|
|
|
|
vectorDrawables {
|
|
useSupportLibrary = true
|
|
}
|
|
}
|
|
|
|
signingConfigs {
|
|
if (keyprops.isEmpty) return@signingConfigs
|
|
create("release") {
|
|
keyAlias = keyprops.getProperty("keyAlias")
|
|
keyPassword = keyprops.getProperty("keyPassword")
|
|
storeFile = file(keyprops.getProperty("storeFile"))
|
|
storePassword = keyprops.getProperty("storePassword")
|
|
enableV3Signing = true
|
|
enableV4Signing = true
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
val config = signingConfigs.findByName("release") ?: signingConfigs.getByName("debug")
|
|
getByName("debug") {
|
|
signingConfig = config
|
|
}
|
|
getByName("release") {
|
|
isShrinkResources = true
|
|
isMinifyEnabled = true
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
signingConfig = config
|
|
}
|
|
}
|
|
|
|
viewBinding {
|
|
enable = true
|
|
}
|
|
|
|
lint {
|
|
disable += listOf("NotifyDataSetChanged")
|
|
fatal += listOf("NewApi", "InlineApi")
|
|
}
|
|
|
|
packaging {
|
|
resources.excludes += listOf(
|
|
"okhttp3/**",// only coil local image
|
|
"META-INF/*.version"
|
|
)
|
|
}
|
|
|
|
}
|
|
|
|
dependencies {
|
|
implementation(libs.androidx.appcompat)
|
|
implementation(libs.androidx.core)
|
|
implementation(libs.androidx.activity)
|
|
implementation(libs.androidx.lifecycle.runtime)
|
|
implementation(libs.androidx.lifecycle.viewmodel)
|
|
implementation(libs.androidx.preference)
|
|
implementation(libs.androidx.constraintlayout)
|
|
implementation(libs.androidx.browser)
|
|
implementation(libs.androidx.window)
|
|
implementation(libs.google.material)
|
|
implementation(libs.androidx.startup)
|
|
implementation(libs.io.coil)
|
|
implementation(libs.free.reflection)
|
|
implementation(libs.viewbinding.delegate)
|
|
implementation(libs.blurhash.android)
|
|
implementation(libs.hilt.android)
|
|
kapt(libs.hilt.compiler)
|
|
debugImplementation(libs.squareup.leakcanary)
|
|
implementation(project(":basic"))
|
|
implementation(project(":eggs:U"))
|
|
implementation(project(":eggs:T"))
|
|
implementation(project(":eggs:S"))
|
|
implementation(project(":eggs:R"))
|
|
implementation(project(":eggs:Q"))
|
|
implementation(project(":eggs:Pie"))
|
|
implementation(project(":eggs:Oreo"))
|
|
implementation(project(":eggs:Nougat"))
|
|
implementation(project(":eggs:Marshmallow"))
|
|
implementation(project(":eggs:Lollipop"))
|
|
implementation(project(":eggs:KitKat"))
|
|
implementation(project(":eggs:JellyBean"))
|
|
implementation(project(":eggs:IceCreamSandwich"))
|
|
implementation(project(":eggs:Honeycomb"))
|
|
implementation(project(":eggs:Gingerbread"))
|
|
|
|
testImplementation(libs.junit)
|
|
androidTestImplementation(libs.nanohttpd)
|
|
androidTestImplementation(libs.bundles.android.test)
|
|
}
|