diff --git a/androidApp/src/androidMain/kotlin/com/mbakgun/mj/di/ViewModelModule.kt b/androidApp/src/androidMain/kotlin/com/mbakgun/mj/di/ViewModelModule.kt index 3ffb9a0..f61ce8d 100644 --- a/androidApp/src/androidMain/kotlin/com/mbakgun/mj/di/ViewModelModule.kt +++ b/androidApp/src/androidMain/kotlin/com/mbakgun/mj/di/ViewModelModule.kt @@ -1,9 +1,9 @@ package com.mbakgun.mj.di -import org.koin.androidx.viewmodel.dsl.viewModel +import org.koin.core.module.dsl.viewModelOf import org.koin.dsl.module import ui.MjImagesViewModel val viewModelModule = module { - viewModel { MjImagesViewModel(get(), get()) } + viewModelOf(::MjImagesViewModel) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b1e45ae..5a5b6a1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] androidxUiTest = "1.7.2" koin = "4.0.0" -ktorClient = "3.0.0-wasm2" +ktorClient = "3.0.0-rc-1" kotlinxCoroutines = "1.9.0" coil3 = "3.0.0-alpha10" lifecycleRuntimeAndroid = "2.8.6" @@ -16,7 +16,7 @@ androidxUiTestJunit4 = { module = "androidx.compose.ui:ui-test-junit4", version. androidxUiTestManifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref="androidxUiTest" } coil-compose = { module = "io.coil-kt.coil3:coil-compose", version.ref = "coil3" } coil-compose-core = { module = "io.coil-kt.coil3:coil-compose-core", version.ref = "coil3" } -coil-network-ktor = { module = "io.coil-kt.coil3:coil-network-ktor", version = "3.0.0-alpha08" } +coil-network-ktor = { module = "io.coil-kt.coil3:coil-network-ktor3", version.ref = "coil3" } coil-mp = { module = "io.coil-kt.coil3:coil", version.ref = "coil3" } koin = { module = "io.insert-koin:koin-android", version.ref="koin" } koinCore = { module = "io.insert-koin:koin-core", version.ref="koin" } diff --git a/iosApp/iosApp.xcodeproj/project.pbxproj b/iosApp/iosApp.xcodeproj/project.pbxproj index 2a73d61..6a5c8bd 100644 --- a/iosApp/iosApp.xcodeproj/project.pbxproj +++ b/iosApp/iosApp.xcodeproj/project.pbxproj @@ -114,7 +114,7 @@ 7555FF77242A565900829871 /* Sources */, 7555FF79242A565900829871 /* Resources */, F85CB1118929364A9C6EFABC /* Frameworks */, - C877D71ACD5B166AF7D12427 /* [CP] Copy Pods Resources */, + 0C1DA9E2FF4F7B3D594DCA1A /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -171,43 +171,43 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 98D614C51D2DA07C614CC46E /* [CP] Check Pods Manifest.lock */ = { + 0C1DA9E2FF4F7B3D594DCA1A /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Copy Pods Resources"; outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-iosApp-checkManifestLockResult.txt", + "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources.sh\"\n"; showEnvVarsInLog = 0; }; - C877D71ACD5B166AF7D12427 /* [CP] Copy Pods Resources */ = { + 98D614C51D2DA07C614CC46E /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Copy Pods Resources"; + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-iosApp-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-iosApp/Pods-iosApp-resources.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index 6cebdc2..c80f602 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -1,4 +1,6 @@ -import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl +@file:OptIn(ExperimentalWasmDsl::class) + +import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl plugins { kotlin("multiplatform") @@ -23,7 +25,6 @@ kotlin { binaries.executable() } - @OptIn(ExperimentalWasmDsl::class) wasmJs { browser() binaries.executable() @@ -158,8 +159,3 @@ kotlin { } } } - -compose.experimental { - web.application { - } -} diff --git a/wasmApp/build.gradle.kts b/wasmApp/build.gradle.kts index 24471f4..1263e2b 100755 --- a/wasmApp/build.gradle.kts +++ b/wasmApp/build.gradle.kts @@ -1,4 +1,4 @@ -import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl +import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl plugins { kotlin("multiplatform") @@ -22,8 +22,3 @@ kotlin { } } } - -compose.experimental { - web.application { - } -} diff --git a/webApp/build.gradle.kts b/webApp/build.gradle.kts index 90c7270..f1658e2 100755 --- a/webApp/build.gradle.kts +++ b/webApp/build.gradle.kts @@ -6,11 +6,15 @@ plugins { kotlin { js(IR) { - browser() + browser { + commonWebpackConfig { + configDirectory = file(".") + } + } binaries.executable() } sourceSets { - val jsMain by getting { + val jsMain by getting { dependencies { implementation(compose.runtime) implementation(compose.foundation) @@ -19,8 +23,3 @@ kotlin { } } } - -compose.experimental { - web.application { - } -} diff --git a/webApp/webpack.config.js b/webApp/webpack.config.js new file mode 100644 index 0000000..a0e7ef7 --- /dev/null +++ b/webApp/webpack.config.js @@ -0,0 +1,15 @@ +const TerserPlugin = require("terser-webpack-plugin"); + +config.optimization = config.optimization || {}; +config.optimization.minimize = true; +config.optimization.minimizer = [ + new TerserPlugin({ + terserOptions: { + mangle: true, + compress: false, + output: { + beautify: false, + }, + }, + }), +]; \ No newline at end of file