101 lines
3.3 KiB
Plaintext
101 lines
3.3 KiB
Plaintext
import java.util.Properties
|
||
|
||
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")
|
||
}
|
||
val signingProperties =
|
||
project.rootProject.file("key.properties").takeIf { it.exists() }
|
||
?.reader()
|
||
?.use { Properties().apply { load(it) } }
|
||
?: Properties()
|
||
|
||
android {
|
||
namespace = "com.kinetra.adehok.app"
|
||
compileSdk = flutter.compileSdkVersion
|
||
ndkVersion = "27.0.12077973"
|
||
|
||
compileOptions {
|
||
sourceCompatibility = JavaVersion.VERSION_11
|
||
targetCompatibility = JavaVersion.VERSION_11
|
||
isCoreLibraryDesugaringEnabled = true
|
||
}
|
||
|
||
kotlinOptions {
|
||
jvmTarget = JavaVersion.VERSION_11.toString()
|
||
}
|
||
|
||
defaultConfig {
|
||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||
applicationId = "com.kinetra.adehok.app"
|
||
// You can update the following values to match your application needs.
|
||
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
||
minSdk = flutter.minSdkVersion
|
||
targetSdk = flutter.targetSdkVersion
|
||
versionCode = flutter.versionCode
|
||
versionName = flutter.versionName
|
||
|
||
ndk {
|
||
abiFilters.clear()
|
||
abiFilters.add("armeabi-v7a")
|
||
abiFilters.add("arm64-v8a")
|
||
}
|
||
}
|
||
|
||
|
||
signingConfigs {
|
||
create("release") {
|
||
storeFile = file(signingProperties["storeFile"].toString())
|
||
storePassword = signingProperties["storePassword"].toString()
|
||
keyAlias = signingProperties["keyAlias"].toString()
|
||
keyPassword = signingProperties["keyPassword"].toString()
|
||
}
|
||
}
|
||
splits {
|
||
abi {
|
||
isEnable = false
|
||
}
|
||
}
|
||
buildTypes {
|
||
release {
|
||
isMinifyEnabled = true
|
||
isShrinkResources = true
|
||
proguardFiles(
|
||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||
"proguard-rules.pro"
|
||
)
|
||
|
||
// 签名配置
|
||
signingConfig = signingConfigs.getByName("release")
|
||
|
||
}
|
||
debug {
|
||
signingConfig = signingConfigs.getByName("release")
|
||
|
||
}
|
||
}
|
||
}
|
||
dependencies {
|
||
//支持 Kotlin 编写的原生代码
|
||
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.6.10")
|
||
// 支持方法数超过 65536 的项目
|
||
implementation("com.android.support:multidex:1.0.3")
|
||
implementation("com.google.android.exoplayer:exoplayer:2.19.1")
|
||
// // firebase相关:推送通知
|
||
// implementation("com.google.firebase:firebase-messaging:23.1.2")
|
||
// // firebase相关:行为统计
|
||
// implementation("com.google.firebase:firebase-analytics:21.2.2")
|
||
// // firebase相关:崩溃日志上报
|
||
// implementation("com.google.firebase:firebase-crashlytics:18.3.7")
|
||
// // firebase相关:用于识别设备实例 ID
|
||
// implementation("com.google.firebase:firebase-iid:21.1.0")
|
||
// implementation("com.android.installreferrer:installreferrer:2.2")
|
||
// // firebase相关:添加核心库 coreLibraryDesugaring 依赖
|
||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4")
|
||
}
|
||
flutter {
|
||
source = "../.."
|
||
}
|