mirror of
https://github.com/mihonapp/mihon.git
synced 2025-08-20 05:21:31 +02:00
Compare commits
5 Commits
7ca64a67c5
...
8f9a325895
Author | SHA1 | Date | |
---|---|---|---|
|
8f9a325895 | ||
|
f74071ab0a | ||
|
7fb3ef48e4 | ||
|
1837faa573 | ||
|
518abf032c |
@@ -7,7 +7,7 @@ import kotlinx.serialization.protobuf.ProtoNumber
|
||||
data class Backup(
|
||||
@ProtoNumber(1) val backupManga: List<BackupManga>,
|
||||
@ProtoNumber(2) var backupCategories: List<BackupCategory> = emptyList(),
|
||||
@ProtoNumber(100) var backupBrokenSources: List<BrokenBackupSource> = emptyList(),
|
||||
// @ProtoNumber(100) var backupBrokenSources, legacy source model with non-compliant proto number,
|
||||
@ProtoNumber(101) var backupSources: List<BackupSource> = emptyList(),
|
||||
@ProtoNumber(104) var backupPreferences: List<BackupPreference> = emptyList(),
|
||||
@ProtoNumber(105) var backupSourcePreferences: List<BackupSourcePreferences> = emptyList(),
|
||||
|
@@ -18,15 +18,3 @@ data class BackupHistory(
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated("Replaced with BackupHistory. This is retained for legacy reasons.")
|
||||
@Serializable
|
||||
data class BrokenBackupHistory(
|
||||
@ProtoNumber(0) var url: String,
|
||||
@ProtoNumber(1) var lastRead: Long,
|
||||
@ProtoNumber(2) var readDuration: Long = 0,
|
||||
) {
|
||||
fun toBackupHistory(): BackupHistory {
|
||||
return BackupHistory(url, lastRead, readDuration)
|
||||
}
|
||||
}
|
||||
|
@@ -32,7 +32,7 @@ data class BackupManga(
|
||||
// Bump by 100 for values that are not saved/implemented in 1.x but are used in 0.x
|
||||
@ProtoNumber(100) var favorite: Boolean = true,
|
||||
@ProtoNumber(101) var chapterFlags: Int = 0,
|
||||
@ProtoNumber(102) var brokenHistory: List<BrokenBackupHistory> = emptyList(),
|
||||
// @ProtoNumber(102) var brokenHistory, legacy history model with non-compliant proto number
|
||||
@ProtoNumber(103) var viewer_flags: Int? = null,
|
||||
@ProtoNumber(104) var history: List<BackupHistory> = emptyList(),
|
||||
@ProtoNumber(105) var updateStrategy: UpdateStrategy = UpdateStrategy.ALWAYS_UPDATE,
|
||||
|
@@ -8,11 +8,3 @@ data class BackupSource(
|
||||
@ProtoNumber(1) var name: String = "",
|
||||
@ProtoNumber(2) var sourceId: Long,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class BrokenBackupSource(
|
||||
@ProtoNumber(0) var name: String = "",
|
||||
@ProtoNumber(1) var sourceId: Long,
|
||||
) {
|
||||
fun toBackupSource() = BackupSource(name, sourceId)
|
||||
}
|
||||
|
@@ -67,7 +67,7 @@ class BackupRestorer(
|
||||
val backup = BackupDecoder(context).decode(uri)
|
||||
|
||||
// Store source mapping for error messages
|
||||
val backupMaps = backup.backupSources + backup.backupBrokenSources.map { it.toBackupSource() }
|
||||
val backupMaps = backup.backupSources
|
||||
sourceMapping = backupMaps.associate { it.sourceId to it.name }
|
||||
|
||||
if (options.libraryEntries) {
|
||||
|
@@ -71,7 +71,7 @@ class MangaRestorer(
|
||||
chapters = backupManga.chapters,
|
||||
categories = backupManga.categories,
|
||||
backupCategories = backupCategories,
|
||||
history = backupManga.history + backupManga.brokenHistory.map { it.toBackupHistory() },
|
||||
history = backupManga.history,
|
||||
tracks = backupManga.tracking,
|
||||
excludedScanlators = backupManga.excludedScanlators,
|
||||
)
|
||||
|
@@ -14,6 +14,7 @@ import org.gradle.kotlin.dsl.provideDelegate
|
||||
import org.gradle.kotlin.dsl.the
|
||||
import org.gradle.kotlin.dsl.withType
|
||||
import org.jetbrains.kotlin.compose.compiler.gradle.ComposeCompilerGradlePluginExtension
|
||||
import org.jetbrains.kotlin.compose.compiler.gradle.ComposeFeatureFlag
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
import java.io.File
|
||||
|
||||
@@ -75,25 +76,20 @@ internal fun Project.configureCompose(commonExtension: CommonExtension<*, *, *,
|
||||
}
|
||||
|
||||
extensions.configure<ComposeCompilerGradlePluginExtension> {
|
||||
// Enable strong skipping mode
|
||||
enableStrongSkippingMode.set(true)
|
||||
|
||||
// Enable experimental compiler opts
|
||||
// https://developer.android.com/jetpack/androidx/releases/compose-compiler#1.5.9
|
||||
enableNonSkippingGroupOptimization.set(true)
|
||||
featureFlags.set(setOf(ComposeFeatureFlag.OptimizeNonSkippingGroups))
|
||||
|
||||
val enableMetrics = project.providers.gradleProperty("enableComposeCompilerMetrics").orNull.toBoolean()
|
||||
val enableReports = project.providers.gradleProperty("enableComposeCompilerReports").orNull.toBoolean()
|
||||
|
||||
val rootProjectDir = rootProject.layout.buildDirectory.asFile.get()
|
||||
val rootBuildDir = rootProject.layout.buildDirectory.asFile.get()
|
||||
val relativePath = projectDir.relativeTo(rootDir)
|
||||
|
||||
if (enableMetrics) {
|
||||
val buildDirPath = rootProjectDir.resolve("compose-metrics").resolve(relativePath)
|
||||
metricsDestination.set(buildDirPath)
|
||||
rootBuildDir.resolve("compose-metrics").resolve(relativePath).let(metricsDestination::set)
|
||||
}
|
||||
|
||||
if (enableReports) {
|
||||
val buildDirPath = rootProjectDir.resolve("compose-reports").resolve(relativePath)
|
||||
reportsDestination.set(buildDirPath)
|
||||
rootBuildDir.resolve("compose-reports").resolve(relativePath).let(reportsDestination::set)
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
[versions]
|
||||
agp_version = "8.5.2"
|
||||
agp_version = "8.6.0"
|
||||
lifecycle_version = "2.8.4"
|
||||
paging_version = "3.3.2"
|
||||
interpolator_version = "1.0.0"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[versions]
|
||||
kotlin_version = "2.0.20"
|
||||
serialization_version = "1.7.1"
|
||||
serialization_version = "1.7.2"
|
||||
xml_serialization_version = "0.86.3"
|
||||
|
||||
[libraries]
|
||||
|
@@ -12,7 +12,7 @@ spotless = "6.25.0"
|
||||
ktlint-core = "1.3.1"
|
||||
|
||||
[libraries]
|
||||
desugar = "com.android.tools:desugar_jdk_libs:2.1.0"
|
||||
desugar = "com.android.tools:desugar_jdk_libs:2.1.1"
|
||||
android-shortcut-gradle = "com.github.zellius:android-shortcut-gradle-plugin:0.1.2"
|
||||
google-services-gradle = "com.google.gms:google-services:4.4.2"
|
||||
|
||||
|
Reference in New Issue
Block a user