forked from gedoor/MyBookshelf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
222 lines (187 loc) · 7.41 KB
/
build.gradle
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'org.greenrobot.greendao'
apply plugin: 'kotlin-parcelize'
apply plugin: "de.timfreiheit.resourceplaceholders"
apply plugin: 'kotlin-kapt'
static def releaseTime() {
return new Date().format("yy.MMddHH", TimeZone.getTimeZone("GMT+8"))
}
def name = "YueDu"
def version = "2." + releaseTime()
def gitCommits = Integer.parseInt('git rev-list --count HEAD'.execute([], project.rootDir).text.trim())
android {
compileSdkVersion 31
signingConfigs {
myConfig {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_KEY_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_STORE_PASSWORD
}
}
defaultConfig {
applicationId "com.gedoor.monkeybook"
minSdkVersion 21
targetSdkVersion 31
versionCode 10000 + gitCommits
versionName version
project.ext.set("archivesBaseName", name + "_" + version)
multiDexEnabled true
}
buildFeatures {
viewBinding true
}
lintOptions {
abortOnError false
}
buildTypes {
release {
signingConfig signingConfigs.myConfig
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
signingConfig signingConfigs.myConfig
applicationIdSuffix '.debug'
versionNameSuffix 'debug'
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
android.applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "${name}_${defaultConfig.versionName}.apk"
}
}
}
kotlinOptions {
jvmTarget = "1.8"
}
buildToolsVersion '30.0.3'
compileOptions {
// Flag to enable support for the new language APIs
coreLibraryDesugaringEnabled true
// Sets Java compatibility to Java 8
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked"
//options.compilerArgs << "-Xlint:deprecation"
}
}
resourcePlaceholders {
files = ['xml/shortcuts.xml']
}
dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
testImplementation 'junit:junit:4.13.2'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':basemvplib')
implementation('androidx.multidex:multidex:2.0.1')
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version")
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
//协程
def coroutines_version = '1.5.1'
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version")
//anko
def anko_version = '0.10.8'
implementation "org.jetbrains.anko:anko-sdk27:$anko_version"
implementation "org.jetbrains.anko:anko-sdk27-listeners:$anko_version"
//fireBase
implementation 'com.google.firebase:firebase-analytics:20.0.2'
implementation 'com.google.firebase:firebase-crashlytics:18.2.6'
//lifecycle
def lifecycle_version = '2.3.1'
implementation("androidx.lifecycle:lifecycle-common-java8:$lifecycle_version")
//androidX
implementation('androidx.appcompat:appcompat:1.4.0')
implementation('androidx.core:core-ktx:1.7.0')
implementation("androidx.activity:activity-ktx:1.4.0")
implementation("androidx.fragment:fragment-ktx:1.4.0")
implementation('androidx.preference:preference-ktx:1.1.1')
implementation('androidx.constraintlayout:constraintlayout:2.1.2')
implementation('androidx.swiperefreshlayout:swiperefreshlayout:1.1.0')
implementation('androidx.viewpager2:viewpager2:1.0.0')
implementation('com.google.android.material:material:1.4.0')
implementation('com.google.android.flexbox:flexbox:3.0.0')
implementation('com.google.code.gson:gson:2.8.8')
implementation('androidx.webkit:webkit:1.4.0')
//Splitties
def splitties_version = '3.0.0'
implementation("com.louiscad.splitties:splitties-appctx:$splitties_version")
implementation("com.louiscad.splitties:splitties-systemservices:$splitties_version")
implementation("com.louiscad.splitties:splitties-views:$splitties_version")
//media
implementation("androidx.media:media:1.4.3")
def exoplayer_version = '2.15.0'
implementation "com.google.android.exoplayer:exoplayer-core:$exoplayer_version"
implementation "com.google.android.exoplayer:extension-okhttp:$exoplayer_version"
implementation "com.google.android.exoplayer:exoplayer-hls:$exoplayer_version"
implementation "com.google.android.exoplayer:exoplayer-smoothstreaming:$exoplayer_version"
implementation "com.google.android.exoplayer:exoplayer-dash:$exoplayer_version"
implementation "com.google.android.exoplayer:exoplayer-rtsp:$exoplayer_version"
//google
implementation 'com.google.android.material:material:1.4.0'
implementation 'com.google.code.gson:gson:2.8.8'
//RxAndroid
implementation 'io.reactivex.rxjava2:rxjava:2.2.19'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
//RxBus
implementation 'com.hwangjr.rxbus:rxbus:2.0.1'
//Retrofit
//noinspection GradleDependency
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.9.0'
implementation 'com.squareup.retrofit2:converter-scalars:2.9.0'
//J_SOUP
implementation 'org.jsoup:jsoup:1.14.3'
implementation 'cn.wanghaomiao:JsoupXpath:2.5.0'
implementation 'com.jayway.jsonpath:json-path:2.6.0'
//JS
//noinspection GradleDependency
implementation 'com.github.gedoor:rhino-android:1.3'
//GreenDao
implementation 'org.greenrobot:greendao:3.3.0'
implementation 'com.github.yuweiguocn:GreenDaoUpgradeHelper:v2.2.1'
//Glide
implementation 'com.github.bumptech.glide:glide:4.12.0'
kapt 'com.github.bumptech.glide:compiler:4.12.0'
//CircleImageView
implementation 'de.hdodenhof:circleimageview:3.1.0'
//bind view
//noinspection AnnotationProcessorOnCompilePath
implementation 'com.jakewharton:butterknife:10.2.2'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.2'
//webServer
implementation 'org.nanohttpd:nanohttpd:2.3.1'
implementation 'org.nanohttpd:nanohttpd-websocket:2.3.1'
//二维码
implementation 'cn.bingoogolapple:bga-qrcode-zxing:1.3.7'
//颜色选择
implementation 'com.jaredrummler:colorpicker:1.1.0'
//apache
implementation('org.apache.commons:commons-text:1.9')
//简繁转换
implementation 'com.luhuiguo:chinese-utils:1.0'
//字符串比较
implementation 'net.ricecode:string-similarity:1.0.0'
//MarkDown
implementation 'ru.noties.markwon:core:3.1.0'
//epub
implementation('com.positiondev.epublib:epublib-core:3.1') {
exclude group: 'org.slf4j'
exclude group: 'xmlpull'
}
}
greendao {
schemaVersion 68
daoPackage 'com.kunfei.bookshelf.dao'
targetGenDir 'src/main/java'
}
afterEvaluate {
// for (Task task : project.tasks.matching { it.name.startsWith('crashlyticsUploadDeobs') }) {
// task.enabled = false
// }
}