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
|
|
|
}
|
|
|
|
|
2017-05-27 21:05:27 +00:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
|
|
apply plugin: 'kotlin-android'
|
|
|
|
|
2021-01-09 14:01:59 +00:00
|
|
|
apply plugin: 'kotlin-kapt'
|
|
|
|
|
2017-05-27 21:05:27 +00:00
|
|
|
android {
|
2018-05-21 19:39:23 +00:00
|
|
|
compileOptions {
|
2021-11-12 20:31:17 +00:00
|
|
|
// Flag to enable support for the new language APIs
|
|
|
|
coreLibraryDesugaringEnabled true
|
|
|
|
|
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
|
|
|
}
|
2021-10-07 19:01:12 +00:00
|
|
|
compileSdkVersion 31
|
2021-10-26 10:46:30 +00:00
|
|
|
buildToolsVersion '31.0.0'
|
2021-03-17 16:50:44 +00:00
|
|
|
buildFeatures {
|
|
|
|
viewBinding true
|
|
|
|
}
|
2017-05-27 21:05:27 +00:00
|
|
|
defaultConfig {
|
2017-05-28 00:29:42 +00:00
|
|
|
applicationId "apps.amine.bou.readerforselfoss"
|
2021-11-15 20:17:48 +00:00
|
|
|
minSdkVersion 21
|
2021-10-07 19:01:12 +00:00
|
|
|
targetSdkVersion 31
|
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
|
2021-10-07 19:01:27 +00:00
|
|
|
shrinkResources true
|
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 {
|
2021-10-06 11:23:52 +00:00
|
|
|
buildConfigField "String", "LOGIN_URL", appLoginUrl
|
|
|
|
buildConfigField "String", "LOGIN_PASSWORD", appLoginPassword
|
|
|
|
buildConfigField "String", "LOGIN_USERNAME", appLoginUsername
|
2017-06-11 10:04:39 +00:00
|
|
|
}
|
2017-05-27 21:05:27 +00:00
|
|
|
}
|
|
|
|
flavorDimensions "build"
|
|
|
|
productFlavors {
|
|
|
|
githubConfig {
|
|
|
|
versionNameSuffix '-github'
|
|
|
|
dimension "build"
|
|
|
|
}
|
|
|
|
}
|
2021-09-25 11:45:51 +00:00
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = '1.8'
|
|
|
|
}
|
2017-05-27 21:05:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2021-10-28 18:40:22 +00:00
|
|
|
implementation 'androidx.preference:preference-ktx:1.1.1'
|
|
|
|
|
2017-06-11 10:04:39 +00:00
|
|
|
// Testing
|
2021-01-09 14:01:59 +00:00
|
|
|
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0-alpha02'
|
|
|
|
androidTestImplementation 'androidx.test:runner:1.3.1-alpha02'
|
2017-06-11 10:04:39 +00:00
|
|
|
// Espresso-contrib for DatePicker, RecyclerView, Drawer actions, Accessibility checks, CountingIdlingResource
|
2021-01-09 14:01:59 +00:00
|
|
|
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.4.0-alpha02'
|
2017-06-11 10:04:39 +00:00
|
|
|
// Espresso-intents for validation and stubbing of Intents
|
2021-01-09 14:01:59 +00:00
|
|
|
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.4.0-alpha02'
|
2018-08-02 20:04:15 +00:00
|
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
2022-01-16 11:41:17 +00:00
|
|
|
|
2017-05-27 21:05:27 +00:00
|
|
|
// Android Support
|
2022-01-16 11:41:17 +00:00
|
|
|
implementation 'androidx.appcompat:appcompat:1.4.1'
|
|
|
|
implementation 'com.google.android.material:material:1.5.0'
|
2021-10-07 19:01:12 +00:00
|
|
|
implementation 'androidx.recyclerview:recyclerview:1.3.0-alpha01'
|
2018-10-12 18:51:36 +00:00
|
|
|
implementation "androidx.legacy:legacy-support-v4:$android_version"
|
2021-01-09 14:01:59 +00:00
|
|
|
implementation 'androidx.vectordrawable:vectordrawable:1.2.0-alpha02'
|
2022-01-16 11:41:17 +00:00
|
|
|
implementation 'androidx.browser:browser:1.4.0'
|
2018-10-12 18:51:36 +00:00
|
|
|
implementation "androidx.cardview:cardview:$android_version"
|
2022-01-16 11:41:17 +00:00
|
|
|
implementation 'androidx.annotation:annotation:1.3.0'
|
|
|
|
implementation 'androidx.work:work-runtime-ktx:2.7.1'
|
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
2021-10-27 14:47:50 +00:00
|
|
|
implementation 'org.jsoup:jsoup:1.14.3'
|
2017-05-27 21:05:27 +00:00
|
|
|
|
2021-11-12 20:31:17 +00:00
|
|
|
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:1.1.5")
|
|
|
|
|
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
|
2021-10-27 14:47:50 +00:00
|
|
|
implementation 'com.mikepenz:aboutlibraries-core:8.9.4'
|
|
|
|
implementation 'com.mikepenz:aboutlibraries:8.9.4'
|
|
|
|
implementation "com.mikepenz:aboutlibraries-definitions:8.9.4"
|
2017-05-28 00:29:42 +00:00
|
|
|
|
2021-09-25 11:45:51 +00:00
|
|
|
// Async
|
2022-01-16 11:41:17 +00:00
|
|
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0'
|
2021-09-25 11:45:51 +00:00
|
|
|
|
2017-05-28 00:29:42 +00:00
|
|
|
// Retrofit + http logging + okhttp
|
2021-09-25 11:45:51 +00:00
|
|
|
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
|
2022-01-16 11:41:17 +00:00
|
|
|
implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.3'
|
2021-09-25 11:45:51 +00:00
|
|
|
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
|
2021-10-07 19:01:12 +00:00
|
|
|
implementation 'com.burgstaller:okhttp-digest:2.5'
|
2017-05-28 00:29:42 +00:00
|
|
|
|
|
|
|
// Material-ish things
|
2021-10-27 14:47:50 +00:00
|
|
|
implementation 'com.ashokvarma.android:bottom-navigation-bar:2.2.0'
|
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
|
2021-10-22 18:04:28 +00:00
|
|
|
kapt 'com.github.bumptech.glide:compiler:4.11.0'
|
2018-03-27 17:59:34 +00:00
|
|
|
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
|
2022-01-16 11:41:17 +00:00
|
|
|
implementation 'com.mikepenz:materialdrawer:8.4.5'
|
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'
|
2021-10-28 18:40:22 +00:00
|
|
|
implementation 'com.jaredrummler:colorpicker:1.1.0'
|
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
|
2021-10-27 14:47:50 +00:00
|
|
|
implementation 'me.relex:circleindicator:2.1.6'
|
2021-12-13 19:29:38 +00:00
|
|
|
implementation "androidx.viewpager2:viewpager2:1.1.0-beta01"
|
2017-12-10 19:00:09 +00:00
|
|
|
|
2020-12-22 19:06:38 +00:00
|
|
|
//PhotoView
|
2021-10-27 14:47:50 +00:00
|
|
|
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
|
2020-12-22 19:06:38 +00:00
|
|
|
|
2022-01-16 11:41:17 +00:00
|
|
|
implementation 'androidx.core:core-ktx:1.7.0'
|
2018-02-07 20:16:51 +00:00
|
|
|
|
2022-01-16 11:41:17 +00:00
|
|
|
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.0'
|
|
|
|
implementation 'androidx.lifecycle:lifecycle-common-java8:2.4.0'
|
2018-10-12 20:04:47 +00:00
|
|
|
|
2021-10-26 10:46:30 +00:00
|
|
|
implementation "androidx.room:room-ktx:2.4.0-beta01"
|
|
|
|
kapt "androidx.room:room-compiler:2.4.0-beta01"
|
2018-11-01 20:51:31 +00:00
|
|
|
|
|
|
|
implementation "android.arch.work:work-runtime-ktx:$work_version"
|
2020-12-22 17:02:03 +00:00
|
|
|
}
|