Skip to content

Commit 1a17131

Browse files
committed
dependency updates
1 parent b18d773 commit 1a17131

File tree

9 files changed

+76
-38
lines changed

9 files changed

+76
-38
lines changed

composeApp/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ kotlin {
1717
jvmToolchain(17)
1818

1919
wasmJs {
20-
moduleName = "composeApp"
2120
browser {
2221
commonWebpackConfig {
2322
outputFileName = "composeApp.js"
@@ -60,6 +59,7 @@ kotlin {
6059
implementation(compose.runtime)
6160
implementation(compose.foundation)
6261
implementation(compose.material3)
62+
implementation(compose.materialIconsExtended)
6363
implementation(compose.ui)
6464
implementation(compose.components.resources)
6565
implementation(compose.components.uiToolingPreview)

composeApp/src/androidMain/kotlin/dev/johnoreilly/climatetrace/di/Koin.android.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import android.content.Context
44
import dev.johnoreilly.climatetrace.remote.Country
55
import io.github.xxfast.kstore.KStore
66
import io.github.xxfast.kstore.file.storeOf
7-
import okio.Path.Companion.toPath
7+
import kotlinx.io.files.Path
88
import org.koin.android.ext.koin.androidContext
99
import org.koin.core.module.Module
1010
import org.koin.dsl.module
@@ -16,6 +16,6 @@ fun initKoin(context: Context) = initKoin(enableNetworkLogs = false) {
1616
actual fun dataModule(): Module = module {
1717
single<KStore<List<Country>>> {
1818
val filesDir: String = androidContext().filesDir.path
19-
storeOf(file = "$filesDir/countries.json".toPath(), default = emptyList())
19+
storeOf(file = Path(path = "$filesDir/countries.json"), default = emptyList())
2020
}
2121
}

composeApp/src/commonMain/kotlin/dev/johnoreilly/climatetrace/viewmodel/CountryListViewModel.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import com.rickclephas.kmp.observableviewmodel.ViewModel
66
import com.rickclephas.kmp.observableviewmodel.coroutineScope
77
import dev.johnoreilly.climatetrace.data.ClimateTraceRepository
88
import dev.johnoreilly.climatetrace.remote.Country
9+
import kotlinx.coroutines.flow.StateFlow
910
import kotlinx.coroutines.flow.asStateFlow
1011
import kotlinx.coroutines.launch
1112
import org.koin.core.component.KoinComponent
@@ -23,7 +24,7 @@ open class CountryListViewModel : ViewModel(), KoinComponent {
2324

2425
private val _viewState = MutableStateFlow<CountryListUIState>(viewModelScope, CountryListUIState.Loading)
2526
@NativeCoroutinesState
26-
val viewState = _viewState.asStateFlow()
27+
val viewState: StateFlow<CountryListUIState> = _viewState.asStateFlow()
2728

2829

2930
init {

composeApp/src/iosMain/kotlin/dev/johnoreilly/climatetrace/di/Koin.ios.kt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,28 @@ package dev.johnoreilly.climatetrace.di
33
import dev.johnoreilly.climatetrace.remote.Country
44
import io.github.xxfast.kstore.KStore
55
import io.github.xxfast.kstore.file.storeOf
6-
import io.github.xxfast.kstore.file.utils.DocumentDirectory
76
import io.github.xxfast.kstore.utils.ExperimentalKStoreApi
8-
import okio.Path.Companion.toPath
7+
import kotlinx.io.files.Path
98
import org.koin.core.module.Module
109
import org.koin.dsl.module
10+
import platform.Foundation.NSDocumentDirectory
1111
import platform.Foundation.NSFileManager
12+
import platform.Foundation.NSUserDomainMask
1213

1314
// called by iOS etc
1415
fun initKoin() = initKoin(enableNetworkLogs = false) {}
1516

1617
@OptIn(ExperimentalKStoreApi::class)
1718
actual fun dataModule(): Module = module {
1819
single<KStore<List<Country>>> {
19-
val filesDir: String? = NSFileManager.defaultManager.DocumentDirectory?.relativePath
20+
val filesDir: String? = NSFileManager.defaultManager.URLForDirectory(
21+
directory = NSDocumentDirectory,
22+
appropriateForURL = null,
23+
create = false,
24+
inDomain = NSUserDomainMask,
25+
error = null
26+
)?.relativePath
2027
requireNotNull(filesDir) { "Document directory not found" }
21-
storeOf(file = "$filesDir/countries.json".toPath(), default = emptyList())
28+
storeOf(file = Path(path = "$filesDir/countries.json"), default = emptyList())
2229
}
2330
}

composeApp/src/jvmMain/kotlin/dev/johnoreilly/climatetrace/di/Koin.desktop.kt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ package dev.johnoreilly.climatetrace.di
33
import dev.johnoreilly.climatetrace.remote.Country
44
import io.github.xxfast.kstore.KStore
55
import io.github.xxfast.kstore.file.storeOf
6-
import io.github.xxfast.kstore.file.utils.FILE_SYSTEM
6+
import kotlinx.io.files.Path
77
import net.harawata.appdirs.AppDirsFactory
8-
import okio.Path.Companion.toPath
98
import org.koin.core.module.Module
109
import org.koin.dsl.module
1110

@@ -17,9 +16,6 @@ actual fun dataModule(): Module = module {
1716
single<KStore<List<Country>>> {
1817
val filesDir: String = AppDirsFactory.getInstance()
1918
.getUserDataDir(PACKAGE_NAME, VERSION, AUTHOR)
20-
21-
FILE_SYSTEM.createDirectories(filesDir.toPath())
22-
23-
storeOf(file = "$filesDir/countries.json".toPath(), default = emptyList())
19+
storeOf(file = Path(path = "$filesDir/countries.json"), default = emptyList())
2420
}
2521
}

gradle/libs.versions.toml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
[versions]
2-
kotlin = "2.1.21"
3-
ksp = "2.1.21-2.0.1"
2+
kotlin = "2.2.0"
3+
ksp = "2.2.0-2.0.2"
44
kotlinx-coroutines = "1.10.2"
55

66

7-
agp = "8.9.3"
8-
android-compileSdk = "35"
7+
agp = "8.11.0"
8+
android-compileSdk = "36"
99
android-minSdk = "24"
10-
android-targetSdk = "35"
10+
android-targetSdk = "36"
1111
androidx-activityCompose = "1.10.1"
12-
compose = "1.8.2"
13-
compose-plugin = "1.7.3"
14-
composeAdaptiveLayout = "1.0.0"
15-
harawata-appdirs = "1.2.2"
16-
koalaplot = "0.5.3"
17-
koin = "4.0.4"
18-
koin-compose-multiplatform = "4.0.4"
19-
kmpNativeCoroutines = "1.0.0-ALPHA-38"
20-
kmpObservableViewModel = "1.0.0-BETA-7"
21-
kstore = "0.8.0"
22-
ktor = "3.1.1"
23-
treemapChart = "0.1.1"
12+
compose = "1.8.3"
13+
compose-plugin = "1.8.2"
14+
composeAdaptiveLayout = "1.1.2"
15+
harawata-appdirs = "1.4.0"
16+
koalaplot = "0.9.0"
17+
koin = "4.1.0"
18+
koin-compose-multiplatform = "4.1.0"
19+
kmpNativeCoroutines = "1.0.0-ALPHA-45"
20+
kmpObservableViewModel = "1.0.0-BETA-12"
21+
kstore = "1.0.0"
22+
ktor = "3.2.1"
23+
treemapChart = "0.1.3"
2424
voyager= "1.1.0-beta03"
25-
molecule = "2.0.0"
25+
molecule = "2.1.0"
2626
mcp = "0.5.0"
2727
shadowPlugin = "8.1.1"
2828

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME
Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
version = "1.3">
4-
<BuildAction>
3+
version = "1.7">
4+
<BuildAction
5+
parallelizeBuildables = "YES"
6+
buildImplicitDependencies = "YES">
57
<BuildActionEntries>
68
<BuildActionEntry
7-
buildForRunning = "YES">
9+
buildForTesting = "YES"
10+
buildForRunning = "YES"
11+
buildForProfiling = "YES"
12+
buildForArchiving = "YES"
13+
buildForAnalyzing = "YES">
814
<BuildableReference
915
BuildableIdentifier = "primary"
1016
BlueprintIdentifier = "7555FF7A242A565900829871"
@@ -15,11 +21,25 @@
1521
</BuildActionEntry>
1622
</BuildActionEntries>
1723
</BuildAction>
24+
<TestAction
25+
buildConfiguration = "Debug"
26+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
27+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
28+
shouldUseLaunchSchemeArgsEnv = "YES"
29+
shouldAutocreateTestPlan = "YES">
30+
</TestAction>
1831
<LaunchAction
19-
useCustomWorkingDirectory = "NO"
2032
buildConfiguration = "Debug"
33+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
34+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
35+
launchStyle = "0"
36+
useCustomWorkingDirectory = "NO"
37+
ignoresPersistentStateOnLaunch = "NO"
38+
debugDocumentVersioning = "YES"
39+
debugServiceExtension = "internal"
2140
allowLocationSimulation = "YES">
22-
<BuildableProductRunnable>
41+
<BuildableProductRunnable
42+
runnableDebuggingMode = "0">
2343
<BuildableReference
2444
BuildableIdentifier = "primary"
2545
BlueprintIdentifier = "7555FF7A242A565900829871"
@@ -29,4 +49,18 @@
2949
</BuildableReference>
3050
</BuildableProductRunnable>
3151
</LaunchAction>
52+
<ProfileAction
53+
buildConfiguration = "Release"
54+
shouldUseLaunchSchemeArgsEnv = "YES"
55+
savedToolIdentifier = ""
56+
useCustomWorkingDirectory = "NO"
57+
debugDocumentVersioning = "YES">
58+
</ProfileAction>
59+
<AnalyzeAction
60+
buildConfiguration = "Debug">
61+
</AnalyzeAction>
62+
<ArchiveAction
63+
buildConfiguration = "Release"
64+
revealArchiveInOrganizer = "YES">
65+
</ArchiveAction>
3266
</Scheme>

0 commit comments

Comments
 (0)