lib updates
This commit is contained in:
+28
-51
@@ -1,10 +1,7 @@
|
||||
import com.android.build.api.dsl.ManagedVirtualDevice
|
||||
import org.jetbrains.compose.ExperimentalComposeLibrary
|
||||
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSetTree
|
||||
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
|
||||
import java.util.*
|
||||
|
||||
@@ -17,9 +14,28 @@ plugins {
|
||||
}
|
||||
|
||||
kotlin {
|
||||
androidTarget {
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_21)
|
||||
}
|
||||
}
|
||||
|
||||
listOf(
|
||||
iosX64(),
|
||||
iosArm64(),
|
||||
iosSimulatorArm64()
|
||||
).forEach { iosTarget ->
|
||||
iosTarget.binaries.framework {
|
||||
baseName = "ComposeApp"
|
||||
isStatic = true
|
||||
}
|
||||
}
|
||||
|
||||
jvm()
|
||||
|
||||
@OptIn(ExperimentalWasmDsl::class)
|
||||
wasmJs {
|
||||
moduleName = "composeApp"
|
||||
outputModuleName = "composeApp"
|
||||
browser {
|
||||
val rootDirPath = project.rootDir.path
|
||||
val projectDirPath = project.projectDir.path
|
||||
@@ -37,34 +53,6 @@ kotlin {
|
||||
binaries.executable()
|
||||
}
|
||||
|
||||
androidTarget {
|
||||
compilations.all {
|
||||
compileTaskProvider {
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_17)
|
||||
//https://jakewharton.com/gradle-toolchains-are-rarely-a-good-idea/#what-do-i-do
|
||||
freeCompilerArgs.add("-Xjdk-release=${JavaVersion.VERSION_17}")
|
||||
}
|
||||
}
|
||||
}
|
||||
//https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-test.html
|
||||
@OptIn(ExperimentalKotlinGradlePluginApi::class)
|
||||
instrumentedTestVariant.sourceSetTree.set(KotlinSourceSetTree.test)
|
||||
}
|
||||
|
||||
jvm()
|
||||
|
||||
listOf(
|
||||
iosX64(),
|
||||
iosArm64(),
|
||||
iosSimulatorArm64()
|
||||
).forEach {
|
||||
it.binaries.framework {
|
||||
baseName = "ComposeApp"
|
||||
isStatic = true
|
||||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
commonMain.dependencies {
|
||||
implementation(compose.runtime)
|
||||
@@ -72,7 +60,6 @@ kotlin {
|
||||
implementation(compose.material3)
|
||||
implementation(compose.materialIconsExtended)
|
||||
implementation(compose.components.resources)
|
||||
implementation(compose.components.uiToolingPreview)
|
||||
implementation(libs.voyager.navigator)
|
||||
implementation(libs.voyager.transitions)
|
||||
implementation(libs.coil)
|
||||
@@ -140,20 +127,14 @@ android {
|
||||
applicationId = "dev.meloda.overseerr"
|
||||
versionCode = 1
|
||||
versionName = "1.0.0"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
//https://developer.android.com/studio/test/gradle-managed-devices
|
||||
@Suppress("UnstableApiUsage")
|
||||
testOptions {
|
||||
managedDevices.devices {
|
||||
maybeCreate<ManagedVirtualDevice>("pixel5").apply {
|
||||
device = "Pixel 5"
|
||||
apiLevel = 34
|
||||
systemImageSource = "aosp"
|
||||
}
|
||||
|
||||
packaging {
|
||||
resources {
|
||||
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
||||
}
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
val keystoreProperties = Properties()
|
||||
@@ -188,19 +169,15 @@ android {
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
sourceCompatibility = JavaVersion.VERSION_21
|
||||
targetCompatibility = JavaVersion.VERSION_21
|
||||
}
|
||||
}
|
||||
|
||||
//https://developer.android.com/develop/ui/compose/testing#setup
|
||||
dependencies {
|
||||
androidTestImplementation(libs.androidx.uitest.junit4)
|
||||
debugImplementation(libs.androidx.uitest.testManifest)
|
||||
//temporary fix: https://youtrack.jetbrains.com/issue/CMP-5864
|
||||
androidTestImplementation("androidx.test:monitor") {
|
||||
version { strictly("1.6.1") }
|
||||
}
|
||||
debugImplementation(compose.uiTooling)
|
||||
}
|
||||
|
||||
compose.desktop {
|
||||
|
||||
+2
-2
@@ -3,11 +3,11 @@ package dev.meloda.overseerr.settings.model
|
||||
import dev.meloda.overseerr.appDir
|
||||
import io.github.xxfast.kstore.KStore
|
||||
import io.github.xxfast.kstore.file.storeOf
|
||||
import okio.Path.Companion.toPath
|
||||
import kotlinx.io.files.Path
|
||||
|
||||
actual class SettingsStoreProvider actual constructor() {
|
||||
|
||||
actual fun provideStore(): KStore<AppSettings> {
|
||||
return storeOf(file = "$appDir/app_settings.json".toPath())
|
||||
return storeOf(file = Path("$appDir/app_settings.json"))
|
||||
}
|
||||
}
|
||||
|
||||
+4
-6
@@ -22,9 +22,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import cafe.adriel.voyager.core.screen.Screen
|
||||
import cafe.adriel.voyager.navigator.LocalNavigator
|
||||
import cafe.adriel.voyager.navigator.currentOrThrow
|
||||
import dev.chrisbanes.haze.HazeState
|
||||
import dev.chrisbanes.haze.haze
|
||||
import dev.chrisbanes.haze.hazeChild
|
||||
import dev.chrisbanes.haze.*
|
||||
import dev.chrisbanes.haze.materials.ExperimentalHazeMaterialsApi
|
||||
import dev.chrisbanes.haze.materials.HazeMaterials
|
||||
import dev.meloda.overseerr.screens.requests.RequestsViewModel
|
||||
@@ -78,7 +76,7 @@ class RequestsScreen : Screen {
|
||||
},
|
||||
colors = TopAppBarDefaults.topAppBarColors(containerColor = Color.Transparent),
|
||||
modifier = Modifier
|
||||
.hazeChild(
|
||||
.hazeEffect(
|
||||
state = hazeState,
|
||||
style = hazeStyle
|
||||
).fillMaxWidth(),
|
||||
@@ -106,7 +104,7 @@ class RequestsScreen : Screen {
|
||||
LazyColumn(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.haze(state = hazeState)
|
||||
.hazeSource(state = hazeState)
|
||||
.pullToRefresh(
|
||||
isRefreshing = screenState.isLoading,
|
||||
state = refreshState,
|
||||
@@ -159,7 +157,7 @@ class RequestsScreen : Screen {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.align(Alignment.BottomCenter)
|
||||
.hazeChild(
|
||||
.hazeEffect(
|
||||
state = hazeState,
|
||||
style = hazeStyle
|
||||
)
|
||||
|
||||
+2
-2
@@ -3,10 +3,10 @@ package dev.meloda.overseerr.settings.model
|
||||
import dev.meloda.overseerr.appDir
|
||||
import io.github.xxfast.kstore.KStore
|
||||
import io.github.xxfast.kstore.file.storeOf
|
||||
import okio.Path.Companion.toPath
|
||||
import kotlinx.io.files.Path
|
||||
|
||||
actual class SettingsStoreProvider actual constructor() {
|
||||
actual fun provideStore(): KStore<AppSettings> {
|
||||
return storeOf(file = "$appDir/app_settings.json".toPath())
|
||||
return storeOf(file = Path("$appDir/app_settings.json"))
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -3,10 +3,10 @@ package dev.meloda.overseerr.settings.model
|
||||
import dev.meloda.overseerr.appDir
|
||||
import io.github.xxfast.kstore.KStore
|
||||
import io.github.xxfast.kstore.file.storeOf
|
||||
import okio.Path.Companion.toPath
|
||||
import kotlinx.io.files.Path
|
||||
|
||||
actual class SettingsStoreProvider actual constructor() {
|
||||
actual fun provideStore(): KStore<AppSettings> {
|
||||
return storeOf(file = "$appDir/app_settings.json".toPath())
|
||||
return storeOf(file = Path("$appDir/app_settings.json"))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ fun main() = application {
|
||||
state = rememberWindowState(width = 800.dp, height = 600.dp),
|
||||
onCloseRequest = ::exitApplication
|
||||
) {
|
||||
window.minimumSize = Dimension(350, 600)
|
||||
window.minimumSize = Dimension(360, 600)
|
||||
App()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user