SteamCloudGame/android/app/build.gradle
2024-12-29 14:27:28 +08:00

124 lines
3.9 KiB
Groovy
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
android {
namespace "co.steamcloud.game"
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
signingConfigs {
//签名的配置
signConfig {
storeFile file("game.jks")
storePassword '123456'
keyAlias 'game'
keyPassword '123456'
}
debug {
storeFile file("game.jks")
storePassword '123456'
keyAlias 'game'
keyPassword '123456'
}
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "co.steamcloud.game"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
ndk {
abiFilters "armeabi-v7a", "arm64-v8a", "x86"
}
multiDexEnabled true
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
//signingConfig signingConfigs.debug
signingConfig signingConfigs.signConfig //打包命令行gradlew assembleRelease
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
//关闭混淆
minifyEnabled false //删除无用代码
shrinkResources false //删除无用资源
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.squareup.okhttp3:okhttp:3.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0' //OKHttp优化策略依赖
implementation 'com.squareup.okio:okio:1.13.0'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'com.google.code.gson:gson:2.10.1'
//配置glide图片加载框架
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.github.bumptech.glide:okhttp3-integration:1.4.0@aar'
//lottie动画
implementation 'com.airbnb.android:lottie:4.2.2'
// 支付宝 SDK AAR 包所需的配置
api 'com.alipay.sdk:alipaysdk-android:15.8.17'
api 'com.android.support:support-v4:28.0.0'
api "com.android.support:appcompat-v7:28.0.0"
//微信
api 'com.tencent.mm.opensdk:wechat-sdk-android:6.8.30'
// api 'org.greenrobot:eventbus:3.3.1'
//配置eventbus
implementation 'org.simple:androideventbus:1.0.5.1'
//二维码
implementation 'com.google.zxing:core:3.3.0'
}
}
flutter {
source '../..'
}