Update gradle and kotlin
This commit is contained in:
@@ -2,13 +2,15 @@ plugins {
|
|||||||
id 'com.android.application'
|
id 'com.android.application'
|
||||||
id 'kotlin-android'
|
id 'kotlin-android'
|
||||||
id 'kotlin-kapt'
|
id 'kotlin-kapt'
|
||||||
|
id 'com.google.devtools.ksp'
|
||||||
id 'kotlin-parcelize'
|
id 'kotlin-parcelize'
|
||||||
id 'dagger.hilt.android.plugin'
|
id 'dagger.hilt.android.plugin'
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdk = 33
|
compileSdk = 33
|
||||||
buildToolsVersion = '33.0.2'
|
compileSdkExtension = 4
|
||||||
|
buildToolsVersion = '34.0.0'
|
||||||
namespace = 'org.koitharu.kotatsu'
|
namespace = 'org.koitharu.kotatsu'
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
@@ -22,10 +24,8 @@ android {
|
|||||||
generatedDensities = []
|
generatedDensities = []
|
||||||
testInstrumentationRunner "org.koitharu.kotatsu.HiltTestRunner"
|
testInstrumentationRunner "org.koitharu.kotatsu.HiltTestRunner"
|
||||||
|
|
||||||
kapt {
|
ksp {
|
||||||
arguments {
|
arg("room.schemaLocation", "$projectDir/schemas")
|
||||||
arg 'room.schemaLocation', "$projectDir/schemas".toString()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
@@ -41,6 +41,7 @@ android {
|
|||||||
}
|
}
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
viewBinding true
|
viewBinding true
|
||||||
|
buildConfig true
|
||||||
}
|
}
|
||||||
sourceSets {
|
sourceSets {
|
||||||
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
|
androidTest.assets.srcDirs += files("$projectDir/schemas".toString())
|
||||||
@@ -81,11 +82,11 @@ afterEvaluate {
|
|||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
//noinspection GradleDependency
|
//noinspection GradleDependency
|
||||||
implementation('com.github.KotatsuApp:kotatsu-parsers:03b4fc9f00') {
|
implementation('com.github.KotatsuApp:kotatsu-parsers:08eb9552d6') {
|
||||||
exclude group: 'org.json', module: 'json'
|
exclude group: 'org.json', module: 'json'
|
||||||
}
|
}
|
||||||
|
|
||||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.8.22'
|
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.0'
|
||||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3'
|
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3'
|
||||||
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
||||||
@@ -103,8 +104,7 @@ dependencies {
|
|||||||
implementation 'androidx.preference:preference-ktx:1.2.0'
|
implementation 'androidx.preference:preference-ktx:1.2.0'
|
||||||
implementation 'androidx.biometric:biometric-ktx:1.2.0-alpha05'
|
implementation 'androidx.biometric:biometric-ktx:1.2.0-alpha05'
|
||||||
implementation 'com.google.android.material:material:1.9.0'
|
implementation 'com.google.android.material:material:1.9.0'
|
||||||
//noinspection LifecycleAnnotationProcessorWithJava8
|
implementation 'androidx.lifecycle:lifecycle-common-java8:2.6.1'
|
||||||
kapt 'androidx.lifecycle:lifecycle-compiler:2.6.1'
|
|
||||||
|
|
||||||
// TODO https://issuetracker.google.com/issues/254846063
|
// TODO https://issuetracker.google.com/issues/254846063
|
||||||
implementation 'androidx.work:work-runtime-ktx:2.8.1'
|
implementation 'androidx.work:work-runtime-ktx:2.8.1'
|
||||||
@@ -117,8 +117,7 @@ dependencies {
|
|||||||
|
|
||||||
implementation 'androidx.room:room-runtime:2.5.2'
|
implementation 'androidx.room:room-runtime:2.5.2'
|
||||||
implementation 'androidx.room:room-ktx:2.5.2'
|
implementation 'androidx.room:room-ktx:2.5.2'
|
||||||
//noinspection KaptUsageInsteadOfKsp
|
ksp 'androidx.room:room-compiler:2.5.2'
|
||||||
kapt 'androidx.room:room-compiler:2.5.2'
|
|
||||||
|
|
||||||
implementation 'com.squareup.okhttp3:okhttp:4.11.0'
|
implementation 'com.squareup.okhttp3:okhttp:4.11.0'
|
||||||
implementation 'com.squareup.okhttp3:okhttp-dnsoverhttps:4.11.0'
|
implementation 'com.squareup.okhttp3:okhttp-dnsoverhttps:4.11.0'
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class Migration16To17(context: Context) : Migration(16, 17) {
|
|||||||
database.execSQL("CREATE INDEX `index_sources_sort_key` ON `sources` (`sort_key`)")
|
database.execSQL("CREATE INDEX `index_sources_sort_key` ON `sources` (`sort_key`)")
|
||||||
val hiddenSources = prefs.getStringSet("sources_hidden", null).orEmpty()
|
val hiddenSources = prefs.getStringSet("sources_hidden", null).orEmpty()
|
||||||
val order = prefs.getString("sources_order_2", null)?.split('|').orEmpty()
|
val order = prefs.getString("sources_order_2", null)?.split('|').orEmpty()
|
||||||
val sources = MangaSource.values()
|
val sources = MangaSource.entries
|
||||||
for (source in sources) {
|
for (source in sources) {
|
||||||
if (source == MangaSource.LOCAL) {
|
if (source == MangaSource.LOCAL) {
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ fun MangaSource.getLocaleTitle(): String? {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun MangaSource(name: String): MangaSource {
|
fun MangaSource(name: String): MangaSource {
|
||||||
MangaSource.values().forEach {
|
MangaSource.entries.forEach {
|
||||||
if (it.name == name) return it
|
if (it.name == name) return it
|
||||||
}
|
}
|
||||||
return MangaSource.DUMMY
|
return MangaSource.DUMMY
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import androidx.annotation.StringRes
|
|||||||
import androidx.annotation.StyleRes
|
import androidx.annotation.StyleRes
|
||||||
import com.google.android.material.color.DynamicColors
|
import com.google.android.material.color.DynamicColors
|
||||||
import org.koitharu.kotatsu.R
|
import org.koitharu.kotatsu.R
|
||||||
|
import org.koitharu.kotatsu.parsers.util.find
|
||||||
|
|
||||||
enum class ColorScheme(
|
enum class ColorScheme(
|
||||||
@StyleRes val styleResId: Int,
|
@StyleRes val styleResId: Int,
|
||||||
@@ -31,7 +32,7 @@ enum class ColorScheme(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun getAvailableList(): List<ColorScheme> {
|
fun getAvailableList(): List<ColorScheme> {
|
||||||
val list = enumValues<ColorScheme>().toMutableList()
|
val list = ColorScheme.entries.toMutableList()
|
||||||
if (!DynamicColors.isDynamicColorAvailable()) {
|
if (!DynamicColors.isDynamicColorAvailable()) {
|
||||||
list.remove(MONET)
|
list.remove(MONET)
|
||||||
}
|
}
|
||||||
@@ -39,7 +40,7 @@ enum class ColorScheme(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun safeValueOf(name: String): ColorScheme? {
|
fun safeValueOf(name: String): ColorScheme? {
|
||||||
return enumValues<ColorScheme>().find { it.name == name }
|
return ColorScheme.entries.find(name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ enum class NetworkPolicy(
|
|||||||
|
|
||||||
fun from(key: String?, default: NetworkPolicy): NetworkPolicy {
|
fun from(key: String?, default: NetworkPolicy): NetworkPolicy {
|
||||||
val intKey = key?.toIntOrNull() ?: return default
|
val intKey = key?.toIntOrNull() ?: return default
|
||||||
return enumValues<NetworkPolicy>().find { it.key == intKey } ?: default
|
return NetworkPolicy.entries.find { it.key == intKey } ?: default
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -519,7 +519,7 @@ class FastScroller @JvmOverloads constructor(
|
|||||||
|
|
||||||
private fun TypedArray.getBubbleSize(@StyleableRes index: Int, defaultValue: BubbleSize): BubbleSize {
|
private fun TypedArray.getBubbleSize(@StyleableRes index: Int, defaultValue: BubbleSize): BubbleSize {
|
||||||
val ordinal = getInt(index, -1)
|
val ordinal = getInt(index, -1)
|
||||||
return BubbleSize.values().getOrNull(ordinal) ?: defaultValue
|
return BubbleSize.entries.getOrNull(ordinal) ?: defaultValue
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun findValidParent(view: View): ViewGroup? = view.parents.firstNotNullOfOrNull { p ->
|
private fun findValidParent(view: View): ViewGroup? = view.parents.firstNotNullOfOrNull { p ->
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ class ScrobblingInfoSheet :
|
|||||||
viewModel.updateScrobbling(
|
viewModel.updateScrobbling(
|
||||||
index = scrobblerIndex,
|
index = scrobblerIndex,
|
||||||
rating = requireViewBinding().ratingBar.rating / requireViewBinding().ratingBar.numStars,
|
rating = requireViewBinding().ratingBar.rating / requireViewBinding().ratingBar.numStars,
|
||||||
status = enumValues<ScrobblingStatus>().getOrNull(position),
|
status = ScrobblingStatus.entries.getOrNull(position),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ class ScrobblingInfoSheet :
|
|||||||
viewModel.updateScrobbling(
|
viewModel.updateScrobbling(
|
||||||
index = scrobblerIndex,
|
index = scrobblerIndex,
|
||||||
rating = rating / ratingBar.numStars,
|
rating = rating / ratingBar.numStars,
|
||||||
status = enumValues<ScrobblingStatus>().getOrNull(requireViewBinding().spinnerStatus.selectedItemPosition),
|
status = ScrobblingStatus.entries.getOrNull(requireViewBinding().spinnerStatus.selectedItemPosition),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package org.koitharu.kotatsu.favourites.domain.model
|
package org.koitharu.kotatsu.favourites.domain.model
|
||||||
|
|
||||||
import org.koitharu.kotatsu.parsers.model.MangaSource
|
import org.koitharu.kotatsu.parsers.model.MangaSource
|
||||||
|
import org.koitharu.kotatsu.parsers.util.find
|
||||||
|
|
||||||
class Cover(
|
class Cover(
|
||||||
val url: String,
|
val url: String,
|
||||||
@@ -8,7 +9,7 @@ class Cover(
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
val mangaSource: MangaSource?
|
val mangaSource: MangaSource?
|
||||||
get() = if (source.isEmpty()) null else MangaSource.values().find { it.name == source }
|
get() = if (source.isEmpty()) null else MangaSource.entries.find(source)
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (this === other) return true
|
if (this === other) return true
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class FavouritesListMenuProvider(
|
|||||||
|
|
||||||
override fun onMenuItemSelected(menuItem: MenuItem): Boolean {
|
override fun onMenuItemSelected(menuItem: MenuItem): Boolean {
|
||||||
if (menuItem.groupId == R.id.group_order) {
|
if (menuItem.groupId == R.id.group_order) {
|
||||||
val order = enumValues<SortOrder>()[menuItem.order]
|
val order = SortOrder.entries[menuItem.order]
|
||||||
viewModel.setSortOrder(order)
|
viewModel.setSortOrder(order)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class HistoryListMenuProvider(
|
|||||||
override fun onCreateMenu(menu: Menu, menuInflater: MenuInflater) {
|
override fun onCreateMenu(menu: Menu, menuInflater: MenuInflater) {
|
||||||
menuInflater.inflate(R.menu.opt_history, menu)
|
menuInflater.inflate(R.menu.opt_history, menu)
|
||||||
val subMenu = menu.findItem(R.id.action_order)?.subMenu ?: return
|
val subMenu = menu.findItem(R.id.action_order)?.subMenu ?: return
|
||||||
for (order in HistoryOrder.values()) {
|
for (order in HistoryOrder.entries) {
|
||||||
subMenu.add(R.id.group_order, Menu.NONE, order.ordinal, order.titleResId)
|
subMenu.add(R.id.group_order, Menu.NONE, order.ordinal, order.titleResId)
|
||||||
}
|
}
|
||||||
subMenu.setGroupCheckable(R.id.group_order, true, true)
|
subMenu.setGroupCheckable(R.id.group_order, true, true)
|
||||||
@@ -31,7 +31,7 @@ class HistoryListMenuProvider(
|
|||||||
|
|
||||||
override fun onMenuItemSelected(menuItem: MenuItem): Boolean {
|
override fun onMenuItemSelected(menuItem: MenuItem): Boolean {
|
||||||
if (menuItem.groupId == R.id.group_order) {
|
if (menuItem.groupId == R.id.group_order) {
|
||||||
val order = enumValues<HistoryOrder>()[menuItem.order]
|
val order = HistoryOrder.entries[menuItem.order]
|
||||||
viewModel.setSortOrder(order)
|
viewModel.setSortOrder(order)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@@ -51,7 +51,7 @@ class HistoryListMenuProvider(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onPrepareMenu(menu: Menu) {
|
override fun onPrepareMenu(menu: Menu) {
|
||||||
val order = viewModel.sortOrder.value ?: return
|
val order = viewModel.sortOrder.value
|
||||||
menu.findItem(R.id.action_order)?.subMenu?.forEach { item ->
|
menu.findItem(R.id.action_order)?.subMenu?.forEach { item ->
|
||||||
if (item.order == order.ordinal) {
|
if (item.order == order.ordinal) {
|
||||||
item.isChecked = true
|
item.isChecked = true
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class TypedListSpacingDecoration(
|
|||||||
state: RecyclerView.State
|
state: RecyclerView.State
|
||||||
) {
|
) {
|
||||||
val itemType = parent.getChildViewHolder(view)?.itemViewType?.let {
|
val itemType = parent.getChildViewHolder(view)?.itemViewType?.let {
|
||||||
ListItemType.values().getOrNull(it)
|
ListItemType.entries.getOrNull(it)
|
||||||
}
|
}
|
||||||
when (itemType) {
|
when (itemType) {
|
||||||
ListItemType.FILTER_SORT,
|
ListItemType.FILTER_SORT,
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import org.koitharu.kotatsu.parsers.model.MangaChapter
|
|||||||
import org.koitharu.kotatsu.parsers.model.MangaSource
|
import org.koitharu.kotatsu.parsers.model.MangaSource
|
||||||
import org.koitharu.kotatsu.parsers.model.MangaState
|
import org.koitharu.kotatsu.parsers.model.MangaState
|
||||||
import org.koitharu.kotatsu.parsers.model.MangaTag
|
import org.koitharu.kotatsu.parsers.model.MangaTag
|
||||||
|
import org.koitharu.kotatsu.parsers.util.find
|
||||||
import org.koitharu.kotatsu.parsers.util.json.getBooleanOrDefault
|
import org.koitharu.kotatsu.parsers.util.json.getBooleanOrDefault
|
||||||
import org.koitharu.kotatsu.parsers.util.json.getLongOrDefault
|
import org.koitharu.kotatsu.parsers.util.json.getLongOrDefault
|
||||||
import org.koitharu.kotatsu.parsers.util.json.getStringOrNull
|
import org.koitharu.kotatsu.parsers.util.json.getStringOrNull
|
||||||
@@ -67,7 +68,7 @@ class MangaIndex(source: String?) {
|
|||||||
isNsfw = json.getBooleanOrDefault("nsfw", false),
|
isNsfw = json.getBooleanOrDefault("nsfw", false),
|
||||||
coverUrl = json.getString("cover"),
|
coverUrl = json.getString("cover"),
|
||||||
state = json.getStringOrNull("state")?.let { stateString ->
|
state = json.getStringOrNull("state")?.let { stateString ->
|
||||||
MangaState.values().find { it.name == stateString }
|
MangaState.entries.find(stateString)
|
||||||
},
|
},
|
||||||
description = json.getStringOrNull("description"),
|
description = json.getStringOrNull("description"),
|
||||||
tags = json.getJSONArray("tags").mapJSONToSet { x ->
|
tags = json.getJSONArray("tags").mapJSONToSet { x ->
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ class ScrobblerConfigViewModel @Inject constructor(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
val grouped = list.groupBy { it.status }
|
val grouped = list.groupBy { it.status }
|
||||||
val statuses = enumValues<ScrobblingStatus>()
|
val statuses = ScrobblingStatus.entries
|
||||||
val result = ArrayList<ListModel>(list.size + statuses.size)
|
val result = ArrayList<ListModel>(list.size + statuses.size)
|
||||||
for (st in statuses) {
|
for (st in statuses) {
|
||||||
val subList = grouped[st]
|
val subList = grouped[st]
|
||||||
@@ -102,7 +102,7 @@ class ScrobblerConfigViewModel @Inject constructor(
|
|||||||
): ScrobblerService {
|
): ScrobblerService {
|
||||||
val serviceId = savedStateHandle.get<Int>(ScrobblerConfigActivity.EXTRA_SERVICE_ID) ?: 0
|
val serviceId = savedStateHandle.get<Int>(ScrobblerConfigActivity.EXTRA_SERVICE_ID) ?: 0
|
||||||
if (serviceId != 0) {
|
if (serviceId != 0) {
|
||||||
return enumValues<ScrobblerService>().first { it.id == serviceId }
|
return ScrobblerService.entries.first { it.id == serviceId }
|
||||||
}
|
}
|
||||||
val uri = savedStateHandle.require<Uri>(BaseActivity.EXTRA_DATA)
|
val uri = savedStateHandle.require<Uri>(BaseActivity.EXTRA_DATA)
|
||||||
return when (uri.host) {
|
return when (uri.host) {
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class AppearanceSettingsFragment :
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
findPreference<ListPreference>(AppSettings.KEY_LIST_MODE)?.run {
|
findPreference<ListPreference>(AppSettings.KEY_LIST_MODE)?.run {
|
||||||
entryValues = ListMode.values().names()
|
entryValues = ListMode.entries.names()
|
||||||
setDefaultValueCompat(ListMode.GRID.name)
|
setDefaultValueCompat(ListMode.GRID.name)
|
||||||
}
|
}
|
||||||
findPreference<ActivityListPreference>(AppSettings.KEY_APP_LOCALE)?.run {
|
findPreference<ActivityListPreference>(AppSettings.KEY_APP_LOCALE)?.run {
|
||||||
|
|||||||
@@ -29,12 +29,7 @@ class NetworkSettingsFragment :
|
|||||||
addPreferencesFromResource(R.xml.pref_network)
|
addPreferencesFromResource(R.xml.pref_network)
|
||||||
findPreference<Preference>(AppSettings.KEY_PREFETCH_CONTENT)?.isVisible = contentCache.isCachingEnabled
|
findPreference<Preference>(AppSettings.KEY_PREFETCH_CONTENT)?.isVisible = contentCache.isCachingEnabled
|
||||||
findPreference<ListPreference>(AppSettings.KEY_DOH)?.run {
|
findPreference<ListPreference>(AppSettings.KEY_DOH)?.run {
|
||||||
entryValues = arrayOf(
|
entryValues = DoHProvider.entries.names()
|
||||||
DoHProvider.NONE,
|
|
||||||
DoHProvider.GOOGLE,
|
|
||||||
DoHProvider.CLOUDFLARE,
|
|
||||||
DoHProvider.ADGUARD,
|
|
||||||
).names()
|
|
||||||
setDefaultValueCompat(DoHProvider.NONE.name)
|
setDefaultValueCompat(DoHProvider.NONE.name)
|
||||||
}
|
}
|
||||||
bindProxySummary()
|
bindProxySummary()
|
||||||
|
|||||||
@@ -25,18 +25,18 @@ class ReaderSettingsFragment :
|
|||||||
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
||||||
addPreferencesFromResource(R.xml.pref_reader)
|
addPreferencesFromResource(R.xml.pref_reader)
|
||||||
findPreference<ListPreference>(AppSettings.KEY_READER_MODE)?.run {
|
findPreference<ListPreference>(AppSettings.KEY_READER_MODE)?.run {
|
||||||
entryValues = ReaderMode.values().names()
|
entryValues = ReaderMode.entries.names()
|
||||||
setDefaultValueCompat(ReaderMode.STANDARD.name)
|
setDefaultValueCompat(ReaderMode.STANDARD.name)
|
||||||
}
|
}
|
||||||
findPreference<ListPreference>(AppSettings.KEY_READER_BACKGROUND)?.run {
|
findPreference<ListPreference>(AppSettings.KEY_READER_BACKGROUND)?.run {
|
||||||
entryValues = ReaderBackground.values().names()
|
entryValues = ReaderBackground.entries.names()
|
||||||
setDefaultValueCompat(ReaderBackground.DEFAULT.name)
|
setDefaultValueCompat(ReaderBackground.DEFAULT.name)
|
||||||
}
|
}
|
||||||
findPreference<MultiSelectListPreference>(AppSettings.KEY_READER_SWITCHERS)?.run {
|
findPreference<MultiSelectListPreference>(AppSettings.KEY_READER_SWITCHERS)?.run {
|
||||||
summaryProvider = MultiSummaryProvider(R.string.gestures_only)
|
summaryProvider = MultiSummaryProvider(R.string.gestures_only)
|
||||||
}
|
}
|
||||||
findPreference<ListPreference>(AppSettings.KEY_ZOOM_MODE)?.run {
|
findPreference<ListPreference>(AppSettings.KEY_ZOOM_MODE)?.run {
|
||||||
entryValues = ZoomMode.values().names()
|
entryValues = ZoomMode.entries.names()
|
||||||
setDefaultValueCompat(ZoomMode.FIT_CENTER.name)
|
setDefaultValueCompat(ZoomMode.FIT_CENTER.name)
|
||||||
}
|
}
|
||||||
updateReaderModeDependency()
|
updateReaderModeDependency()
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class UserDataSettingsViewModel @Inject constructor(
|
|||||||
private var storageUsageJob: Job? = null
|
private var storageUsageJob: Job? = null
|
||||||
|
|
||||||
init {
|
init {
|
||||||
CacheDir.values().forEach {
|
CacheDir.entries.forEach {
|
||||||
cacheSizes[it] = MutableStateFlow(-1L)
|
cacheSizes[it] = MutableStateFlow(-1L)
|
||||||
}
|
}
|
||||||
launchJob(Dispatchers.Default) {
|
launchJob(Dispatchers.Default) {
|
||||||
@@ -52,7 +52,7 @@ class UserDataSettingsViewModel @Inject constructor(
|
|||||||
launchJob(Dispatchers.Default) {
|
launchJob(Dispatchers.Default) {
|
||||||
feedItemsCount.value = trackingRepository.getLogsCount()
|
feedItemsCount.value = trackingRepository.getLogsCount()
|
||||||
}
|
}
|
||||||
CacheDir.values().forEach { cache ->
|
CacheDir.entries.forEach { cache ->
|
||||||
launchJob(Dispatchers.Default) {
|
launchJob(Dispatchers.Default) {
|
||||||
checkNotNull(cacheSizes[cache]).value = storageManager.computeCacheSize(cache)
|
checkNotNull(cacheSizes[cache]).value = storageManager.computeCacheSize(cache)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,10 @@ buildscript {
|
|||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:8.0.2'
|
classpath 'com.android.tools.build:gradle:8.2.0-alpha15'
|
||||||
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.22'
|
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0'
|
||||||
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.47'
|
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.47'
|
||||||
|
classpath 'com.google.devtools.ksp:symbol-processing-gradle-plugin:1.9.0-1.0.13'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,5 +17,4 @@ android.useAndroidX=true
|
|||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
org.gradle.jvmargs=-Xmx1536M -Dkotlin.daemon.jvm.options\="-Xmx1536M"
|
org.gradle.jvmargs=-Xmx1536M -Dkotlin.daemon.jvm.options\="-Xmx1536M"
|
||||||
android.enableR8.fullMode=true
|
android.enableR8.fullMode=true
|
||||||
android.defaults.buildfeatures.buildconfig=true
|
|
||||||
android.nonFinalResIds=false
|
android.nonFinalResIds=false
|
||||||
|
|||||||
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,7 +1,7 @@
|
|||||||
#Sat Feb 25 17:16:02 EET 2023
|
#Sat Feb 25 17:16:02 EET 2023
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionSha256Sum=ff7bf6a86f09b9b2c40bb8f48b25fc19cf2b2664fd1d220cd7ab833ec758d0d7
|
distributionSha256Sum=38f66cd6eef217b4c35855bb11ea4e9fbc53594ccccb5fb82dfd317ef8c2c5a3
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
Reference in New Issue
Block a user