build.gradle
3.19 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
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '121'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.2.1'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.huawei.agconnect'
android {
compileSdkVersion 28
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.naji.one_key"
minSdkVersion 21
targetSdkVersion 28
versionCode 118
versionName "1.1.8"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
//选择要添加的对应 cpu 类型的 .so 库。
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a'
}
manifestPlaceholders = [
XG_ACCESS_ID : '1500012875',
XG_ACCESS_KEY : 'AVR2GJERH0HC',
HW_APPID : '102832405',
VIVO_APPID: "103886384",
VIVO_APPKEY:"5a04e5c3485c0b19a2911c95dcaff5d2",
PACKAGE_NAME : "com.naji.one_key",// 小米通道
]
}
signingConfigs {
release {
storeFile file("./src/main/assets/xiaotao.jks")
storePassword "xt123456"
keyAlias "key0"
keyPassword "xt123456"
}
debug {
storeFile file("./src/main/assets/xiaotao.jks")
storePassword "xt123456"
keyAlias "key0"
keyPassword "xt123456"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles 'proguard-rules.pro'
signingConfig signingConfigs.release
}
debug{
minifyEnabled false
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation 'com.tencent.tpns:huawei:1.2.0.3-release'// 华为推送
implementation 'com.tencent.tpns:xiaomi:1.2.0.3-release' // 小米推送
implementation 'com.tencent.tpns:oppo:1.2.0.3-release' // OPPO 推送
implementation 'com.tencent.tpns:vivo:1.2.0.3-release' // vivo 推送
}