ios flavour

This commit is contained in:
tapframe 2026-04-04 22:10:32 +05:30
parent 4e57a8eb72
commit 7143f14779
13 changed files with 86 additions and 8 deletions

View file

@ -87,6 +87,20 @@ val releaseStorePassword = supabaseProps.getProperty("NUVIO_RELEASE_STORE_PASSWO
val releaseKeyAlias = supabaseProps.getProperty("NUVIO_RELEASE_KEY_ALIAS")?.takeIf { it.isNotBlank() }
val releaseKeyPassword = supabaseProps.getProperty("NUVIO_RELEASE_KEY_PASSWORD")?.takeIf { it.isNotBlank() }
val releaseKeystore = releaseStoreFile?.let(rootProject::file)
val iosDistribution = (
providers.gradleProperty("nuvio.ios.distribution").orNull
?: System.getenv("NUVIO_IOS_DISTRIBUTION")
?: supabaseProps.getProperty("NUVIO_IOS_DISTRIBUTION")
?: "appstore"
).trim().lowercase()
require(iosDistribution == "appstore" || iosDistribution == "full") {
"NUVIO_IOS_DISTRIBUTION must be 'appstore' or 'full'."
}
val iosDistributionSourceDir = if (iosDistribution == "full") {
"src/iosFull/kotlin"
} else {
"src/iosAppStore/kotlin"
}
val generatedRuntimeConfigDir = layout.buildDirectory.dir("generated/runtime-config/kotlin")
val generateRuntimeConfigs = tasks.register<GenerateRuntimeConfigsTask>("generateRuntimeConfigs") {
@ -118,6 +132,15 @@ kotlin {
compilerOpts("-I${project.projectDir}/src/nativeInterop/cinterop")
}
}
defaultSourceSet.kotlin.srcDir(project.file(iosDistributionSourceDir))
defaultSourceSet.dependencies {
implementation(libs.ktor.client.darwin)
if (iosDistribution == "full") {
implementation(libs.quickjs.kt)
implementation(libs.ksoup)
}
}
}
iosTarget.binaries.framework {
@ -172,11 +195,6 @@ kotlin {
implementation(libs.supabase.functions)
implementation(libs.reorderable)
}
iosMain.dependencies {
implementation(libs.ktor.client.darwin)
implementation(libs.quickjs.kt)
implementation(libs.ksoup)
}
commonTest.dependencies {
implementation(libs.kotlin.test)
}
@ -184,9 +202,11 @@ kotlin {
}
afterEvaluate {
dependencies {
add("androidFullImplementation", libs.quickjs.kt)
add("androidFullImplementation", libs.ksoup)
if (iosDistribution == "full") {
dependencies {
add("androidFullImplementation", libs.quickjs.kt)
add("androidFullImplementation", libs.ksoup)
}
}
}

View file

@ -0,0 +1,48 @@
package com.nuvio.app.features.plugins
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
actual object PluginRepository {
private val disabledState = MutableStateFlow(PluginsUiState(pluginsEnabled = false))
actual val uiState: StateFlow<PluginsUiState> = disabledState.asStateFlow()
actual fun initialize() = Unit
actual fun onProfileChanged(profileId: Int) = Unit
actual fun clearLocalState() = Unit
actual suspend fun pullFromServer(profileId: Int) = Unit
actual suspend fun addRepository(rawUrl: String): AddPluginRepositoryResult =
AddPluginRepositoryResult.Error("Plugins are not available in this build.")
actual fun removeRepository(manifestUrl: String) = Unit
actual fun refreshAll() = Unit
actual fun refreshRepository(manifestUrl: String, pushAfterRefresh: Boolean) = Unit
actual fun toggleScraper(scraperId: String, enabled: Boolean) = Unit
actual fun setPluginsEnabled(enabled: Boolean) = Unit
actual fun setGroupStreamsByRepository(enabled: Boolean) = Unit
actual fun getEnabledScrapersForType(type: String): List<PluginScraper> = emptyList()
actual suspend fun testScraper(scraperId: String): Result<List<PluginRuntimeResult>> =
Result.failure(UnsupportedOperationException("Plugins are not available in this build."))
actual suspend fun executeScraper(
scraper: PluginScraper,
tmdbId: String,
mediaType: String,
season: Int?,
episode: Int?,
): Result<List<PluginRuntimeResult>> =
Result.failure(UnsupportedOperationException("Plugins are not available in this build."))
}

View file

@ -0,0 +1,5 @@
package com.nuvio.app.features.settings
import androidx.compose.foundation.lazy.LazyListScope
internal actual fun LazyListScope.pluginsSettingsContent() = Unit

View file

@ -0,0 +1,5 @@
package com.nuvio.app.features.trailer
actual object TrailerPlaybackResolver {
actual suspend fun resolveFromYouTubeUrl(youtubeUrl: String): TrailerPlaybackSource? = null
}