backend implementation
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
/build
|
||||
/bin
|
||||
@@ -0,0 +1,16 @@
|
||||
plugins {
|
||||
alias(libs.plugins.convention.kmp)
|
||||
alias(libs.plugins.convention.android.lib)
|
||||
alias(libs.plugins.convention.serialization)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
sourceSets {
|
||||
val commonMain by getting {
|
||||
dependencies {
|
||||
implementation(project(":libs:base"))
|
||||
}
|
||||
}
|
||||
}
|
||||
android { namespace = "ru.shadowsparky.updater.common" }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package ru.shadowsparky.updater.domain
|
||||
|
||||
interface UpdateFetcher {
|
||||
suspend fun fetch(versionCode: Long): UpdateInfo
|
||||
|
||||
companion object {
|
||||
const val ARG_VERSION_CODE = "versionCode"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package ru.shadowsparky.updater.domain
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class UpdateInfo(
|
||||
val versionCode: Long? = null,
|
||||
val versionName: String? = null,
|
||||
val url: String? = null,
|
||||
val changelog: String? = null,
|
||||
val force: Boolean = false
|
||||
)
|
||||
Reference in New Issue
Block a user