diff --git a/app/detekt_baseline.xml b/app/detekt_baseline.xml
index 0b71972bd..b52cda4f5 100644
--- a/app/detekt_baseline.xml
+++ b/app/detekt_baseline.xml
@@ -7,6 +7,7 @@
EmptyFunctionBlock:ZimHostActivity.kt$ZimHostActivity.<no name provided>${}
ForbiddenComment:KiwixReaderFragment.kt$KiwixReaderFragment$// TODO: Show to user
LongParameterList:ZimManageViewModel.kt$ZimManageViewModel$( booksOnFileSystem: List<BookOnDisk>, activeDownloads: List<DownloadModel>, allLanguages: List<Language>, libraryNetworkEntity: LibraryNetworkEntity, filter: String, fileSystemState: FileSystemState )
+ LongParameterList:ZimManageViewModel.kt$ZimManageViewModel$( private val downloadDao: FetchDownloadDao, private val bookDao: NewBookDao, private val languageDao: NewLanguagesDao, private val storageObserver: StorageObserver, private val kiwixService: KiwixService, private val context: Application, private val connectivityBroadcastReceiver: ConnectivityBroadcastReceiver, private val bookUtils: BookUtils, private val fat32Checker: Fat32Checker, private val defaultLanguageProvider: DefaultLanguageProvider, private val dataSource: DataSource )
MagicNumber:LibraryListItem.kt$LibraryListItem.LibraryDownloadItem$1000L
MagicNumber:ShareFiles.kt$ShareFiles$24
MagicNumber:ZimManageViewModel.kt$ZimManageViewModel$5
diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts
index de3e9fa56..d0297337d 100644
--- a/buildSrc/build.gradle.kts
+++ b/buildSrc/build.gradle.kts
@@ -16,7 +16,7 @@ dependencies {
implementation("com.hiya:jacoco-android:0.2")
implementation("org.jlleitschuh.gradle:ktlint-gradle:9.2.1")
implementation("com.google.apis:google-api-services-androidpublisher:v3-rev129-1.25.0")
- implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.5.1")
+ implementation("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.9.1")
implementation(gradleApi())
implementation(localGroovy())
diff --git a/buildSrc/src/main/kotlin/Versions.kt b/buildSrc/src/main/kotlin/Versions.kt
index 31067a7e0..80dc3f3aa 100644
--- a/buildSrc/src/main/kotlin/Versions.kt
+++ b/buildSrc/src/main/kotlin/Versions.kt
@@ -12,9 +12,9 @@ import org.gradle.plugin.use.PluginDependencySpec
* YOU are responsible for updating manually the dependency version.
*/
object Versions {
- const val androidx_test_espresso: String = "3.1.1" // available: "3.2.0"
+ const val androidx_test_espresso: String = "3.2.0"
- const val com_squareup_retrofit2: String = "2.5.0" // available: "2.9.0"
+ const val com_squareup_retrofit2: String = "2.9.0"
const val org_jetbrains_kotlin: String = "1.3.72"
@@ -26,11 +26,11 @@ object Versions {
const val androidx_test: String = "1.2.0"
- const val io_objectbox: String = "2.3.4" // available: "2.6.0"
+ const val io_objectbox: String = "2.6.0"
const val org_jacoco: String = "0.7.9"
- const val io_mockk: String = "1.9.2" // available: "1.10.0"
+ const val io_mockk: String = "1.10.0"
const val android_arch_lifecycle_extensions: String = "1.1.1"
@@ -48,7 +48,7 @@ object Versions {
const val ink_page_indicator: String = "1.3.0"
- const val leakcanary_android: String = "2.2" // available: "2.3"
+ const val leakcanary_android: String = "2.4"
const val constraintlayout: String = "1.1.3"
@@ -56,23 +56,23 @@ object Versions {
const val preference_ktx: String = "1.1.1"
- const val junit_jupiter: String = "5.4.2" // available: "5.6.2"
+ const val junit_jupiter: String = "5.6.2"
const val mockwebserver: String = "3.6.0" // available: "4.7.2"
const val xfetch2okhttp: String = "3.1.4"
- const val assertj_core: String = "3.11.1" // available: "3.16.1"
+ const val assertj_core: String = "3.16.1"
const val core_testing: String = "2.1.0"
- const val fragment_ktx: String = "1.2.1" // available: "1.2.4"
+ const val fragment_ktx: String = "1.2.5"
const val lint_gradle: String = "27.0.0"
- const val testing_ktx: String = "1.1.1" // available: "1.1.2"
+ const val testing_ktx: String = "1.1.2"
- const val threetenabp: String = "1.1.1" // available: "1.2.4"
+ const val threetenabp: String = "1.2.4"
const val uiautomator: String = "2.2.0"
@@ -82,13 +82,13 @@ object Versions {
const val appcompat: String = "1.1.0"
- const val rxandroid: String = "2.1.0" // available: "2.1.1"
+ const val rxandroid: String = "2.1.1"
- const val core_ktx: String = "1.2.0" // available: "1.3.0"
+ const val core_ktx: String = "1.3.0"
const val kiwixlib: String = "9.1.2"
- const val material: String = "1.1.0-beta02" // available: "1.1.0"
+ const val material: String = "1.1.0"
const val multidex: String = "2.0.1"
@@ -98,22 +98,22 @@ object Versions {
const val jsr305: String = "3.0.2"
- const val ktlint: String = "0.36.0" // available: "0.37.1"
+ const val ktlint: String = "0.37.2"
const val okhttp: String = "3.12.1" // available: "4.7.2"
- const val rxjava: String = "2.2.5" // available: "2.2.19"
+ const val rxjava: String = "2.2.19"
const val aapt2: String = "4.0.0-6051327"
const val junit: String = "1.1.1"
/**
- * Current version: "5.6.1"
+ * Current version: "6.1.1"
* See issue 19: How to update Gradle itself?
* https://github.com/jmfayard/buildSrcVersions/issues/19
*/
- const val gradleLatestVersion: String = "6.5"
+ const val gradleLatestVersion: String = "6.5.1"
}
/**
diff --git a/core/detekt_baseline.xml b/core/detekt_baseline.xml
index 043c9f0fa..ea97ce3b2 100644
--- a/core/detekt_baseline.xml
+++ b/core/detekt_baseline.xml
@@ -5,7 +5,10 @@
EmptyFunctionBlock:BooksOnDiskViewHolder.kt$BookOnDiskViewHolder.BookViewHolder${ }
EmptyFunctionBlock:FetchDownloadMonitor.kt$FetchDownloadMonitor.<no name provided>${}
ForbiddenComment:JNIInitialiser.kt$JNIInitialiser$// TODO: Consider surfacing to user
+ LongParameterList:KiwixDialog.kt$KiwixDialog$( val title: Int?, val message: Int?, val positiveMessage: Int, val negativeMessage: Int?, val cancelable: Boolean = true, val icon: Int? = null, val neutralMessage: Int? = null, val getView: (() -> View)? = null )
+ LongParameterList:MainMenu.kt$MainMenu$( private val activity: Activity, zimFileReader: ZimFileReader?, menu: Menu, webViews: MutableList<KiwixWebView>, urlIsValid: Boolean, disableReadAloud: Boolean = false, disableTabs: Boolean = false, private val menuClickListener: MenuClickListener )
LongParameterList:MainMenu.kt$MainMenu.Factory$( menu: Menu, webViews: MutableList<KiwixWebView>, urlIsValid: Boolean, menuClickListener: MenuClickListener, disableReadAloud: Boolean, disableTabs: Boolean )
+ LongParameterList:Repository.kt$Repository$( @param:IO private val io: Scheduler, @param:MainThread private val mainThread: Scheduler, private val bookDao: NewBookDao, private val bookmarksDao: NewBookmarksDao, private val historyDao: HistoryDao, private val languageDao: NewLanguagesDao, private val recentSearchDao: NewRecentSearchDao, private val zimReaderContainer: ZimReaderContainer )
MagicNumber:ArticleCount.kt$ArticleCount$1000.0
MagicNumber:ArticleCount.kt$ArticleCount$3
MagicNumber:CoreSplashActivity.kt$CoreSplashActivity$10
diff --git a/core/objectbox-models/default.json b/core/objectbox-models/default.json
index 5d2e402e8..b1fa17d21 100644
--- a/core/objectbox-models/default.json
+++ b/core/objectbox-models/default.json
@@ -10,67 +10,84 @@
"properties": [
{
"id": "1:4248832782795400383",
- "name": "id"
+ "name": "id",
+ "type": 6,
+ "flags": 1
},
{
"id": "2:2644395282642821815",
- "name": "file"
+ "name": "file",
+ "type": 9
},
{
"id": "4:3145196313443812205",
- "name": "bookId"
+ "name": "bookId",
+ "type": 9
},
{
"id": "5:597997298666253723",
- "name": "title"
+ "name": "title",
+ "type": 9
},
{
"id": "6:8028706022307902131",
- "name": "description"
+ "name": "description",
+ "type": 9
},
{
"id": "7:4257578632233656657",
- "name": "language"
+ "name": "language",
+ "type": 9
},
{
"id": "8:7771231471515752814",
- "name": "creator"
+ "name": "creator",
+ "type": 9
},
{
"id": "9:892859866782486178",
- "name": "publisher"
+ "name": "publisher",
+ "type": 9
},
{
"id": "10:1925365063061602631",
- "name": "date"
+ "name": "date",
+ "type": 9
},
{
"id": "11:1111395522977944209",
- "name": "url"
+ "name": "url",
+ "type": 9
},
{
"id": "12:3765116904492031525",
- "name": "articleCount"
+ "name": "articleCount",
+ "type": 9
},
{
"id": "13:5901922417972273396",
- "name": "mediaCount"
+ "name": "mediaCount",
+ "type": 9
},
{
"id": "14:1229023184984372602",
- "name": "size"
+ "name": "size",
+ "type": 9
},
{
"id": "15:6851856791814492874",
- "name": "name"
+ "name": "name",
+ "type": 9
},
{
"id": "16:6142333908132117423",
- "name": "favIcon"
+ "name": "favIcon",
+ "type": 9
},
{
"id": "17:2701677664876214591",
- "name": "tags"
+ "name": "tags",
+ "type": 9
}
],
"relations": []
@@ -82,19 +99,26 @@
"properties": [
{
"id": "1:7795244654012809404",
- "name": "id"
+ "name": "id",
+ "type": 6,
+ "flags": 1
},
{
"id": "2:9116495537035444904",
- "name": "locale"
+ "name": "locale",
+ "type": 9
},
{
"id": "3:452531964346972307",
- "name": "active"
+ "name": "active",
+ "type": 1,
+ "flags": 4
},
{
"id": "4:8812214350305159407",
- "name": "occurencesOfLanguage"
+ "name": "occurencesOfLanguage",
+ "type": 5,
+ "flags": 4
}
],
"relations": []
@@ -106,39 +130,50 @@
"properties": [
{
"id": "1:4390013783965661495",
- "name": "id"
+ "name": "id",
+ "type": 6,
+ "flags": 1
},
{
"id": "2:6814436941523306636",
- "name": "zimId"
+ "name": "zimId",
+ "type": 9
},
{
"id": "3:3445023139891930306",
- "name": "zimName"
+ "name": "zimName",
+ "type": 9
},
{
"id": "4:1707638909668210783",
- "name": "zimFilePath"
+ "name": "zimFilePath",
+ "type": 9
},
{
"id": "5:7291321834337975178",
- "name": "favicon"
+ "name": "favicon",
+ "type": 9
},
{
"id": "6:8790316103579116510",
- "name": "historyUrl"
+ "name": "historyUrl",
+ "type": 9
},
{
"id": "7:6718164131929659510",
- "name": "historyTitle"
+ "name": "historyTitle",
+ "type": 9
},
{
"id": "9:6094002746638656105",
- "name": "timeStamp"
+ "name": "timeStamp",
+ "type": 6,
+ "flags": 4
},
{
"id": "10:8395372122440621469",
- "name": "dateString"
+ "name": "dateString",
+ "type": 9
}
],
"relations": []
@@ -150,31 +185,39 @@
"properties": [
{
"id": "1:6627309171741917147",
- "name": "id"
+ "name": "id",
+ "type": 6,
+ "flags": 1
},
{
"id": "2:6862771806221961183",
- "name": "zimId"
+ "name": "zimId",
+ "type": 9
},
{
"id": "3:4312769031500860715",
- "name": "zimName"
+ "name": "zimName",
+ "type": 9
},
{
"id": "4:8187716343071473669",
- "name": "zimFilePath"
+ "name": "zimFilePath",
+ "type": 9
},
{
"id": "5:5652763871458286201",
- "name": "bookmarkUrl"
+ "name": "bookmarkUrl",
+ "type": 9
},
{
"id": "6:4537799665712767375",
- "name": "bookmarkTitle"
+ "name": "bookmarkTitle",
+ "type": 9
},
{
"id": "7:3805929017981932900",
- "name": "favicon"
+ "name": "favicon",
+ "type": 9
}
],
"relations": []
@@ -186,15 +229,19 @@
"properties": [
{
"id": "1:7759655437795315973",
- "name": "id"
+ "name": "id",
+ "type": 6,
+ "flags": 1
},
{
"id": "2:3924214186055484853",
- "name": "searchTerm"
+ "name": "searchTerm",
+ "type": 9
},
{
"id": "3:3320858395373055542",
- "name": "zimId"
+ "name": "zimId",
+ "type": 9
}
],
"relations": []
@@ -206,95 +253,126 @@
"properties": [
{
"id": "1:7366957113003324901",
- "name": "id"
+ "name": "id",
+ "type": 6,
+ "flags": 1
},
{
"id": "3:3174500111130052488",
- "name": "bookId"
+ "name": "bookId",
+ "type": 9
},
{
"id": "4:3949362784963767166",
- "name": "title"
+ "name": "title",
+ "type": 9
},
{
"id": "5:812546090900770347",
- "name": "description"
+ "name": "description",
+ "type": 9
},
{
"id": "6:3129463483413863468",
- "name": "language"
+ "name": "language",
+ "type": 9
},
{
"id": "7:3402286918039853548",
- "name": "creator"
+ "name": "creator",
+ "type": 9
},
{
"id": "8:4732753967507809221",
- "name": "publisher"
+ "name": "publisher",
+ "type": 9
},
{
"id": "9:3239042532048399134",
- "name": "date"
+ "name": "date",
+ "type": 9
},
{
"id": "10:1136584919149973914",
- "name": "url"
+ "name": "url",
+ "type": 9
},
{
"id": "11:4252749008345744598",
- "name": "articleCount"
+ "name": "articleCount",
+ "type": 9
},
{
"id": "12:8625493380854102341",
- "name": "mediaCount"
+ "name": "mediaCount",
+ "type": 9
},
{
"id": "13:2787210837560254021",
- "name": "size"
+ "name": "size",
+ "type": 9
},
{
"id": "14:2052022387195277817",
- "name": "name"
+ "name": "name",
+ "type": 9
},
{
"id": "15:1976493094677983679",
- "name": "favIcon"
+ "name": "favIcon",
+ "type": 9
},
{
"id": "16:217454020763036675",
- "name": "etaInMilliSeconds"
+ "name": "etaInMilliSeconds",
+ "type": 6,
+ "flags": 4
},
{
"id": "17:1136630637198901642",
- "name": "bytesDownloaded"
+ "name": "bytesDownloaded",
+ "type": 6,
+ "flags": 4
},
{
"id": "18:8939019296899137627",
- "name": "totalSizeOfDownload"
+ "name": "totalSizeOfDownload",
+ "type": 6,
+ "flags": 4
},
{
"id": "19:3378789699620971394",
- "name": "status"
+ "name": "status",
+ "type": 5,
+ "flags": 2
},
{
"id": "20:6867355950440828062",
- "name": "error"
+ "name": "error",
+ "type": 5,
+ "flags": 2
},
{
"id": "21:5555873126720275555",
- "name": "file"
+ "name": "file",
+ "type": 9
},
{
"id": "22:2724607601244650879",
- "name": "downloadId"
+ "name": "downloadId",
+ "type": 6,
+ "flags": 4
},
{
"id": "23:5485468735259326535",
- "name": "progress"
+ "name": "progress",
+ "type": 5,
+ "flags": 4
},
{
"id": "24:4272820830206771469",
- "name": "tags"
+ "name": "tags",
+ "type": 9
}
],
"relations": []
@@ -304,8 +382,8 @@
"lastIndexId": "4:4868787482832538530",
"lastRelationId": "0:0",
"lastSequenceId": "0:0",
- "modelVersion": 4,
- "modelVersionParserMinimum": 4,
+ "modelVersion": 5,
+ "modelVersionParserMinimum": 5,
"retiredEntityUids": [
349148274283701276,
7257718270326155947