ReaderforSelfoss/app/build.gradle

165 lines
5.5 KiB
Groovy
Raw Normal View History

buildscript {
}
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()
}
return process.text.replaceAll("'", "").substring(1).replaceAll("\\.", "").trim()
}
def versionCodeFromGit() {
println "version code " + gitVersion()
return gitVersion().toInteger()
}
def versionNameFromGit() {
println "version name " + gitVersion()
return gitVersion()
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
2021-01-09 14:01:59 +00:00
apply plugin: 'kotlin-kapt'
android {
2018-05-21 19:39:23 +00:00
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
2018-05-21 19:39:23 +00:00
}
compileSdkVersion 31
2021-01-09 14:01:59 +00:00
buildToolsVersion '30.0.3'
2021-03-17 16:50:44 +00:00
buildFeatures {
viewBinding true
}
defaultConfig {
applicationId "apps.amine.bou.readerforselfoss"
minSdkVersion 16
targetSdkVersion 31
versionCode versionCodeFromGit()
versionName versionNameFromGit()
// 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"
javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation":
"$projectDir/schemas".toString()]
}
}
}
buildTypes {
release {
2017-09-10 07:19:28 +00:00
minifyEnabled true
2021-10-07 19:01:27 +00:00
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
2017-06-11 10:04:39 +00:00
debug {
buildConfigField "String", "LOGIN_URL", appLoginUrl
buildConfigField "String", "LOGIN_PASSWORD", appLoginPassword
buildConfigField "String", "LOGIN_USERNAME", appLoginUsername
2017-06-11 10:04:39 +00:00
}
}
flavorDimensions "build"
productFlavors {
githubConfig {
versionNameSuffix '-github'
dimension "build"
}
}
Migration of Item management to SharedItems (#345) * Refactor Item addition and deletion * Metods to filter the items according to read and starred status * Remove displayed items only if displaying unread items * Remove unnecessary api calls on tab change and delegate item storage to SharedItems * Store articles in SharedItems when they get fetched * Add tag filtering * Mark items as read * Disable sorting function * Add function to get the unread status of an element. * Fetch items on pull gesture * Move marking as read logic in SharedItems. * Delegate item status to SharedItems * Allow changing unread status of items * Use full article position reference and not the relative one * Delegate marking items as unread to SharedItems * Delegate database addition of Items to SharedItems. * Function to only provide connectivity information * Better database management * Sort items by date * Provide information about item caching to SharedItems * Add missing imports * Update database after fetching articles * Add missing variable * Remove unused import * Use coroutines to access database * Use coroutines to simultaneously fetch articles. * Update database after fetching articles. * Don't block thread when accessing the database * Prevent crash if connectivity is lost while fetching articles * Show "Not connected" snackbar if there is no connection or connection is lost during download * Use coroutines in the background sync * Added function to get only new items * Introduced function to filter articles * Don't execute background sync if the option is disabled * Improve item filtering * Apply filters when they are selected on the UI * Handle infinite scroll * Incorrect parameters were passed * Simplify tab selection logic * Upgrade kotlin jvm to version 1.8 * On tab change fetch new items if the item list is not completely populated * Remove redundant assignations. * Fetch articles when changing tag, source or search if the list is not fully populated * Fetch only the article in the tab selected * Correct inconsistent position address * Disable swiping articles only if favorites are selected * Delegate badge count to SharedItems * Clear the database when the app starts in order to avoid accumulation and inconsistencies * Remove unused functions and variables * Do not overwrite fetched items with old copies from the database * Display "There's nothing here" only if there are no articles * Adapt function to read all articles to the new changes * Use IO Dispatcher for Database and Network computations * Adapt Background sync to the usage of SharedItems * Handle refresh gesture appropriately by refreshing the whole items list * Remove unused imports
2021-09-25 11:45:51 +00:00
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
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'
implementation fileTree(include: ['*.jar'], dir: 'libs')
2018-03-27 17:59:34 +00:00
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
// Android Support
implementation "androidx.appcompat:appcompat:1.4.0-beta01"
implementation 'com.google.android.material:material:1.5.0-alpha04'
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'
implementation "androidx.browser:browser:1.3.0"
2018-10-12 18:51:36 +00:00
implementation "androidx.cardview:cardview:$android_version"
implementation "androidx.annotation:annotation:1.2.0"
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
2020-12-22 17:02:03 +00:00
implementation 'org.jsoup:jsoup:1.13.1'
//multidex
2019-01-13 14:58:25 +00:00
implementation 'androidx.multidex:multidex:2.0.1'
// About
implementation('com.mikepenz:aboutlibraries:6.2.0@aar') {
transitive = true
}
Migration of Item management to SharedItems (#345) * Refactor Item addition and deletion * Metods to filter the items according to read and starred status * Remove displayed items only if displaying unread items * Remove unnecessary api calls on tab change and delegate item storage to SharedItems * Store articles in SharedItems when they get fetched * Add tag filtering * Mark items as read * Disable sorting function * Add function to get the unread status of an element. * Fetch items on pull gesture * Move marking as read logic in SharedItems. * Delegate item status to SharedItems * Allow changing unread status of items * Use full article position reference and not the relative one * Delegate marking items as unread to SharedItems * Delegate database addition of Items to SharedItems. * Function to only provide connectivity information * Better database management * Sort items by date * Provide information about item caching to SharedItems * Add missing imports * Update database after fetching articles * Add missing variable * Remove unused import * Use coroutines to access database * Use coroutines to simultaneously fetch articles. * Update database after fetching articles. * Don't block thread when accessing the database * Prevent crash if connectivity is lost while fetching articles * Show "Not connected" snackbar if there is no connection or connection is lost during download * Use coroutines in the background sync * Added function to get only new items * Introduced function to filter articles * Don't execute background sync if the option is disabled * Improve item filtering * Apply filters when they are selected on the UI * Handle infinite scroll * Incorrect parameters were passed * Simplify tab selection logic * Upgrade kotlin jvm to version 1.8 * On tab change fetch new items if the item list is not completely populated * Remove redundant assignations. * Fetch articles when changing tag, source or search if the list is not fully populated * Fetch only the article in the tab selected * Correct inconsistent position address * Disable swiping articles only if favorites are selected * Delegate badge count to SharedItems * Clear the database when the app starts in order to avoid accumulation and inconsistencies * Remove unused functions and variables * Do not overwrite fetched items with old copies from the database * Display "There's nothing here" only if there are no articles * Adapt function to read all articles to the new changes * Use IO Dispatcher for Database and Network computations * Adapt Background sync to the usage of SharedItems * Handle refresh gesture appropriately by refreshing the whole items list * Remove unused imports
2021-09-25 11:45:51 +00:00
// Async
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0'
Migration of Item management to SharedItems (#345) * Refactor Item addition and deletion * Metods to filter the items according to read and starred status * Remove displayed items only if displaying unread items * Remove unnecessary api calls on tab change and delegate item storage to SharedItems * Store articles in SharedItems when they get fetched * Add tag filtering * Mark items as read * Disable sorting function * Add function to get the unread status of an element. * Fetch items on pull gesture * Move marking as read logic in SharedItems. * Delegate item status to SharedItems * Allow changing unread status of items * Use full article position reference and not the relative one * Delegate marking items as unread to SharedItems * Delegate database addition of Items to SharedItems. * Function to only provide connectivity information * Better database management * Sort items by date * Provide information about item caching to SharedItems * Add missing imports * Update database after fetching articles * Add missing variable * Remove unused import * Use coroutines to access database * Use coroutines to simultaneously fetch articles. * Update database after fetching articles. * Don't block thread when accessing the database * Prevent crash if connectivity is lost while fetching articles * Show "Not connected" snackbar if there is no connection or connection is lost during download * Use coroutines in the background sync * Added function to get only new items * Introduced function to filter articles * Don't execute background sync if the option is disabled * Improve item filtering * Apply filters when they are selected on the UI * Handle infinite scroll * Incorrect parameters were passed * Simplify tab selection logic * Upgrade kotlin jvm to version 1.8 * On tab change fetch new items if the item list is not completely populated * Remove redundant assignations. * Fetch articles when changing tag, source or search if the list is not fully populated * Fetch only the article in the tab selected * Correct inconsistent position address * Disable swiping articles only if favorites are selected * Delegate badge count to SharedItems * Clear the database when the app starts in order to avoid accumulation and inconsistencies * Remove unused functions and variables * Do not overwrite fetched items with old copies from the database * Display "There's nothing here" only if there are no articles * Adapt function to read all articles to the new changes * Use IO Dispatcher for Database and Network computations * Adapt Background sync to the usage of SharedItems * Handle refresh gesture appropriately by refreshing the whole items list * Remove unused imports
2021-09-25 11:45:51 +00:00
// Retrofit + http logging + okhttp
Migration of Item management to SharedItems (#345) * Refactor Item addition and deletion * Metods to filter the items according to read and starred status * Remove displayed items only if displaying unread items * Remove unnecessary api calls on tab change and delegate item storage to SharedItems * Store articles in SharedItems when they get fetched * Add tag filtering * Mark items as read * Disable sorting function * Add function to get the unread status of an element. * Fetch items on pull gesture * Move marking as read logic in SharedItems. * Delegate item status to SharedItems * Allow changing unread status of items * Use full article position reference and not the relative one * Delegate marking items as unread to SharedItems * Delegate database addition of Items to SharedItems. * Function to only provide connectivity information * Better database management * Sort items by date * Provide information about item caching to SharedItems * Add missing imports * Update database after fetching articles * Add missing variable * Remove unused import * Use coroutines to access database * Use coroutines to simultaneously fetch articles. * Update database after fetching articles. * Don't block thread when accessing the database * Prevent crash if connectivity is lost while fetching articles * Show "Not connected" snackbar if there is no connection or connection is lost during download * Use coroutines in the background sync * Added function to get only new items * Introduced function to filter articles * Don't execute background sync if the option is disabled * Improve item filtering * Apply filters when they are selected on the UI * Handle infinite scroll * Incorrect parameters were passed * Simplify tab selection logic * Upgrade kotlin jvm to version 1.8 * On tab change fetch new items if the item list is not completely populated * Remove redundant assignations. * Fetch articles when changing tag, source or search if the list is not fully populated * Fetch only the article in the tab selected * Correct inconsistent position address * Disable swiping articles only if favorites are selected * Delegate badge count to SharedItems * Clear the database when the app starts in order to avoid accumulation and inconsistencies * Remove unused functions and variables * Do not overwrite fetched items with old copies from the database * Display "There's nothing here" only if there are no articles * Adapt function to read all articles to the new changes * Use IO Dispatcher for Database and Network computations * Adapt Background sync to the usage of SharedItems * Handle refresh gesture appropriately by refreshing the whole items list * Remove unused imports
2021-09-25 11:45:51 +00:00
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1'
Migration of Item management to SharedItems (#345) * Refactor Item addition and deletion * Metods to filter the items according to read and starred status * Remove displayed items only if displaying unread items * Remove unnecessary api calls on tab change and delegate item storage to SharedItems * Store articles in SharedItems when they get fetched * Add tag filtering * Mark items as read * Disable sorting function * Add function to get the unread status of an element. * Fetch items on pull gesture * Move marking as read logic in SharedItems. * Delegate item status to SharedItems * Allow changing unread status of items * Use full article position reference and not the relative one * Delegate marking items as unread to SharedItems * Delegate database addition of Items to SharedItems. * Function to only provide connectivity information * Better database management * Sort items by date * Provide information about item caching to SharedItems * Add missing imports * Update database after fetching articles * Add missing variable * Remove unused import * Use coroutines to access database * Use coroutines to simultaneously fetch articles. * Update database after fetching articles. * Don't block thread when accessing the database * Prevent crash if connectivity is lost while fetching articles * Show "Not connected" snackbar if there is no connection or connection is lost during download * Use coroutines in the background sync * Added function to get only new items * Introduced function to filter articles * Don't execute background sync if the option is disabled * Improve item filtering * Apply filters when they are selected on the UI * Handle infinite scroll * Incorrect parameters were passed * Simplify tab selection logic * Upgrade kotlin jvm to version 1.8 * On tab change fetch new items if the item list is not completely populated * Remove redundant assignations. * Fetch articles when changing tag, source or search if the list is not fully populated * Fetch only the article in the tab selected * Correct inconsistent position address * Disable swiping articles only if favorites are selected * Delegate badge count to SharedItems * Clear the database when the app starts in order to avoid accumulation and inconsistencies * Remove unused functions and variables * Do not overwrite fetched items with old copies from the database * Display "There's nothing here" only if there are no articles * Adapt function to read all articles to the new changes * Use IO Dispatcher for Database and Network computations * Adapt Background sync to the usage of SharedItems * Handle refresh gesture appropriately by refreshing the whole items list * Remove unused imports
2021-09-25 11:45:51 +00:00
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.burgstaller:okhttp-digest:2.5'
// Material-ish things
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'
// 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-06-04 14:09:42 +00:00
// Drawer
implementation 'com.mikepenz:materialdrawer:8.4.4'
2017-06-04 14:09:42 +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
//PhotoView
implementation 'com.github.chrisbanes:PhotoView:2.0.0'
implementation 'androidx.core:core-ktx:1.7.0-beta02'
2018-02-07 20:16:51 +00:00
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.4.0-rc01"
implementation "androidx.lifecycle:lifecycle-common-java8:2.4.0-rc01"
2018-10-12 20:04:47 +00:00
implementation "androidx.room:room-ktx:2.4.0-alpha05"
kapt "androidx.room:room-compiler:2.4.0-alpha05"
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
}