diff --git a/.templates/mvvm/{{.module_path.lowercase()}}/src/main/AndroidManifest.xml b/.templates/mvvm/{{.module_path.lowercase()}}/src/androidMain/AndroidManifest.xml similarity index 100% rename from .templates/mvvm/{{.module_path.lowercase()}}/src/main/AndroidManifest.xml rename to .templates/mvvm/{{.module_path.lowercase()}}/src/androidMain/AndroidManifest.xml diff --git a/.templates/mvvm/{{.module_path.lowercase()}}/src/main/kotlin/AndroidPlugin.kt b/.templates/mvvm/{{.module_path.lowercase()}}/src/androidMain/kotlin/AndroidPlugin.kt similarity index 100% rename from .templates/mvvm/{{.module_path.lowercase()}}/src/main/kotlin/AndroidPlugin.kt rename to .templates/mvvm/{{.module_path.lowercase()}}/src/androidMain/kotlin/AndroidPlugin.kt diff --git a/.templates/mvvm/{{.module_path.lowercase()}}/src/main/kotlin/ui/{{.ui_mvvm_name}}ViewFragment.kt b/.templates/mvvm/{{.module_path.lowercase()}}/src/androidMain/kotlin/ui/{{.ui_mvvm_name}}ViewFragment.kt similarity index 100% rename from .templates/mvvm/{{.module_path.lowercase()}}/src/main/kotlin/ui/{{.ui_mvvm_name}}ViewFragment.kt rename to .templates/mvvm/{{.module_path.lowercase()}}/src/androidMain/kotlin/ui/{{.ui_mvvm_name}}ViewFragment.kt diff --git a/core/src/main/AndroidManifest.xml b/core/src/androidMain/AndroidManifest.xml similarity index 100% rename from core/src/main/AndroidManifest.xml rename to core/src/androidMain/AndroidManifest.xml diff --git a/core/src/main/kotlin/AndroidNavigationHost.kt b/core/src/androidMain/kotlin/AndroidNavigationHost.kt similarity index 100% rename from core/src/main/kotlin/AndroidNavigationHost.kt rename to core/src/androidMain/kotlin/AndroidNavigationHost.kt diff --git a/core/src/main/kotlin/AndroidSPConfigsRepo.kt b/core/src/androidMain/kotlin/AndroidSPConfigsRepo.kt similarity index 100% rename from core/src/main/kotlin/AndroidSPConfigsRepo.kt rename to core/src/androidMain/kotlin/AndroidSPConfigsRepo.kt diff --git a/core/src/main/kotlin/FragmentsClassesFactory.kt b/core/src/androidMain/kotlin/FragmentsClassesFactory.kt similarity index 100% rename from core/src/main/kotlin/FragmentsClassesFactory.kt rename to core/src/androidMain/kotlin/FragmentsClassesFactory.kt diff --git a/core/src/main/kotlin/PackageInfo.kt b/core/src/androidMain/kotlin/PackageInfo.kt similarity index 100% rename from core/src/main/kotlin/PackageInfo.kt rename to core/src/androidMain/kotlin/PackageInfo.kt diff --git a/core/src/main/kotlin/TagExtensions.kt b/core/src/androidMain/kotlin/TagExtensions.kt similarity index 100% rename from core/src/main/kotlin/TagExtensions.kt rename to core/src/androidMain/kotlin/TagExtensions.kt diff --git a/core/src/main/kotlin/fragments/AndroidFragmentNode.kt b/core/src/androidMain/kotlin/fragments/AndroidFragmentNode.kt similarity index 100% rename from core/src/main/kotlin/fragments/AndroidFragmentNode.kt rename to core/src/androidMain/kotlin/fragments/AndroidFragmentNode.kt diff --git a/core/src/main/kotlin/fragments/AndroidNavigationNodeFactory.kt b/core/src/androidMain/kotlin/fragments/AndroidNavigationNodeFactory.kt similarity index 100% rename from core/src/main/kotlin/fragments/AndroidNavigationNodeFactory.kt rename to core/src/androidMain/kotlin/fragments/AndroidNavigationNodeFactory.kt diff --git a/core/src/main/kotlin/fragments/NodeFragment.kt b/core/src/androidMain/kotlin/fragments/NodeFragment.kt similarity index 100% rename from core/src/main/kotlin/fragments/NodeFragment.kt rename to core/src/androidMain/kotlin/fragments/NodeFragment.kt diff --git a/core/src/main/kotlin/fragments/view/NavigationFragmentContainerView.kt b/core/src/androidMain/kotlin/fragments/view/NavigationFragmentContainerView.kt similarity index 100% rename from core/src/main/kotlin/fragments/view/NavigationFragmentContainerView.kt rename to core/src/androidMain/kotlin/fragments/view/NavigationFragmentContainerView.kt diff --git a/core/src/main/res/values/attrs.xml b/core/src/androidMain/res/values/attrs.xml similarity index 100% rename from core/src/main/res/values/attrs.xml rename to core/src/androidMain/res/values/attrs.xml diff --git a/defaultAndroidSettings.gradle b/defaultAndroidSettings.gradle index 1902595a..137fcb5b 100644 --- a/defaultAndroidSettings.gradle +++ b/defaultAndroidSettings.gradle @@ -55,10 +55,6 @@ android { targetCompatibility JavaVersion.VERSION_1_8 } - kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8.toString() - } - sourceSets { String sep = File.separator main.java.srcDirs += "src${sep}main${sep}kotlin" diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9116c095..9e55ff7a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,15 +1,15 @@ [versions] -kotlin = "1.8.22" +kotlin = "1.9.0" kotlin-coroutines = "1.7.3" kotlin-serialization = "1.5.1" dokka = "1.8.20" -microutils = "0.19.8" -kslog = "1.1.1" -uuid = "0.7.1" +microutils = "0.20.0" +kslog = "1.2.0" +uuid = "0.8.0" -koin = "3.4.2" +koin = "3.4.3" compose = "1.4.3" dexcount = "4.0.0" diff --git a/mppProjectWithSerialization.gradle b/mppProjectWithSerialization.gradle index 2a92bfb6..508acddd 100644 --- a/mppProjectWithSerialization.gradle +++ b/mppProjectWithSerialization.gradle @@ -43,7 +43,7 @@ kotlin { implementation libs.kotlin.test.junit } } - androidTest { + androidUnitTest { dependencies { implementation libs.kotlin.test.junit implementation libs.android.test.junit diff --git a/mvvm/src/main/AndroidManifest.xml b/mvvm/src/androidMain/AndroidManifest.xml similarity index 100% rename from mvvm/src/main/AndroidManifest.xml rename to mvvm/src/androidMain/AndroidManifest.xml diff --git a/mvvm/src/main/kotlin/InitNavigation.kt b/mvvm/src/androidMain/kotlin/InitNavigation.kt similarity index 100% rename from mvvm/src/main/kotlin/InitNavigation.kt rename to mvvm/src/androidMain/kotlin/InitNavigation.kt diff --git a/mvvm/src/main/kotlin/NavigationFragmentComposePlace.kt b/mvvm/src/androidMain/kotlin/NavigationFragmentComposePlace.kt similarity index 100% rename from mvvm/src/main/kotlin/NavigationFragmentComposePlace.kt rename to mvvm/src/androidMain/kotlin/NavigationFragmentComposePlace.kt diff --git a/mvvm/src/main/kotlin/NavigationFragmentInfoProvider.kt b/mvvm/src/androidMain/kotlin/NavigationFragmentInfoProvider.kt similarity index 100% rename from mvvm/src/main/kotlin/NavigationFragmentInfoProvider.kt rename to mvvm/src/androidMain/kotlin/NavigationFragmentInfoProvider.kt diff --git a/mvvm/src/main/kotlin/NavigationMVVMSingleActivity.kt b/mvvm/src/androidMain/kotlin/NavigationMVVMSingleActivity.kt similarity index 100% rename from mvvm/src/main/kotlin/NavigationMVVMSingleActivity.kt rename to mvvm/src/androidMain/kotlin/NavigationMVVMSingleActivity.kt diff --git a/mvvm/src/main/kotlin/ViewFragment.kt b/mvvm/src/androidMain/kotlin/ViewFragment.kt similarity index 100% rename from mvvm/src/main/kotlin/ViewFragment.kt rename to mvvm/src/androidMain/kotlin/ViewFragment.kt diff --git a/mvvm/src/main/res/layout/activity_main.xml b/mvvm/src/androidMain/res/layout/activity_main.xml similarity index 100% rename from mvvm/src/main/res/layout/activity_main.xml rename to mvvm/src/androidMain/res/layout/activity_main.xml diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/androidMain/AndroidManifest.xml similarity index 100% rename from sample/src/main/AndroidManifest.xml rename to sample/src/androidMain/AndroidManifest.xml diff --git a/sample/src/main/kotlin/AndroidPlugin.kt b/sample/src/androidMain/kotlin/AndroidPlugin.kt similarity index 100% rename from sample/src/main/kotlin/AndroidPlugin.kt rename to sample/src/androidMain/kotlin/AndroidPlugin.kt diff --git a/sample/src/main/kotlin/MainActivity.kt b/sample/src/androidMain/kotlin/MainActivity.kt similarity index 100% rename from sample/src/main/kotlin/MainActivity.kt rename to sample/src/androidMain/kotlin/MainActivity.kt diff --git a/sample/src/main/kotlin/ui/LoadingFragment.kt b/sample/src/androidMain/kotlin/ui/LoadingFragment.kt similarity index 100% rename from sample/src/main/kotlin/ui/LoadingFragment.kt rename to sample/src/androidMain/kotlin/ui/LoadingFragment.kt diff --git a/sample/src/main/kotlin/ui/NavigationViewFragment.kt b/sample/src/androidMain/kotlin/ui/NavigationViewFragment.kt similarity index 70% rename from sample/src/main/kotlin/ui/NavigationViewFragment.kt rename to sample/src/androidMain/kotlin/ui/NavigationViewFragment.kt index 1742e7db..bb27b305 100644 --- a/sample/src/main/kotlin/ui/NavigationViewFragment.kt +++ b/sample/src/androidMain/kotlin/ui/NavigationViewFragment.kt @@ -1,16 +1,19 @@ package dev.inmo.navigation.sample.ui +import androidx.compose.foundation.background import androidx.compose.foundation.layout.* import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items -import androidx.compose.material3.Button -import androidx.compose.material3.IconButton -import androidx.compose.material3.OutlinedButton -import androidx.compose.material3.Text +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.KeyboardArrowDown +import androidx.compose.material3.* import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color import androidx.compose.ui.res.stringResource +import androidx.compose.ui.unit.dp +import dev.inmo.navigation.core.NavigationNodeState import dev.inmo.navigation.mvvm.NavigationFragmentComposePlace import dev.inmo.navigation.mvvm.ViewFragment import dev.inmo.navigation.sample.R @@ -26,14 +29,14 @@ class NavigationViewFragment : ViewFragment