-
Notifications
You must be signed in to change notification settings - Fork 316
Expand file tree
/
Copy pathbuild.gradle
More file actions
135 lines (116 loc) · 3.49 KB
/
Copy pathbuild.gradle
File metadata and controls
135 lines (116 loc) · 3.49 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
import java.text.SimpleDateFormat
plugins {
id('com.android.application')
id('org.jetbrains.kotlin.android')
}
android {
namespace 'com.pengxh.daily.app'
compileSdk 36
lint {
disable 'NewerVersionAvailable'
disable 'GradleDependency'
}
defaultConfig {
applicationId 'com.pengxh.daily.app'
minSdk 26
targetSdk 36
versionCode 2422
versionName '2.4.2.2'
ndkVersion '21.4.7075529'
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
externalNativeBuild {
cmake {
cppFlags "-std=c++14"
}
}
}
externalNativeBuild {
cmake {
path "src/main/cpp/CMakeLists.txt"
version "3.22.1"
}
}
flavorDimensions += 'versionCode'
signingConfigs {
release {
storeFile file('DailyTask.jks')
storePassword '123456789'
keyAlias 'key0'
keyPassword '123456789'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
// GString id = "com.alibaba.android.${randomCode()}"
// productFlavors {
// daily {
// applicationId = id
// }
// }
packagingOptions {
exclude 'META-INF/NOTICE.md'
exclude 'META-INF/LICENSE.md'
exclude 'META-INF/versions/9/OSGI-INF/MANIFEST.MF'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
buildFeatures {
buildConfig true
viewBinding true
}
applicationVariants.configureEach {
outputs.configureEach {
outputFileName = "DT_${getBuildDate()}_${android.defaultConfig.versionName}.apk"
}
}
}
static def randomCode() {
String alphabetsInLowerCase = 'abcdefghijklmnopqrstuvwxyz'
String randomString = ""
for (i in 0..5) {
int randomIndex = Math.random() * alphabetsInLowerCase.length()
randomString += alphabetsInLowerCase[randomIndex]
}
return randomString
}
static def getBuildDate() {
SimpleDateFormat dateFormat = new SimpleDateFormat('yyyyMMdd', Locale.CHINA)
return dateFormat.format(System.currentTimeMillis())
}
dependencies {
implementation project(':lite')
implementation 'androidx.core:core-ktx:1.17.0'
implementation 'androidx.appcompat:appcompat:1.7.1'
implementation 'com.google.android.material:material:1.13.0'
implementation 'androidx.recyclerview:recyclerview:1.4.0'
//数据库框架
implementation 'androidx.room:room-runtime:2.8.2'
annotationProcessor 'androidx.room:room-compiler:2.8.2'
//邮件
implementation 'com.sun.mail:android-mail:1.6.8'
implementation 'com.sun.mail:android-activation:1.6.8'
//日期、时间选择器
implementation 'com.github.gzu-liyujiang.AndroidPicker:WheelPicker:4.1.15'
implementation 'com.google.code.gson:gson:2.14.0'
//返回值转换器
implementation 'com.squareup.retrofit2:converter-gson:3.0.0'
//okhttp3日志拦截器
implementation 'com.squareup.okhttp3:logging-interceptor:5.4.0'
//网络请求和接口封装
implementation 'com.squareup.retrofit2:retrofit:3.0.0'
implementation 'com.squareup.okhttp3:okhttp:5.4.0'
}