mirror of
https://github.com/lichess-org/mobile.git
synced 2026-05-26 13:50:52 +00:00
96 lines
2.9 KiB
Kotlin
96 lines
2.9 KiB
Kotlin
import java.util.Properties
|
|
import java.io.FileInputStream
|
|
|
|
plugins {
|
|
id("com.android.application")
|
|
id("kotlin-android")
|
|
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
|
id("dev.flutter.flutter-gradle-plugin")
|
|
id("com.google.gms.google-services")
|
|
id("com.google.firebase.crashlytics")
|
|
}
|
|
|
|
val keystoreProperties = Properties()
|
|
val keystorePropertiesFile = rootProject.file("key.properties")
|
|
if (keystorePropertiesFile.exists()) {
|
|
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
|
|
}
|
|
|
|
android {
|
|
namespace = "org.lichess.mobileV2"
|
|
// compileSdk = flutter.compileSdkVersion
|
|
// home_widget pulls in glance-appwidget and remote-creation-android, both of which
|
|
// declare in their AAR metadata that all dependents (including the app) must compile
|
|
// against SDK 37+. This cannot be suppressed — it is enforced by AGP at build time.
|
|
compileSdk = 37
|
|
ndkVersion = flutter.ndkVersion
|
|
|
|
compileOptions {
|
|
// Flag required by flutter_local_notifications package
|
|
isCoreLibraryDesugaringEnabled = true
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = JavaVersion.VERSION_11.toString()
|
|
}
|
|
|
|
defaultConfig {
|
|
// Flag required by flutter_local_notifications package
|
|
multiDexEnabled = true
|
|
applicationId = "org.lichess.mobileV2"
|
|
minSdk = 26
|
|
targetSdk = flutter.targetSdkVersion
|
|
versionCode = flutter.versionCode
|
|
versionName = flutter.versionName
|
|
// Used by flutter_appauth plugin
|
|
manifestPlaceholders["appAuthRedirectScheme"] = "org.lichess.mobile"
|
|
ndk {
|
|
abiFilters += listOf("armeabi-v7a", "arm64-v8a", "x86_64")
|
|
}
|
|
}
|
|
|
|
signingConfigs {
|
|
create("release") {
|
|
keyAlias = keystoreProperties["keyAlias"] as String?
|
|
keyPassword = keystoreProperties["keyPassword"] as String?
|
|
storeFile = keystoreProperties["storeFile"]?.let { file(it) }
|
|
storePassword = keystoreProperties["storePassword"] as String?
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = true
|
|
isShrinkResources = true
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro"
|
|
)
|
|
signingConfig = signingConfigs.getByName("release")
|
|
ndk {
|
|
debugSymbolLevel = "FULL"
|
|
}
|
|
}
|
|
debug {
|
|
applicationIdSuffix = ".debug"
|
|
}
|
|
}
|
|
|
|
dependenciesInfo {
|
|
includeInApk = false
|
|
includeInBundle = true
|
|
}
|
|
}
|
|
|
|
flutter {
|
|
source = "../.."
|
|
}
|
|
|
|
dependencies {
|
|
// Dependency required by flutter_local_notifications package
|
|
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4")
|
|
implementation("androidx.core:core-splashscreen:1.0.1")
|
|
}
|