2017-05-27 21:05:27 +00:00
|
|
|
buildscript {
|
|
|
|
}
|
|
|
|
|
2017-07-28 08:07:12 +00:00
|
|
|
def gitVersion() {
|
2018-12-02 12:13:19 +00:00
|
|
|
def process
|
|
|
|
def maybeTagOfCurrentCommit = 'git describe --contains HEAD'.execute()
|
|
|
|
if (maybeTagOfCurrentCommit.text.isEmpty()) {
|
|
|
|
println "No tag on current commit. Will take the latest one."
|
|
|
|
process = "git for-each-ref refs/tags --sort=-authordate --format='%(refname:short)' --count=1".execute()
|
|
|
|
} else {
|
|
|
|
println "Tag found on current commit"
|
|
|
|
process = 'git describe --contains HEAD'.execute()
|
|
|
|
}
|
2018-11-15 20:11:15 +00:00
|
|
|
return process.text.replaceAll("'", "").substring(1).replaceAll("\\.", "").trim()
|
2017-07-28 08:07:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
def versionCodeFromGit() {
|
2018-05-24 20:32:34 +00:00
|
|
|
println "version code " + gitVersion()
|
|
|
|
return gitVersion().toInteger()
|
2017-07-28 08:07:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
def versionNameFromGit() {
|
2018-05-24 20:32:34 +00:00
|
|
|
println "version name " + gitVersion()
|
|
|
|
return gitVersion()
|
2017-07-28 08:07:12 +00:00
|
|
|
}
|
|
|
|
|
2018-10-12 20:04:47 +00:00
|
|
|
apply plugin: 'kotlin-kapt'
|
|
|
|
|
2017-05-27 21:05:27 +00:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
|
|
apply plugin: 'kotlin-android'
|
|
|
|
|
2017-11-12 16:05:36 +00:00
|
|
|
apply plugin: 'kotlin-android-extensions'
|
|
|
|
|
2017-05-27 21:05:27 +00:00
|
|
|
android {
|
2018-05-21 19:39:23 +00:00
|
|
|
compileOptions {
|
2018-08-02 20:04:15 +00:00
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
2018-05-21 19:39:23 +00:00
|
|
|
}
|
2018-08-02 20:04:15 +00:00
|
|
|
compileSdkVersion 28
|
2018-10-12 18:36:18 +00:00
|
|
|
buildToolsVersion '28.0.3'
|
2017-05-27 21:05:27 +00:00
|
|
|
defaultConfig {
|
2017-05-28 00:29:42 +00:00
|
|
|
applicationId "apps.amine.bou.readerforselfoss"
|
2017-05-27 21:05:27 +00:00
|
|
|
minSdkVersion 16
|
2018-09-09 17:44:01 +00:00
|
|
|
targetSdkVersion 28
|
2017-07-28 08:07:12 +00:00
|
|
|
versionCode versionCodeFromGit()
|
|
|
|
versionName versionNameFromGit()
|
2017-05-27 21:05:27 +00:00
|
|
|
|
|
|
|
// Enabling multidex support.
|
|
|
|
multiDexEnabled true
|
|
|
|
lintOptions {
|
|
|
|
abortOnError true
|
|
|
|
disable 'InvalidPackage'
|
|
|
|
}
|
|
|
|
vectorDrawables.useSupportLibrary = true
|
2017-06-11 10:04:39 +00:00
|
|
|
|
|
|
|
// tests
|
2018-10-12 18:36:18 +00:00
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
2018-10-14 09:07:10 +00:00
|
|
|
|
|
|
|
javaCompileOptions {
|
|
|
|
annotationProcessorOptions {
|
|
|
|
arguments = ["room.schemaLocation":
|
|
|
|
"$projectDir/schemas".toString()]
|
|
|
|
}
|
|
|
|
}
|
2017-05-27 21:05:27 +00:00
|
|
|
}
|
|
|
|
buildTypes {
|
|
|
|
release {
|
2017-09-10 07:19:28 +00:00
|
|
|
minifyEnabled true
|
2019-01-09 12:33:02 +00:00
|
|
|
shrinkResources false
|
2017-05-27 21:05:27 +00:00
|
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'),
|
|
|
|
'proguard-rules.pro'
|
|
|
|
}
|
2017-06-11 10:04:39 +00:00
|
|
|
debug {
|
|
|
|
}
|
2017-05-27 21:05:27 +00:00
|
|
|
}
|
|
|
|
flavorDimensions "build"
|
|
|
|
productFlavors {
|
|
|
|
githubConfig {
|
|
|
|
versionNameSuffix '-github'
|
|
|
|
dimension "build"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2017-06-11 10:04:39 +00:00
|
|
|
// Testing
|
2019-05-12 19:17:45 +00:00
|
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0-beta01'
|
|
|
|
androidTestImplementation 'androidx.test:runner:1.2.0-beta01'
|
2017-06-11 10:04:39 +00:00
|
|
|
// Espresso-contrib for DatePicker, RecyclerView, Drawer actions, Accessibility checks, CountingIdlingResource
|
2019-05-12 19:17:45 +00:00
|
|
|
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.2.0-beta01'
|
2017-06-11 10:04:39 +00:00
|
|
|
// Espresso-intents for validation and stubbing of Intents
|
2019-05-12 19:17:45 +00:00
|
|
|
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0-beta01'
|
2018-08-02 20:04:15 +00:00
|
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
2018-03-27 17:59:34 +00:00
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
2017-05-27 21:05:27 +00:00
|
|
|
// Android Support
|
2019-04-06 10:42:25 +00:00
|
|
|
implementation "androidx.appcompat:appcompat:$androidx_version"
|
2019-05-12 19:17:45 +00:00
|
|
|
implementation "com.google.android.material:material:1.1.0-alpha06"
|
|
|
|
implementation "androidx.recyclerview:recyclerview:1.1.0-alpha05"
|
2018-10-12 18:51:36 +00:00
|
|
|
implementation "androidx.legacy:legacy-support-v4:$android_version"
|
2019-05-12 19:17:45 +00:00
|
|
|
implementation "androidx.vectordrawable:vectordrawable:1.1.0-beta01"
|
2018-10-12 18:51:36 +00:00
|
|
|
implementation "androidx.browser:browser:$android_version"
|
|
|
|
implementation "androidx.cardview:cardview:$android_version"
|
2019-05-12 19:17:45 +00:00
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha5'
|
2020-12-14 14:29:54 +00:00
|
|
|
implementation 'org.jsoup:jsoup:1.13.1'
|
2017-05-27 21:05:27 +00:00
|
|
|
|
|
|
|
//multidex
|
2019-01-13 14:58:25 +00:00
|
|
|
implementation 'androidx.multidex:multidex:2.0.1'
|
2017-05-28 00:29:42 +00:00
|
|
|
|
|
|
|
// About
|
2019-05-17 18:28:21 +00:00
|
|
|
implementation('com.mikepenz:aboutlibraries:6.2.0@aar') {
|
2017-05-28 00:29:42 +00:00
|
|
|
transitive = true
|
|
|
|
}
|
|
|
|
|
|
|
|
// Retrofit + http logging + okhttp
|
2018-03-27 17:59:34 +00:00
|
|
|
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
|
|
|
|
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.0'
|
|
|
|
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
|
|
|
|
implementation 'com.burgstaller:okhttp-digest:1.12'
|
2017-05-28 00:29:42 +00:00
|
|
|
|
|
|
|
// Material-ish things
|
2019-05-12 19:07:05 +00:00
|
|
|
implementation 'com.ashokvarma.android:bottom-navigation-bar:2.1.0'
|
2018-10-12 18:51:36 +00:00
|
|
|
implementation 'com.github.jd-alexander:LikeButton:0.2.3'
|
2018-03-27 17:59:34 +00:00
|
|
|
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
|
2017-05-28 00:29:42 +00:00
|
|
|
|
|
|
|
// glide
|
2018-03-27 17:59:34 +00:00
|
|
|
implementation 'com.github.bumptech.glide:glide:4.1.1'
|
|
|
|
implementation 'com.github.bumptech.glide:okhttp3-integration:4.1.1'
|
2017-05-28 00:29:42 +00:00
|
|
|
|
2017-06-04 14:09:42 +00:00
|
|
|
// Drawer
|
2019-05-17 18:28:21 +00:00
|
|
|
implementation 'co.zsmb:materialdrawer-kt:2.0.2'
|
2017-06-04 14:09:42 +00:00
|
|
|
|
2017-07-02 15:12:02 +00:00
|
|
|
// Themes
|
2018-03-27 17:59:34 +00:00
|
|
|
implementation 'com.52inc:scoops:1.0.0'
|
2019-05-12 19:42:56 +00:00
|
|
|
implementation 'com.jaredrummler:colorpicker:1.0.2'
|
2018-03-27 17:59:34 +00:00
|
|
|
implementation 'com.github.rubensousa:floatingtoolbar:1.5.1'
|
2017-12-03 21:09:58 +00:00
|
|
|
|
|
|
|
// Pager
|
2018-10-12 18:51:36 +00:00
|
|
|
implementation 'me.relex:circleindicator:2.0.0@aar'
|
2017-12-10 19:00:09 +00:00
|
|
|
|
2020-12-21 23:44:19 +00:00
|
|
|
//PhotoView
|
|
|
|
implementation 'com.github.chrisbanes:PhotoView:2.0.0'
|
|
|
|
|
2019-05-12 19:07:05 +00:00
|
|
|
implementation 'androidx.core:core-ktx:1.1.0-beta01'
|
2018-02-07 20:16:51 +00:00
|
|
|
|
2018-10-12 20:04:47 +00:00
|
|
|
implementation "androidx.lifecycle:lifecycle-livedata:$lifecycle_version"
|
|
|
|
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
|
|
|
|
|
|
|
|
implementation "androidx.room:room-runtime:$room_version"
|
|
|
|
kapt "androidx.room:room-compiler:$room_version"
|
2018-11-01 20:51:31 +00:00
|
|
|
|
|
|
|
implementation "android.arch.work:work-runtime-ktx:$work_version"
|
2019-04-06 10:42:25 +00:00
|
|
|
}
|