Commit 20ef5333 authored by Christophe Henry's avatar Christophe Henry

Update changelog

Also:
- drop Kovenant dependancy
- bumb gradle plugin to 3.6.1
- remove priviledged mode from Docker image in Jenkinsfile
parent 4103e655
Pipeline #3713 passed with stage
in 0 seconds
......@@ -18,6 +18,8 @@
## Refactoring
* Refactor the waiting fragment to lighten the interface ([!62](https://git.feneas.org/christophehenry/freshrss-android/merge_requests/62/))
* Fix [#81](https://git.feneas.org/christophehenry/freshrss-android/issues/81): Refresh mechanism doesn't work properly ([#80](https://git.feneas.org/christophehenry/freshrss-android/merge_requests/80))
* Drop Fuel & Kovenant [#77](https://git.feneas.org/christophehenry/freshrss-android/issues/77) in favor of native Kotlin coroutines and Retrofit ([79!](https://git.feneas.org/christophehenry/freshrss-android/merge_requests/79) & [!80](https://git.feneas.org/christophehenry/freshrss-android/merge_requests/80))
# 1.2.2
......
......@@ -121,6 +121,7 @@ pipeline {
}
}
// stage("Build APK") {
// steps {
// withAvd(hardwareProfile: "Nexus 5X", systemImage: env.MIN_SDK_IMAGE, headless: true) {
......@@ -130,4 +131,10 @@ pipeline {
// }
// }
}
post {
always {
sh "chown jenkins: ${env.WORKSPACE}"
}
}
}
\ No newline at end of file
......@@ -167,8 +167,6 @@ dependencies {
// HTTP and promises
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
implementation "nl.komponents.kovenant:kovenant:$promise_version"
implementation "nl.komponents.kovenant:kovenant-android:$promise_version"
implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:converter-jackson:$retrofit_version"
implementation "com.squareup.retrofit2:converter-scalars:$retrofit_version"
......
......@@ -14,8 +14,6 @@ import fr.chenry.android.freshrss.store.database.FreshRSSDabatabase_Migrations
import fr.chenry.android.freshrss.utils.NotificationChannels
import fr.chenry.android.freshrss.utils.unit
import kotlinx.coroutines.*
import nl.komponents.kovenant.android.startKovenant
import nl.komponents.kovenant.android.stopKovenant
import org.acra.ACRA
import org.acra.annotation.*
import org.acra.data.StringFormat
......@@ -45,7 +43,7 @@ open class FreshRSSApplication: Application(), SharedPreferences.OnSharedPrefere
open val workManager by lazy {WorkManager.getInstance(this)}
open val notificationManager: NotificationManagerCompat by lazy {NotificationManagerCompat.from(this)}
open protected val dbName by lazy {"${getString(R.string.app_name).toLowerCase(Locale.ENGLISH)}.db"}
protected open val dbName by lazy {"${getString(R.string.app_name).toLowerCase(Locale.ENGLISH)}.db"}
val db by lazy {
Room.databaseBuilder(context, FreshRSSDabatabase::class.java, dbName)
......@@ -60,7 +58,6 @@ open class FreshRSSApplication: Application(), SharedPreferences.OnSharedPrefere
override fun onCreate() {
super.onCreate()
startKovenant()
// Stupid hack because Android is still not able to provide the current
// application globally even though it's an actual a singleton...
appInstance = this
......@@ -71,11 +68,6 @@ open class FreshRSSApplication: Application(), SharedPreferences.OnSharedPrefere
//Stetho.initializeWithDefaults(this)
}
override fun onTerminate() {
super.onTerminate()
stopKovenant()
}
override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences, key: String) {
if(key == preferences.refreshFrequencyKey) enqueuePeriodicRequest()
}
......
......@@ -24,6 +24,7 @@ class ContentItemsDeserializer: JsonDeserializer<ContentItems>() {
}
}.getOrDefault(listOf())
}
class MicroSecTimestampDeserializer: LocalDateTimeDeserializer() {
override fun deserialize(p: JsonParser, ctxt: DeserializationContext): LocalDateTime {
val tz = if(_format.isTimezoneExplicit) _format.timeZone else DateTimeZone.forTimeZone(ctxt.timeZone)
......@@ -71,11 +72,14 @@ object SubscriptionApiItemsConverter: Converter<ResponseBody, List<SubscriptionA
object UnreadItemIdsConverter: Converter<ResponseBody, List<String>> {
override fun convert(value: ResponseBody): List<String> = runCatching {
value.use {
val jsonArray: JSONArray? = JSONObject(value.string()).optJSONArray("itemRefs")
val jsonArray: JSONArray? = JSONObject(value.string()).optJSONArray("itemRefs")
jsonArray?.let {array ->
(0 until array.length()).mapNotNull {
runCatching {
val id = jsonArray.optJSONObject(it).optString("id")
// Ids returned by this endpoint are in long form.
// They must be converted in hex (short form) before being used.
// See https://feedhq.readthedocs.io/en/latest/api/terminology.html#items
"${Article.ARTICLE_ID_PREFIX}${id!!.toLong().toString(16).padStart(id.length, '0')}"
}.getOrNull()
}
......
......@@ -10,7 +10,6 @@ import androidx.navigation.NavController
import androidx.work.WorkManager
import fr.chenry.android.freshrss.FreshRSSApplication
import fr.chenry.android.freshrss.RefreshWorker
import nl.komponents.kovenant.Deferred
import org.apache.commons.text.StringEscapeUtils
import org.joda.time.DateTimeZone
import java.net.URL
......@@ -75,5 +74,3 @@ fun Fragment.requireF() = this.requireActivity().application as FreshRSSApplicat
fun WorkManager.getRefreshWork() = this.getWorkInfosByTagLiveData(RefreshWorker.REFRESH_WORK_TAG)
fun WorkManager.getUniqueRefreshWork() = this.getWorkInfosForUniqueWorkLiveData(RefreshWorker.ONE_TIME_WORK_NAME)
fun WorkManager.getPreriodicRefreshWork() = this.getWorkInfosForUniqueWorkLiveData(RefreshWorker.PERIODIC_WORK_NAME)
fun <E> Deferred<Unit, E>.resolveUnit() = this.resolve(Unit)
......@@ -9,7 +9,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.0'
classpath 'com.android.tools.build:gradle:3.6.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "android.arch.navigation:navigation-safe-args-gradle-plugin:1.0.0"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment