build.gradle.kts
5.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
import java.io.FileInputStream
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")
}
// 加载 key.properties 文件
val keystorePropertiesFile = rootProject.file("key.properties")
val keystoreProperties = Properties()
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
}
android {
namespace = "cn.banxe.bxe"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "cn.banxe.bxe"
// 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
manifestPlaceholders["VIVO_APPKEY"] = "f7e37b20f48234c425d9e7f82fdd16c0"
manifestPlaceholders["VIVO_APPID"] = "105993977"
// manifestPlaceholders["HONOR_APPID"] = "您应用分配的证书 APPID"
}
// 添加签名配置
signingConfigs {
named("debug") {
if (keystorePropertiesFile.exists()) {
keyAlias = keystoreProperties.getProperty("keyAlias")
keyPassword = keystoreProperties.getProperty("keyPassword")
storeFile = file(keystoreProperties.getProperty("storeFile"))
storePassword = keystoreProperties.getProperty("storePassword")
}
}
create("release") {
if (keystorePropertiesFile.exists()) {
keyAlias = keystoreProperties.getProperty("keyAlias")
keyPassword = keystoreProperties.getProperty("keyPassword")
storeFile = file(keystoreProperties.getProperty("storeFile"))
storePassword = keystoreProperties.getProperty("storePassword")
}
}
}
buildTypes {
debug {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.getByName("debug")
}
release {
signingConfig = signingConfigs.getByName("release")
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
}
flutter {
source = "../.."
}
dependencies {
// implementation("com.tencent.timpush:timpush:8.7.7201")
// implementation("com.tencent.liteav.tuikit:tuicore:8.7.7201")
// 版本号 "VERSION" 请前往 更新日志 中获取配置。
// Huawei
//implementation("com.tencent.timpush:huawei:8.7.7201")
// XiaoMi
//implementation("com.tencent.timpush:xiaomi:8.7.7201")
// OPPO
//implementation("com.tencent.timpush:oppo:8.7.7201")
// vivo
implementation("com.tencent.timpush:vivo:8.8.7357")
// Honor
//implementation("com.tencent.timpush:honor:8.7.7201")
// Meizu
//implementation("com.tencent.timpush:meizu:8.7.7201")
// Google Firebase Cloud Messaging (Google FCM)
//implementation("com.tencent.timpush:fcm:8.7.7201")
// 聚合SDK start
implementation("com.yfanads.ads:sdk-core:${rootProject.ext["sdk_versionName"]}")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
// 聚合SDK end
//百度广告SDK(适配+原sdk)
implementation("com.yfanads.ads:adapter-bd:${rootProject.ext["bd_sdk_version"]}")
//穿山甲广告SDK(适配+原sdk)
implementation("com.yfanads.ads:adapter-csj:${rootProject.ext["csj_sdk_version"]}")
implementation("com.squareup.okhttp3:okhttp:3.12.1")
//快手广告SDK(适配+原sdk)
implementation("com.yfanads.ads:adapter-ks:${rootProject.ext["ks_sdk_version"]}")
implementation("androidx.localbroadcastmanager:localbroadcastmanager:1.1.0")
//优量汇广告SDK(适配+原sdk)
implementation("com.yfanads.ads:adapter-ylh:${rootProject.ext["ylh_sdk_version"]}")
//京东广告SDK(适配+原来sdk)
implementation("com.yfanads.ads:adapter-jd:${rootProject.ext["jd_sdk_version"]}")
//华为广告SDK(适配+原来sdk)
implementation("com.yfanads.ads:adapter-hw:${rootProject.ext["hw_sdk_version"]}")
//小米广告SDK(适配+原来sdk)
implementation("com.yfanads.ads:adapter-xm:${rootProject.ext["xm_sdk_version"]}")
//oppo广告SDK(适配+原来sdk)
implementation("com.yfanads.ads:adapter-oppo:${rootProject.ext["oppo_sdk_version"]}")
//荣耀广告 (适配+源sdk)
implementation("com.yfanads.ads:adapter-ry:${rootProject.ext["ry_sdk_version"]}")
}