You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
139 lines
4.4 KiB
139 lines
4.4 KiB
apply plugin: 'com.android.application'
|
|
apply plugin: 'kotlin-android'
|
|
apply plugin: 'kotlin-android-extensions'
|
|
apply plugin: 'kotlin-kapt'
|
|
|
|
androidExtensions {
|
|
experimental = true
|
|
}
|
|
|
|
static def releaseTime() {
|
|
return new Date().format("yy.MMddHH", TimeZone.getTimeZone("GMT+8"))
|
|
}
|
|
|
|
def name = "legado"
|
|
def version = "0." + releaseTime()
|
|
def gitCommits = Integer.parseInt('git rev-list --count HEAD'.execute([], project.rootDir).text.trim())
|
|
|
|
android {
|
|
compileSdkVersion 28
|
|
signingConfigs {
|
|
myConfig {
|
|
storeFile file(RELEASE_STORE_FILE)
|
|
storePassword RELEASE_STORE_PASSWORD
|
|
keyAlias RELEASE_KEY_ALIAS
|
|
keyPassword RELEASE_KEY_PASSWORD
|
|
v1SigningEnabled true
|
|
v2SigningEnabled true
|
|
}
|
|
}
|
|
defaultConfig {
|
|
applicationId "io.legado.app"
|
|
minSdkVersion 21
|
|
targetSdkVersion 28
|
|
versionCode gitCommits
|
|
versionName version
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
project.ext.set("archivesBaseName", name + "_" + version)
|
|
}
|
|
buildTypes {
|
|
release {
|
|
signingConfig signingConfigs.myConfig
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.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"
|
|
}
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = '1.8'
|
|
targetCompatibility = '1.8'
|
|
}
|
|
|
|
}
|
|
|
|
|
|
kapt {
|
|
arguments {
|
|
arg("room.schemaLocation", "$projectDir/schemas")
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
testImplementation 'junit:junit:4.12'
|
|
androidTestImplementation 'androidx.test:runner:1.2.0'
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
|
//kotlin
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
|
|
//androidX
|
|
implementation 'androidx.core:core-ktx:1.2.0-alpha01'
|
|
implementation 'androidx.appcompat:appcompat:1.1.0-beta01'
|
|
implementation 'androidx.preference:preference:1.1.0-alpha05'
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta1'
|
|
implementation 'com.google.android.material:material:1.1.0-alpha07'
|
|
|
|
//lifecycle
|
|
def lifecycle_version = '2.0.0'
|
|
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
|
|
kapt "androidx.lifecycle:lifecycle-compiler:$lifecycle_version"
|
|
|
|
//room
|
|
def room_version = '2.0.0'
|
|
implementation "androidx.room:room-runtime:$room_version"
|
|
kapt "androidx.room:room-compiler:$room_version"
|
|
|
|
//paging
|
|
implementation 'androidx.paging:paging-runtime:2.1.0'
|
|
|
|
//anko
|
|
def anko_version = '0.10.8'
|
|
implementation "org.jetbrains.anko:anko-sdk27:$anko_version"
|
|
implementation "org.jetbrains.anko:anko-sdk27-listeners:$anko_version"
|
|
|
|
//liveEventBus
|
|
implementation 'com.jeremyliao:live-event-bus-x:1.4.4'
|
|
|
|
//协程
|
|
def coroutines_version = '1.2.1'
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
|
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
|
|
|
|
//规则相关
|
|
implementation 'com.google.code.gson:gson:2.8.5'
|
|
implementation 'org.jsoup:jsoup:1.12.1'
|
|
// implementation 'org.apache.commons:commons-text:1.6'
|
|
// Default json parser for jsonpath
|
|
implementation 'net.minidev:json-smart:2.3'
|
|
// implementation 'com.jayway.jsonpath:json-path:2.4.0'
|
|
|
|
//Retrofit
|
|
implementation 'com.squareup.okhttp3:logging-interceptor:3.14.0'
|
|
implementation 'com.squareup.retrofit2:retrofit:2.6.0'
|
|
|
|
//Glide
|
|
implementation 'com.github.bumptech.glide:glide:4.9.0'
|
|
|
|
//二维码
|
|
implementation 'cn.bingoogolapple:bga-qrcode-zxing:1.3.6'
|
|
|
|
//颜色选择
|
|
implementation 'com.jaredrummler:colorpicker:1.1.0'
|
|
|
|
//对话框
|
|
implementation 'com.afollestad.material-dialogs:core:3.0.0-rc3'
|
|
implementation 'com.afollestad.material-dialogs:input:3.0.0-rc3'
|
|
implementation 'com.afollestad.material-dialogs:files:3.0.0-rc3'
|
|
}
|
|
|