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.
legado/app/build.gradle

154 lines
4.8 KiB

6 years ago
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
6 years ago
apply plugin: 'kotlin-kapt'
5 years ago
apply plugin: "de.timfreiheit.resourceplaceholders"
6 years ago
6 years ago
androidExtensions {
experimental = true
}
6 years ago
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())
6 years ago
android {
compileSdkVersion 28
6 years ago
signingConfigs {
myConfig {
storeFile file(RELEASE_STORE_FILE)
6 years ago
storePassword RELEASE_STORE_PASSWORD
6 years ago
keyAlias RELEASE_KEY_ALIAS
6 years ago
keyPassword RELEASE_KEY_PASSWORD
v1SigningEnabled true
v2SigningEnabled true
6 years ago
}
}
6 years ago
defaultConfig {
6 years ago
applicationId "io.legado.app"
6 years ago
minSdkVersion 21
targetSdkVersion 28
6 years ago
versionCode gitCommits
versionName version
6 years ago
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
6 years ago
project.ext.set("archivesBaseName", name + "_" + version)
6 years ago
}
buildTypes {
release {
6 years ago
signingConfig signingConfigs.myConfig
6 years ago
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
6 years ago
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"
}
}
6 years ago
}
6 years ago
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
5 years ago
kotlinOptions {
jvmTarget = "1.8"
}
6 years ago
}
5 years ago
resourcePlaceholders {
files = ['xml/shortcuts.xml']
}
6 years ago
kapt {
arguments {
arg("room.schemaLocation", "$projectDir/schemas")
}
6 years ago
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
6 years ago
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
//kotlin
6 years ago
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
6 years ago
6 years ago
//androidX
5 years ago
implementation 'androidx.core:core-ktx:1.2.0-beta01'
5 years ago
implementation 'androidx.appcompat:appcompat:1.1.0'
5 years ago
implementation 'androidx.media:media:1.1.0'
5 years ago
implementation 'androidx.preference:preference:1.1.0'
5 years ago
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
5 years ago
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0'
5 years ago
implementation 'androidx.viewpager2:viewpager2:1.0.0-beta05'
5 years ago
implementation 'com.google.android.material:material:1.1.0-beta01'
6 years ago
implementation 'com.google.android:flexbox:1.1.0'
6 years ago
6 years ago
//lifecycle
5 years ago
def lifecycle_version = '2.1.0'
6 years ago
implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
5 years ago
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
6 years ago
6 years ago
//room
5 years ago
def room_version = '2.2.0'
6 years ago
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
6 years ago
//paging
6 years ago
implementation 'androidx.paging:paging-runtime:2.1.0'
//anko
6 years ago
def anko_version = '0.10.8'
implementation "org.jetbrains.anko:anko-sdk27:$anko_version"
implementation "org.jetbrains.anko:anko-sdk27-listeners:$anko_version"
6 years ago
6 years ago
//liveEventBus
5 years ago
implementation 'com.jeremyliao:live-event-bus-x:1.4.5'
6 years ago
//协程
5 years ago
def coroutines_version = '1.2.2'
6 years ago
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'
6 years ago
implementation 'cn.wanghaomiao:JsoupXpath:2.3.2'
5 years ago
implementation 'com.jayway.jsonpath:json-path:2.4.0'
6 years ago
//JS
implementation 'com.github.gedoor:rhino-android:1.3'
//Retrofit
5 years ago
implementation 'com.squareup.okhttp3:logging-interceptor:4.1.0'
implementation 'com.squareup.retrofit2:retrofit:2.6.1'
6 years ago
//Glide
6 years ago
implementation 'com.github.bumptech.glide:glide:4.9.0'
6 years ago
5 years ago
//webServer
implementation 'org.nanohttpd:nanohttpd:2.3.1'
implementation 'org.nanohttpd:nanohttpd-websocket:2.3.1'
6 years ago
//二维码
implementation 'cn.bingoogolapple:bga-qrcode-zxing:1.3.6'
6 years ago
//颜色选择
implementation 'com.jaredrummler:colorpicker:1.1.0'
5 years ago
5 years ago
implementation 'org.apache.commons:commons-lang3:3.9'
implementation 'org.apache.commons:commons-text:1.8'
}