From 7f8e556ca672e60e8d8f2ab0d11bdae625cf92d4 Mon Sep 17 00:00:00 2001 From: Sergio Belda Galbis Date: Fri, 19 Apr 2024 20:23:14 +0200 Subject: [PATCH] Navigation compose multiplatform support for `:navigation-compose-extended` (#33) --- gradle.properties | 36 +- gradle/libs.versions.toml | 13 +- navigation-compose-extended/build.gradle.kts | 53 ++- .../navigation/compose/extended/NavAction.kt | 23 +- .../navigation/compose/extended/NavArgs.kt | 0 .../compose/extended/NavArgumentKey.kt | 0 .../compose/extended/NavDestination.kt | 8 +- .../compose/extended/NavGraphBuilder.kt | 1 + .../navigation/compose/extended/NavHost.kt | 0 .../navigation/compose/extended/NavRoute.kt | 0 .../compose/extended/RouteConstants.kt | 0 .../src/main/AndroidManifest.xml | 2 - .../src/main/AndroidManifest.xml | 12 +- .../annotations/ui/settings/SettingsScreen.kt | 5 +- .../sample/annotations/ui/theme/Theme.kt | 44 --- .../sample/annotations/ui/theme/Type.kt | 50 --- sample-app/build.gradle.kts | 73 +++- .../{main => androidMain}/AndroidManifest.xml | 0 .../extended/sample/ui/main/MainActivity.kt | 6 +- .../drawable-v24/ic_launcher_foreground.xml | 0 .../res/drawable/ic_launcher_background.xml | 0 .../res/mipmap-anydpi-v26/ic_launcher.xml | 0 .../mipmap-anydpi-v26/ic_launcher_round.xml | 0 .../res/mipmap-hdpi/ic_launcher.webp | Bin .../res/mipmap-hdpi/ic_launcher_round.webp | Bin .../res/mipmap-mdpi/ic_launcher.webp | Bin .../res/mipmap-mdpi/ic_launcher_round.webp | Bin .../res/mipmap-xhdpi/ic_launcher.webp | Bin .../res/mipmap-xhdpi/ic_launcher_round.webp | Bin .../res/mipmap-xxhdpi/ic_launcher.webp | Bin .../res/mipmap-xxhdpi/ic_launcher_round.webp | Bin .../res/mipmap-xxxhdpi/ic_launcher.webp | Bin .../res/mipmap-xxxhdpi/ic_launcher_round.webp | Bin .../res/values/strings.xml | 0 .../res/values/themes.xml | 0 .../extended/sample/ui/SampleAppNavHost.kt} | 4 +- .../sample/ui/home/HomeNavDestination.kt | 0 .../extended/sample/ui/home/HomeScreen.kt | 11 +- .../sample/ui/search/SearchNavDestination.kt | 0 .../initial/SearchInitialNavDestination.kt | 0 .../ui/search/initial/SearchInitialScreen.kt | 10 +- .../search/result/SearchResultNavigation.kt | 0 .../ui/search/result/SearchResultScreen.kt | 4 +- .../ui/settings/SettingsNavDestination.kt | 0 .../sample/ui/settings/SettingsScreen.kt | 0 .../yourlibrary/YourLibraryNavDestination.kt | 0 .../ui/yourlibrary/YourLibraryScreen.kt | 4 +- .../compose/extended/sample/ui/main/Main.kt | 22 +- .../compose/extended/sample/ui/main/Main.kt} | 16 +- .../compose/extended/sample/ui/theme/Theme.kt | 73 ---- .../compose/extended/sample/ui/theme/Type.kt | 50 --- .../sampleiOSApp.xcodeproj/project.pbxproj | 374 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../UserInterfaceState.xcuserstate | Bin 0 -> 21327 bytes .../xcschemes/xcschememanagement.plist | 14 + .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 13 + .../Assets.xcassets/Contents.json | 6 + sampleiOSApp/sampleiOSApp/ContentView.swift | 24 ++ .../Preview Assets.xcassets/Contents.json | 6 + .../sampleiOSApp/sampleiOSAppApp.swift | 17 + settings.gradle.kts | 3 +- 63 files changed, 658 insertions(+), 345 deletions(-) rename navigation-compose-extended/src/{main => commonMain}/kotlin/dev/sergiobelda/navigation/compose/extended/NavAction.kt (83%) rename navigation-compose-extended/src/{main => commonMain}/kotlin/dev/sergiobelda/navigation/compose/extended/NavArgs.kt (100%) rename navigation-compose-extended/src/{main => commonMain}/kotlin/dev/sergiobelda/navigation/compose/extended/NavArgumentKey.kt (100%) rename navigation-compose-extended/src/{main => commonMain}/kotlin/dev/sergiobelda/navigation/compose/extended/NavDestination.kt (95%) rename navigation-compose-extended/src/{main => commonMain}/kotlin/dev/sergiobelda/navigation/compose/extended/NavGraphBuilder.kt (99%) rename navigation-compose-extended/src/{main => commonMain}/kotlin/dev/sergiobelda/navigation/compose/extended/NavHost.kt (100%) rename navigation-compose-extended/src/{main => commonMain}/kotlin/dev/sergiobelda/navigation/compose/extended/NavRoute.kt (100%) rename navigation-compose-extended/src/{main => commonMain}/kotlin/dev/sergiobelda/navigation/compose/extended/RouteConstants.kt (100%) delete mode 100644 navigation-compose-extended/src/main/AndroidManifest.xml delete mode 100644 sample-app-annotations/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/annotations/ui/theme/Type.kt rename sample-app/src/{main => androidMain}/AndroidManifest.xml (100%) rename sample-app/src/{main => androidMain}/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/main/MainActivity.kt (87%) rename sample-app/src/{main => androidMain}/res/drawable-v24/ic_launcher_foreground.xml (100%) rename sample-app/src/{main => androidMain}/res/drawable/ic_launcher_background.xml (100%) rename sample-app/src/{main => androidMain}/res/mipmap-anydpi-v26/ic_launcher.xml (100%) rename sample-app/src/{main => androidMain}/res/mipmap-anydpi-v26/ic_launcher_round.xml (100%) rename sample-app/src/{main => androidMain}/res/mipmap-hdpi/ic_launcher.webp (100%) rename sample-app/src/{main => androidMain}/res/mipmap-hdpi/ic_launcher_round.webp (100%) rename sample-app/src/{main => androidMain}/res/mipmap-mdpi/ic_launcher.webp (100%) rename sample-app/src/{main => androidMain}/res/mipmap-mdpi/ic_launcher_round.webp (100%) rename sample-app/src/{main => androidMain}/res/mipmap-xhdpi/ic_launcher.webp (100%) rename sample-app/src/{main => androidMain}/res/mipmap-xhdpi/ic_launcher_round.webp (100%) rename sample-app/src/{main => androidMain}/res/mipmap-xxhdpi/ic_launcher.webp (100%) rename sample-app/src/{main => androidMain}/res/mipmap-xxhdpi/ic_launcher_round.webp (100%) rename sample-app/src/{main => androidMain}/res/mipmap-xxxhdpi/ic_launcher.webp (100%) rename sample-app/src/{main => androidMain}/res/mipmap-xxxhdpi/ic_launcher_round.webp (100%) rename sample-app/src/{main => androidMain}/res/values/strings.xml (100%) rename sample-app/src/{main => androidMain}/res/values/themes.xml (100%) rename sample-app/src/{main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/main/MainScreen.kt => commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/SampleAppNavHost.kt} (95%) rename sample-app/src/{main => commonMain}/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/home/HomeNavDestination.kt (100%) rename sample-app/src/{main => commonMain}/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/home/HomeScreen.kt (94%) rename sample-app/src/{main => commonMain}/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/SearchNavDestination.kt (100%) rename sample-app/src/{main => commonMain}/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/initial/SearchInitialNavDestination.kt (100%) rename sample-app/src/{main => commonMain}/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/initial/SearchInitialScreen.kt (88%) rename sample-app/src/{main => commonMain}/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/result/SearchResultNavigation.kt (100%) rename sample-app/src/{main => commonMain}/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/result/SearchResultScreen.kt (91%) rename sample-app/src/{main => commonMain}/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/settings/SettingsNavDestination.kt (100%) rename sample-app/src/{main => commonMain}/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/settings/SettingsScreen.kt (100%) rename sample-app/src/{main => commonMain}/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/yourlibrary/YourLibraryNavDestination.kt (100%) rename sample-app/src/{main => commonMain}/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/yourlibrary/YourLibraryScreen.kt (85%) rename sample-app-annotations/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/annotations/ui/theme/Color.kt => sample-app/src/desktopMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/main/Main.kt (59%) rename sample-app/src/{main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/theme/Color.kt => iosMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/main/Main.kt} (63%) delete mode 100644 sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/theme/Theme.kt delete mode 100644 sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/theme/Type.kt create mode 100644 sampleiOSApp/sampleiOSApp.xcodeproj/project.pbxproj create mode 100644 sampleiOSApp/sampleiOSApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 sampleiOSApp/sampleiOSApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 sampleiOSApp/sampleiOSApp.xcodeproj/project.xcworkspace/xcuserdata/sergiobelda.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 sampleiOSApp/sampleiOSApp.xcodeproj/xcuserdata/sergiobelda.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 sampleiOSApp/sampleiOSApp/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 sampleiOSApp/sampleiOSApp/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 sampleiOSApp/sampleiOSApp/Assets.xcassets/Contents.json create mode 100644 sampleiOSApp/sampleiOSApp/ContentView.swift create mode 100644 sampleiOSApp/sampleiOSApp/Preview Content/Preview Assets.xcassets/Contents.json create mode 100644 sampleiOSApp/sampleiOSApp/sampleiOSAppApp.swift diff --git a/gradle.properties b/gradle.properties index f78bd0b..9873e3d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,26 +1,18 @@ -# Project-wide Gradle settings. -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true -# AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app's APK -# https://developer.android.com/topic/libraries/support-library/androidx-rn -android.useAndroidX=true -# Kotlin code style for this project: "official" or "obsolete": +#Gradle +org.gradle.jvmargs=-Xmx4096M -Dkotlin.daemon.jvm.options\="-Xmx4096M" + +#Kotlin kotlin.code.style=official -# Enables namespacing of each library's R class so that its R class includes only the -# resources declared in the library itself and none from the library's dependencies, -# thereby reducing the size of the R class for that library -android.nonTransitiveRClass=true +kotlin.native.useEmbeddableCompilerJar=true +kotlin.mpp.androidSourceSetLayoutVersion=2 + +#Android +android.useAndroidX=true +android.nonTransitiveRClass=false +android.nonFinalResIds=false + +#Compose Multiplatform +org.jetbrains.compose.experimental.uikit.enabled=true POM_NAME=Navigation Compose Extended POM_DESCRIPTION=Navigation Compose Extended is a complementary library for AndroidX Jetpack Navigation Compose to improve creation of navigation elements diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 481d2fc..304ae58 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -5,17 +5,21 @@ androidGradlePlugin = "8.3.2" androidMinSdk = "24" composeBom = "2024.04.01" composeCompiler = "1.5.11" +composeMultiplatform = "1.6.10-beta01" coreKtx = "1.13.0" dokka = "1.9.20" espressoCore = "3.5.1" +jetbrainsNavigation = "2.8.0-dev1590" junit = "4.13.2" junitVersion = "1.1.5" kotlin = "1.9.23" +kotlinCoroutines = "1.8.0" kotlinpoet = "1.16.0" ksp = "1.9.23-1.0.20" ktlint = "0.50.0" lifecycleRuntimeKtx = "2.7.0" -navigationCompose = "2.7.7" +material3 = "1.3.0-alpha05" +navigationCompose = "2.8.0-alpha07" navigationComposeExtended = "0.3.0" spotless = "6.25.0" vanniktechMavenPublishPlugin = "0.28.0" @@ -24,14 +28,12 @@ vanniktechMavenPublishPlugin = "0.28.0" android-gradlePlugin = { group = "com.android.tools.build", name = "gradle", version.ref = "androidGradlePlugin" } androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "activityCompose" } androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "composeBom" } -androidx-compose-material3 = { module = "androidx.compose.material3:material3" } +androidx-compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "material3" } androidx-compose-ui = { module = "androidx.compose.ui:ui" } androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" } -androidx-espresso-core = { module = "androidx.test.espresso:espresso-core", version.ref = "espressoCore" } -androidx-junit = { module = "androidx.test.ext:junit", version.ref = "junitVersion" } androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" } androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "navigationCompose" } -junit = { module = "junit:junit", version.ref = "junit" } +jetbrains-navigation-compose = { module = "org.jetbrains.androidx.navigation:navigation-compose", version.ref = "jetbrainsNavigation" } kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } ksp-symbolProcessingApi = { module = "com.google.devtools.ksp:symbol-processing-api", version.ref = "ksp" } spotless-gradlePlugin = { module = "com.diffplug.spotless:spotless-plugin-gradle", version.ref = "spotless" } @@ -41,6 +43,7 @@ squareup-kotlinpoetKsp = { module = "com.squareup:kotlinpoet-ksp", version.ref = [plugins] androidApplication = { id = "com.android.application", version.ref = "androidGradlePlugin" } androidLibrary = { id = "com.android.library", version.ref = "androidGradlePlugin" } +composeMultiplatform = { id = "org.jetbrains.compose", version.ref = "composeMultiplatform" } dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" } kotlin = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } diff --git a/navigation-compose-extended/build.gradle.kts b/navigation-compose-extended/build.gradle.kts index 9df12b2..98094f8 100644 --- a/navigation-compose-extended/build.gradle.kts +++ b/navigation-compose-extended/build.gradle.kts @@ -1,8 +1,9 @@ import com.vanniktech.maven.publish.SonatypeHost plugins { + kotlin("multiplatform") + alias(libs.plugins.composeMultiplatform) alias(libs.plugins.androidLibrary) - kotlin("android") id("dev.sergiobelda.gradle.spotless") alias(libs.plugins.dokka) alias(libs.plugins.vanniktechMavenPublish) @@ -11,6 +12,36 @@ plugins { group = "dev.sergiobelda.navigation.compose.extended" version = libs.versions.navigationComposeExtended.get() +kotlin { + androidTarget() + jvm("desktop") + iosX64() + iosArm64() + iosSimulatorArm64() + + sourceSets { + val commonMain by getting { + dependencies { + implementation(libs.jetbrains.navigation.compose) + } + } + val commonTest by getting + val androidMain by getting + val androidUnitTest by getting + val desktopMain by getting + val desktopTest by getting + val iosX64Main by getting + val iosArm64Main by getting + val iosSimulatorArm64Main by getting + val iosMain by creating + val iosTest by creating + + all { + languageSettings.optIn("kotlin.RequiresOptIn") + } + } +} + android { namespace = "dev.sergiobelda.navigation.compose.extended" compileSdk = libs.versions.androidCompileSdk.get().toInt() @@ -21,28 +52,10 @@ android { testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles("consumer-rules.pro") } - buildTypes { - release { - isMinifyEnabled = false - proguardFiles( - getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" - ) - } - } + kotlin { jvmToolchain(17) } - buildFeatures { - compose = true - } - composeOptions { - kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get() - } -} - -dependencies { - implementation(libs.androidx.navigation.compose) } mavenPublishing { diff --git a/navigation-compose-extended/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/NavAction.kt b/navigation-compose-extended/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/NavAction.kt similarity index 83% rename from navigation-compose-extended/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/NavAction.kt rename to navigation-compose-extended/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/NavAction.kt index 481e937..84a34c3 100644 --- a/navigation-compose-extended/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/NavAction.kt +++ b/navigation-compose-extended/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/NavAction.kt @@ -60,17 +60,20 @@ class NavAction(private val navController: NavHostController) { navController.navigate( route = navRoute.route, navOptions = navOptions { - // Pop up to the start destination of the graph to - // avoid building up a large stack of destinations - // on the back stack as users select items - popUpTo(navController.graph.findStartDestination().id) { - saveState = true + navController.graph.findStartDestination().route?.let { + // Pop up to the start destination of the graph to + // avoid building up a large stack of destinations + // on the back stack as users select items + popUpTo(it) { + saveState = true + } + + // Avoid multiple copies of the same destination when + // reselecting the same item + launchSingleTop = true + // Restore state when reselecting a previously selected item + restoreState = true } - // Avoid multiple copies of the same destination when - // reselecting the same item - launchSingleTop = true - // Restore state when reselecting a previously selected item - restoreState = true }, navigatorExtras = navigatorExtras, ) diff --git a/navigation-compose-extended/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/NavArgs.kt b/navigation-compose-extended/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/NavArgs.kt similarity index 100% rename from navigation-compose-extended/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/NavArgs.kt rename to navigation-compose-extended/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/NavArgs.kt diff --git a/navigation-compose-extended/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/NavArgumentKey.kt b/navigation-compose-extended/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/NavArgumentKey.kt similarity index 100% rename from navigation-compose-extended/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/NavArgumentKey.kt rename to navigation-compose-extended/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/NavArgumentKey.kt diff --git a/navigation-compose-extended/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/NavDestination.kt b/navigation-compose-extended/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/NavDestination.kt similarity index 95% rename from navigation-compose-extended/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/NavDestination.kt rename to navigation-compose-extended/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/NavDestination.kt index 7953278..3f5cfd9 100644 --- a/navigation-compose-extended/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/NavDestination.kt +++ b/navigation-compose-extended/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/NavDestination.kt @@ -21,7 +21,6 @@ import androidx.navigation.NavArgumentBuilder import androidx.navigation.NavBackStackEntry import androidx.navigation.NavDeepLink import androidx.navigation.navArgument -import androidx.navigation.navDeepLink /** * Represents some Destination in the Navigation graph. It's defined by a @@ -56,9 +55,10 @@ abstract class NavDestination where K : NavArgumentKey { */ val deepLinks: List get() = deepLinkUris.map { - navDeepLink { - uriPattern = it + argumentsRoute - } + // navDeepLink { + // uriPattern = it + argumentsRoute + // } + NavDeepLink.Builder().setUriPattern(it + argumentsRoute).build() } /** diff --git a/navigation-compose-extended/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/NavGraphBuilder.kt b/navigation-compose-extended/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/NavGraphBuilder.kt similarity index 99% rename from navigation-compose-extended/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/NavGraphBuilder.kt rename to navigation-compose-extended/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/NavGraphBuilder.kt index b913ed9..cc2220f 100644 --- a/navigation-compose-extended/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/NavGraphBuilder.kt +++ b/navigation-compose-extended/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/NavGraphBuilder.kt @@ -30,6 +30,7 @@ import androidx.navigation.NavGraphBuilder import androidx.navigation.compose.composable import androidx.navigation.compose.dialog import androidx.navigation.compose.navigation +import kotlin.jvm.JvmSuppressWildcards /** * Add the [Composable] to the [NavGraphBuilder] diff --git a/navigation-compose-extended/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/NavHost.kt b/navigation-compose-extended/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/NavHost.kt similarity index 100% rename from navigation-compose-extended/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/NavHost.kt rename to navigation-compose-extended/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/NavHost.kt diff --git a/navigation-compose-extended/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/NavRoute.kt b/navigation-compose-extended/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/NavRoute.kt similarity index 100% rename from navigation-compose-extended/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/NavRoute.kt rename to navigation-compose-extended/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/NavRoute.kt diff --git a/navigation-compose-extended/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/RouteConstants.kt b/navigation-compose-extended/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/RouteConstants.kt similarity index 100% rename from navigation-compose-extended/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/RouteConstants.kt rename to navigation-compose-extended/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/RouteConstants.kt diff --git a/navigation-compose-extended/src/main/AndroidManifest.xml b/navigation-compose-extended/src/main/AndroidManifest.xml deleted file mode 100644 index 861919c..0000000 --- a/navigation-compose-extended/src/main/AndroidManifest.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/sample-app-annotations/src/main/AndroidManifest.xml b/sample-app-annotations/src/main/AndroidManifest.xml index 128d4c4..a392399 100644 --- a/sample-app-annotations/src/main/AndroidManifest.xml +++ b/sample-app-annotations/src/main/AndroidManifest.xml @@ -21,15 +21,23 @@ + - + + + - + + diff --git a/sample-app-annotations/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/annotations/ui/settings/SettingsScreen.kt b/sample-app-annotations/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/annotations/ui/settings/SettingsScreen.kt index 705016c..f3cd557 100644 --- a/sample-app-annotations/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/annotations/ui/settings/SettingsScreen.kt +++ b/sample-app-annotations/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/annotations/ui/settings/SettingsScreen.kt @@ -33,7 +33,10 @@ import dev.sergiobelda.navigation.compose.extended.compiler.annotation.NavDestin fun SettingsScreen( @NavArgument userId: Int, @NavArgument(defaultValue = "Default") text: String?, // Set default value for the NavArgument. - @NavArgument(name = "custom-name", defaultValue = "true") result: Boolean, // Set a custom NavArgument name. + @NavArgument( + name = "custom-name", + defaultValue = "true", + ) result: Boolean, // Set a custom NavArgument name. ) { Box(modifier = Modifier.fillMaxSize()) { Column { diff --git a/sample-app-annotations/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/annotations/ui/theme/Theme.kt b/sample-app-annotations/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/annotations/ui/theme/Theme.kt index 5568285..a524d3b 100644 --- a/sample-app-annotations/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/annotations/ui/theme/Theme.kt +++ b/sample-app-annotations/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/annotations/ui/theme/Theme.kt @@ -16,58 +16,14 @@ package dev.sergiobelda.navigation.compose.extended.sample.annotations.ui.theme -import android.os.Build -import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.darkColorScheme -import androidx.compose.material3.dynamicDarkColorScheme -import androidx.compose.material3.dynamicLightColorScheme -import androidx.compose.material3.lightColorScheme import androidx.compose.runtime.Composable -import androidx.compose.ui.platform.LocalContext - -private val DarkColorScheme = darkColorScheme( - primary = Purple80, - secondary = PurpleGrey80, - tertiary = Pink80, -) - -private val LightColorScheme = lightColorScheme( - primary = Purple40, - secondary = PurpleGrey40, - tertiary = Pink40, - - /* Other default colors to override - background = Color(0xFFFFFBFE), - surface = Color(0xFFFFFBFE), - onPrimary = Color.White, - onSecondary = Color.White, - onTertiary = Color.White, - onBackground = Color(0xFF1C1B1F), - onSurface = Color(0xFF1C1B1F), - */ -) @Composable fun SampleTheme( - darkTheme: Boolean = isSystemInDarkTheme(), - // Dynamic color is available on Android 12+ - dynamicColor: Boolean = true, content: @Composable () -> Unit, ) { - val colorScheme = when { - dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> { - val context = LocalContext.current - if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context) - } - - darkTheme -> DarkColorScheme - else -> LightColorScheme - } - MaterialTheme( - colorScheme = colorScheme, - typography = Typography, content = content, ) } diff --git a/sample-app-annotations/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/annotations/ui/theme/Type.kt b/sample-app-annotations/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/annotations/ui/theme/Type.kt deleted file mode 100644 index c042459..0000000 --- a/sample-app-annotations/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/annotations/ui/theme/Type.kt +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2024 Sergio Belda - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.sergiobelda.navigation.compose.extended.sample.annotations.ui.theme - -import androidx.compose.material3.Typography -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.text.font.FontFamily -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.unit.sp - -// Set of Material typography styles to start with -val Typography = Typography( - bodyLarge = TextStyle( - fontFamily = FontFamily.Default, - fontWeight = FontWeight.Normal, - fontSize = 16.sp, - lineHeight = 24.sp, - letterSpacing = 0.5.sp, - ), - /* Other default text styles to override - titleLarge = TextStyle( - fontFamily = FontFamily.Default, - fontWeight = FontWeight.Normal, - fontSize = 22.sp, - lineHeight = 28.sp, - letterSpacing = 0.sp - ), - labelSmall = TextStyle( - fontFamily = FontFamily.Default, - fontWeight = FontWeight.Medium, - fontSize = 11.sp, - lineHeight = 16.sp, - letterSpacing = 0.5.sp - ) - */ -) diff --git a/sample-app/build.gradle.kts b/sample-app/build.gradle.kts index 56ddeee..b7ca207 100644 --- a/sample-app/build.gradle.kts +++ b/sample-app/build.gradle.kts @@ -1,10 +1,58 @@ +import org.jetbrains.compose.desktop.application.dsl.TargetFormat + plugins { + kotlin("multiplatform") + alias(libs.plugins.composeMultiplatform) alias(libs.plugins.androidApplication) - kotlin("android") id("dev.sergiobelda.gradle.spotless") alias(libs.plugins.ksp) } +kotlin { + androidTarget() + jvm("desktop") { + compilations.all { + kotlin { + jvmToolchain(17) + } + } + } + listOf( + iosX64(), + iosArm64(), + iosSimulatorArm64() + ).forEach { iosTarget -> + iosTarget.binaries.framework { + baseName = "sample_app" + isStatic = true + } + } + + sourceSets { + val commonMain by getting { + dependencies { + implementation(projects.navigationComposeExtended) + implementation(compose.foundation) + implementation(compose.material3) + implementation(compose.runtime) + implementation(compose.ui) + + implementation(libs.jetbrains.navigation.compose) + } + } + val androidMain by getting { + dependencies { + implementation(libs.androidx.compose.material3) + } + } + val desktopMain by getting { + dependencies { + implementation(compose.desktop.currentOs) + } + } + } +} + android { namespace = "dev.sergiobelda.navigation.compose.extended.sample" compileSdk = libs.versions.androidCompileSdk.get().toInt() @@ -30,22 +78,13 @@ android { kotlin { jvmToolchain(17) } - buildFeatures { - compose = true - } - composeOptions { - kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get() - } } -dependencies { - implementation(libs.androidx.navigation.compose) - implementation(projects.navigationComposeExtended) - - implementation(platform(libs.androidx.compose.bom)) - implementation(libs.androidx.compose.material3) - implementation(libs.androidx.compose.ui) - implementation(libs.androidx.activity.compose) - implementation(libs.androidx.core.ktx) - implementation(libs.androidx.lifecycle.runtime.ktx) +compose.desktop { + application { + mainClass = "dev.sergiobelda.navigation.compose.extended.sample.ui.main.MainKt" + nativeDistributions { + targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) + } + } } diff --git a/sample-app/src/main/AndroidManifest.xml b/sample-app/src/androidMain/AndroidManifest.xml similarity index 100% rename from sample-app/src/main/AndroidManifest.xml rename to sample-app/src/androidMain/AndroidManifest.xml diff --git a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/main/MainActivity.kt b/sample-app/src/androidMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/main/MainActivity.kt similarity index 87% rename from sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/main/MainActivity.kt rename to sample-app/src/androidMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/main/MainActivity.kt index dd76d7e..c1b7c4a 100644 --- a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/main/MainActivity.kt +++ b/sample-app/src/androidMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/main/MainActivity.kt @@ -20,16 +20,14 @@ import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent import androidx.activity.enableEdgeToEdge -import dev.sergiobelda.navigation.compose.extended.sample.ui.theme.SampleTheme +import dev.sergiobelda.navigation.compose.extended.sample.ui.SampleAppNavHost class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) enableEdgeToEdge() setContent { - SampleTheme { - MainScreen() - } + SampleAppNavHost() } } } diff --git a/sample-app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/sample-app/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml similarity index 100% rename from sample-app/src/main/res/drawable-v24/ic_launcher_foreground.xml rename to sample-app/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml diff --git a/sample-app/src/main/res/drawable/ic_launcher_background.xml b/sample-app/src/androidMain/res/drawable/ic_launcher_background.xml similarity index 100% rename from sample-app/src/main/res/drawable/ic_launcher_background.xml rename to sample-app/src/androidMain/res/drawable/ic_launcher_background.xml diff --git a/sample-app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/sample-app/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from sample-app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml rename to sample-app/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/sample-app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/sample-app/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml similarity index 100% rename from sample-app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml rename to sample-app/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml diff --git a/sample-app/src/main/res/mipmap-hdpi/ic_launcher.webp b/sample-app/src/androidMain/res/mipmap-hdpi/ic_launcher.webp similarity index 100% rename from sample-app/src/main/res/mipmap-hdpi/ic_launcher.webp rename to sample-app/src/androidMain/res/mipmap-hdpi/ic_launcher.webp diff --git a/sample-app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/sample-app/src/androidMain/res/mipmap-hdpi/ic_launcher_round.webp similarity index 100% rename from sample-app/src/main/res/mipmap-hdpi/ic_launcher_round.webp rename to sample-app/src/androidMain/res/mipmap-hdpi/ic_launcher_round.webp diff --git a/sample-app/src/main/res/mipmap-mdpi/ic_launcher.webp b/sample-app/src/androidMain/res/mipmap-mdpi/ic_launcher.webp similarity index 100% rename from sample-app/src/main/res/mipmap-mdpi/ic_launcher.webp rename to sample-app/src/androidMain/res/mipmap-mdpi/ic_launcher.webp diff --git a/sample-app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/sample-app/src/androidMain/res/mipmap-mdpi/ic_launcher_round.webp similarity index 100% rename from sample-app/src/main/res/mipmap-mdpi/ic_launcher_round.webp rename to sample-app/src/androidMain/res/mipmap-mdpi/ic_launcher_round.webp diff --git a/sample-app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/sample-app/src/androidMain/res/mipmap-xhdpi/ic_launcher.webp similarity index 100% rename from sample-app/src/main/res/mipmap-xhdpi/ic_launcher.webp rename to sample-app/src/androidMain/res/mipmap-xhdpi/ic_launcher.webp diff --git a/sample-app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/sample-app/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.webp similarity index 100% rename from sample-app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp rename to sample-app/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.webp diff --git a/sample-app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/sample-app/src/androidMain/res/mipmap-xxhdpi/ic_launcher.webp similarity index 100% rename from sample-app/src/main/res/mipmap-xxhdpi/ic_launcher.webp rename to sample-app/src/androidMain/res/mipmap-xxhdpi/ic_launcher.webp diff --git a/sample-app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/sample-app/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.webp similarity index 100% rename from sample-app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp rename to sample-app/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.webp diff --git a/sample-app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/sample-app/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.webp similarity index 100% rename from sample-app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp rename to sample-app/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.webp diff --git a/sample-app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/sample-app/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.webp similarity index 100% rename from sample-app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp rename to sample-app/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.webp diff --git a/sample-app/src/main/res/values/strings.xml b/sample-app/src/androidMain/res/values/strings.xml similarity index 100% rename from sample-app/src/main/res/values/strings.xml rename to sample-app/src/androidMain/res/values/strings.xml diff --git a/sample-app/src/main/res/values/themes.xml b/sample-app/src/androidMain/res/values/themes.xml similarity index 100% rename from sample-app/src/main/res/values/themes.xml rename to sample-app/src/androidMain/res/values/themes.xml diff --git a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/main/MainScreen.kt b/sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/SampleAppNavHost.kt similarity index 95% rename from sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/main/MainScreen.kt rename to sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/SampleAppNavHost.kt index d54afa0..182a0b6 100644 --- a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/main/MainScreen.kt +++ b/sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/SampleAppNavHost.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package dev.sergiobelda.navigation.compose.extended.sample.ui.main +package dev.sergiobelda.navigation.compose.extended.sample.ui import androidx.compose.runtime.Composable import androidx.navigation.compose.rememberNavController @@ -27,7 +27,7 @@ import dev.sergiobelda.navigation.compose.extended.sample.ui.settings.SettingsNa import dev.sergiobelda.navigation.compose.extended.sample.ui.settings.SettingsScreen @Composable -fun MainScreen() { +fun SampleAppNavHost() { val navController = rememberNavController() val navAction = rememberNavAction(navController) NavHost( diff --git a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/home/HomeNavDestination.kt b/sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/home/HomeNavDestination.kt similarity index 100% rename from sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/home/HomeNavDestination.kt rename to sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/home/HomeNavDestination.kt diff --git a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/home/HomeScreen.kt b/sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/home/HomeScreen.kt similarity index 94% rename from sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/home/HomeScreen.kt rename to sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/home/HomeScreen.kt index 8bc8983..64082fe 100644 --- a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/home/HomeScreen.kt +++ b/sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/home/HomeScreen.kt @@ -16,7 +16,6 @@ package dev.sergiobelda.navigation.compose.extended.sample.ui.home -import androidx.annotation.StringRes import androidx.compose.foundation.layout.WindowInsetsSides import androidx.compose.foundation.layout.only import androidx.compose.foundation.layout.padding @@ -37,7 +36,6 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector -import androidx.compose.ui.res.stringResource import androidx.navigation.NavDestination.Companion.hierarchy import androidx.navigation.NavGraphBuilder import androidx.navigation.compose.currentBackStackEntryAsState @@ -49,7 +47,6 @@ import dev.sergiobelda.navigation.compose.extended.NavHost import dev.sergiobelda.navigation.compose.extended.composable import dev.sergiobelda.navigation.compose.extended.navigation import dev.sergiobelda.navigation.compose.extended.rememberNavAction -import dev.sergiobelda.navigation.compose.extended.sample.R import dev.sergiobelda.navigation.compose.extended.sample.ui.search.SearchNavDestination import dev.sergiobelda.navigation.compose.extended.sample.ui.search.initial.SearchInitialNavDestination import dev.sergiobelda.navigation.compose.extended.sample.ui.search.initial.SearchInitialScreen @@ -62,10 +59,10 @@ import dev.sergiobelda.navigation.compose.extended.sample.ui.yourlibrary.YourLib private enum class HomeNavigationBarItem( val navDestination: NavDestination, val icon: ImageVector, - @StringRes val labelResId: Int, + val text: String, ) { - Search(SearchNavDestination, Icons.Rounded.Search, R.string.search), - YourLibrary(YourLibraryNavDestination, Icons.Rounded.AccountBox, R.string.your_library), + Search(SearchNavDestination, Icons.Rounded.Search, "Search"), + YourLibrary(YourLibraryNavDestination, Icons.Rounded.AccountBox, "Your library"), } @OptIn(ExperimentalMaterial3Api::class) @@ -97,7 +94,7 @@ fun HomeScreen( selected = currentDestination?.hierarchy?.any { it.route == item.navDestination.route } == true, onClick = { navAction.navigate(item.navDestination.navRoute()) }, icon = { Icon(item.icon, contentDescription = null) }, - label = { Text(text = stringResource(item.labelResId)) }, + label = { Text(text = item.text) }, ) } } diff --git a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/SearchNavDestination.kt b/sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/SearchNavDestination.kt similarity index 100% rename from sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/SearchNavDestination.kt rename to sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/SearchNavDestination.kt diff --git a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/initial/SearchInitialNavDestination.kt b/sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/initial/SearchInitialNavDestination.kt similarity index 100% rename from sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/initial/SearchInitialNavDestination.kt rename to sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/initial/SearchInitialNavDestination.kt diff --git a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/initial/SearchInitialScreen.kt b/sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/initial/SearchInitialScreen.kt similarity index 88% rename from sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/initial/SearchInitialScreen.kt rename to sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/initial/SearchInitialScreen.kt index dc6721f..f611eb3 100644 --- a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/initial/SearchInitialScreen.kt +++ b/sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/initial/SearchInitialScreen.kt @@ -16,7 +16,6 @@ package dev.sergiobelda.navigation.compose.extended.sample.ui.search.initial -import android.annotation.SuppressLint import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth @@ -38,11 +37,8 @@ import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp -import dev.sergiobelda.navigation.compose.extended.sample.R -@SuppressLint("UnusedMaterial3ScaffoldPaddingParameter") @OptIn(ExperimentalMaterial3Api::class) @Composable fun SearchInitialScreen( @@ -53,7 +49,7 @@ fun SearchInitialScreen( Scaffold( topBar = { TopAppBar( - title = { Text(text = stringResource(R.string.search)) }, + title = { Text(text = "Search") }, ) }, ) { paddingValues -> @@ -67,14 +63,14 @@ fun SearchInitialScreen( OutlinedTextField( value = search, onValueChange = { search = it }, - placeholder = { Text(text = stringResource(R.string.search_and_discover_music)) }, + placeholder = { Text(text = "Search and discover Music") }, modifier = Modifier .fillMaxWidth(), isError = isError, leadingIcon = { Icon( Icons.Rounded.Search, - contentDescription = stringResource(R.string.search), + contentDescription = "Search", ) }, supportingText = { diff --git a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/result/SearchResultNavigation.kt b/sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/result/SearchResultNavigation.kt similarity index 100% rename from sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/result/SearchResultNavigation.kt rename to sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/result/SearchResultNavigation.kt diff --git a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/result/SearchResultScreen.kt b/sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/result/SearchResultScreen.kt similarity index 91% rename from sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/result/SearchResultScreen.kt rename to sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/result/SearchResultScreen.kt index f145fc8..488fd92 100644 --- a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/result/SearchResultScreen.kt +++ b/sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/search/result/SearchResultScreen.kt @@ -29,9 +29,7 @@ import androidx.compose.material3.Text import androidx.compose.material3.TopAppBar import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp -import dev.sergiobelda.navigation.compose.extended.sample.R @OptIn(ExperimentalMaterial3Api::class) @Composable @@ -47,7 +45,7 @@ fun SearchResultScreen( IconButton(onClick = navigateBack) { Icon( Icons.AutoMirrored.Rounded.ArrowBack, - contentDescription = stringResource(R.string.back), + contentDescription = "Back", ) } }, diff --git a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/settings/SettingsNavDestination.kt b/sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/settings/SettingsNavDestination.kt similarity index 100% rename from sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/settings/SettingsNavDestination.kt rename to sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/settings/SettingsNavDestination.kt diff --git a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/settings/SettingsScreen.kt b/sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/settings/SettingsScreen.kt similarity index 100% rename from sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/settings/SettingsScreen.kt rename to sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/settings/SettingsScreen.kt diff --git a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/yourlibrary/YourLibraryNavDestination.kt b/sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/yourlibrary/YourLibraryNavDestination.kt similarity index 100% rename from sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/yourlibrary/YourLibraryNavDestination.kt rename to sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/yourlibrary/YourLibraryNavDestination.kt diff --git a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/yourlibrary/YourLibraryScreen.kt b/sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/yourlibrary/YourLibraryScreen.kt similarity index 85% rename from sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/yourlibrary/YourLibraryScreen.kt rename to sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/yourlibrary/YourLibraryScreen.kt index 5bf14fc..e647e24 100644 --- a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/yourlibrary/YourLibraryScreen.kt +++ b/sample-app/src/commonMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/yourlibrary/YourLibraryScreen.kt @@ -21,8 +21,6 @@ import androidx.compose.material3.Scaffold import androidx.compose.material3.Text import androidx.compose.material3.TopAppBar import androidx.compose.runtime.Composable -import androidx.compose.ui.res.stringResource -import dev.sergiobelda.navigation.compose.extended.sample.R @OptIn(ExperimentalMaterial3Api::class) @Composable @@ -30,7 +28,7 @@ fun YourLibraryScreen() { Scaffold( topBar = { TopAppBar( - title = { Text(text = stringResource(R.string.your_library)) }, + title = { Text(text = "Your library") }, ) }, ) { paddingValues -> diff --git a/sample-app-annotations/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/annotations/ui/theme/Color.kt b/sample-app/src/desktopMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/main/Main.kt similarity index 59% rename from sample-app-annotations/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/annotations/ui/theme/Color.kt rename to sample-app/src/desktopMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/main/Main.kt index edf902a..f720377 100644 --- a/sample-app-annotations/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/annotations/ui/theme/Color.kt +++ b/sample-app/src/desktopMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/main/Main.kt @@ -14,14 +14,18 @@ * limitations under the License. */ -package dev.sergiobelda.navigation.compose.extended.sample.annotations.ui.theme +package dev.sergiobelda.navigation.compose.extended.sample.ui.main -import androidx.compose.ui.graphics.Color +import androidx.compose.ui.window.Window +import androidx.compose.ui.window.application +import dev.sergiobelda.navigation.compose.extended.sample.ui.SampleAppNavHost -val Purple80 = Color(0xFFD0BCFF) -val PurpleGrey80 = Color(0xFFCCC2DC) -val Pink80 = Color(0xFFEFB8C8) - -val Purple40 = Color(0xFF6650a4) -val PurpleGrey40 = Color(0xFF625b71) -val Pink40 = Color(0xFF7D5260) +fun main() = application { + Window( + resizable = false, + onCloseRequest = ::exitApplication, + title = "Sample App", + ) { + SampleAppNavHost() + } +} diff --git a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/theme/Color.kt b/sample-app/src/iosMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/main/Main.kt similarity index 63% rename from sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/theme/Color.kt rename to sample-app/src/iosMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/main/Main.kt index 39782c3..eb354f1 100644 --- a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/theme/Color.kt +++ b/sample-app/src/iosMain/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/main/Main.kt @@ -14,14 +14,12 @@ * limitations under the License. */ -package dev.sergiobelda.navigation.compose.extended.sample.ui.theme +package dev.sergiobelda.navigation.compose.extended.sample.ui.main -import androidx.compose.ui.graphics.Color +import androidx.compose.ui.window.ComposeUIViewController +import dev.sergiobelda.navigation.compose.extended.sample.ui.SampleAppNavHost +import platform.UIKit.UIViewController -val Purple80 = Color(0xFFD0BCFF) -val PurpleGrey80 = Color(0xFFCCC2DC) -val Pink80 = Color(0xFFEFB8C8) - -val Purple40 = Color(0xFF6650a4) -val PurpleGrey40 = Color(0xFF625b71) -val Pink40 = Color(0xFF7D5260) +fun MainViewController(): UIViewController = ComposeUIViewController { + SampleAppNavHost() +} diff --git a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/theme/Theme.kt b/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/theme/Theme.kt deleted file mode 100644 index 42e0e3b..0000000 --- a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/theme/Theme.kt +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2024 Sergio Belda - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.sergiobelda.navigation.compose.extended.sample.ui.theme - -import android.os.Build -import androidx.compose.foundation.isSystemInDarkTheme -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.darkColorScheme -import androidx.compose.material3.dynamicDarkColorScheme -import androidx.compose.material3.dynamicLightColorScheme -import androidx.compose.material3.lightColorScheme -import androidx.compose.runtime.Composable -import androidx.compose.ui.platform.LocalContext - -private val DarkColorScheme = darkColorScheme( - primary = Purple80, - secondary = PurpleGrey80, - tertiary = Pink80, -) - -private val LightColorScheme = lightColorScheme( - primary = Purple40, - secondary = PurpleGrey40, - tertiary = Pink40, - - /* Other default colors to override - background = Color(0xFFFFFBFE), - surface = Color(0xFFFFFBFE), - onPrimary = Color.White, - onSecondary = Color.White, - onTertiary = Color.White, - onBackground = Color(0xFF1C1B1F), - onSurface = Color(0xFF1C1B1F), - */ -) - -@Composable -fun SampleTheme( - darkTheme: Boolean = isSystemInDarkTheme(), - // Dynamic color is available on Android 12+ - dynamicColor: Boolean = true, - content: @Composable () -> Unit, -) { - val colorScheme = when { - dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> { - val context = LocalContext.current - if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context) - } - - darkTheme -> DarkColorScheme - else -> LightColorScheme - } - - MaterialTheme( - colorScheme = colorScheme, - typography = Typography, - content = content, - ) -} diff --git a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/theme/Type.kt b/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/theme/Type.kt deleted file mode 100644 index 4ea4f64..0000000 --- a/sample-app/src/main/kotlin/dev/sergiobelda/navigation/compose/extended/sample/ui/theme/Type.kt +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2024 Sergio Belda - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package dev.sergiobelda.navigation.compose.extended.sample.ui.theme - -import androidx.compose.material3.Typography -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.text.font.FontFamily -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.unit.sp - -// Set of Material typography styles to start with -val Typography = Typography( - bodyLarge = TextStyle( - fontFamily = FontFamily.Default, - fontWeight = FontWeight.Normal, - fontSize = 16.sp, - lineHeight = 24.sp, - letterSpacing = 0.5.sp, - ), - /* Other default text styles to override - titleLarge = TextStyle( - fontFamily = FontFamily.Default, - fontWeight = FontWeight.Normal, - fontSize = 22.sp, - lineHeight = 28.sp, - letterSpacing = 0.sp - ), - labelSmall = TextStyle( - fontFamily = FontFamily.Default, - fontWeight = FontWeight.Medium, - fontSize = 11.sp, - lineHeight = 16.sp, - letterSpacing = 0.5.sp - ) - */ -) diff --git a/sampleiOSApp/sampleiOSApp.xcodeproj/project.pbxproj b/sampleiOSApp/sampleiOSApp.xcodeproj/project.pbxproj new file mode 100644 index 0000000..36ec19e --- /dev/null +++ b/sampleiOSApp/sampleiOSApp.xcodeproj/project.pbxproj @@ -0,0 +1,374 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 42FC630F2BD2D2DD00C254F5 /* sampleiOSAppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42FC630E2BD2D2DD00C254F5 /* sampleiOSAppApp.swift */; }; + 42FC63112BD2D2DD00C254F5 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42FC63102BD2D2DD00C254F5 /* ContentView.swift */; }; + 42FC63132BD2D2DE00C254F5 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 42FC63122BD2D2DE00C254F5 /* Assets.xcassets */; }; + 42FC63162BD2D2DE00C254F5 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 42FC63152BD2D2DE00C254F5 /* Preview Assets.xcassets */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 42FC630B2BD2D2DD00C254F5 /* sampleiOSApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = sampleiOSApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 42FC630E2BD2D2DD00C254F5 /* sampleiOSAppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = sampleiOSAppApp.swift; sourceTree = ""; }; + 42FC63102BD2D2DD00C254F5 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 42FC63122BD2D2DE00C254F5 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 42FC63152BD2D2DE00C254F5 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 42FC63082BD2D2DD00C254F5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 42FC63022BD2D2DD00C254F5 = { + isa = PBXGroup; + children = ( + 42FC630D2BD2D2DD00C254F5 /* sampleiOSApp */, + 42FC630C2BD2D2DD00C254F5 /* Products */, + ); + sourceTree = ""; + }; + 42FC630C2BD2D2DD00C254F5 /* Products */ = { + isa = PBXGroup; + children = ( + 42FC630B2BD2D2DD00C254F5 /* sampleiOSApp.app */, + ); + name = Products; + sourceTree = ""; + }; + 42FC630D2BD2D2DD00C254F5 /* sampleiOSApp */ = { + isa = PBXGroup; + children = ( + 42FC630E2BD2D2DD00C254F5 /* sampleiOSAppApp.swift */, + 42FC63102BD2D2DD00C254F5 /* ContentView.swift */, + 42FC63122BD2D2DE00C254F5 /* Assets.xcassets */, + 42FC63142BD2D2DE00C254F5 /* Preview Content */, + ); + path = sampleiOSApp; + sourceTree = ""; + }; + 42FC63142BD2D2DE00C254F5 /* Preview Content */ = { + isa = PBXGroup; + children = ( + 42FC63152BD2D2DE00C254F5 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 42FC630A2BD2D2DD00C254F5 /* sampleiOSApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = 42FC63192BD2D2DE00C254F5 /* Build configuration list for PBXNativeTarget "sampleiOSApp" */; + buildPhases = ( + 42FC631C2BD2D34200C254F5 /* ShellScript */, + 42FC63072BD2D2DD00C254F5 /* Sources */, + 42FC63082BD2D2DD00C254F5 /* Frameworks */, + 42FC63092BD2D2DD00C254F5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = sampleiOSApp; + productName = sampleiOSApp; + productReference = 42FC630B2BD2D2DD00C254F5 /* sampleiOSApp.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 42FC63032BD2D2DD00C254F5 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1520; + LastUpgradeCheck = 1520; + TargetAttributes = { + 42FC630A2BD2D2DD00C254F5 = { + CreatedOnToolsVersion = 15.2; + }; + }; + }; + buildConfigurationList = 42FC63062BD2D2DD00C254F5 /* Build configuration list for PBXProject "sampleiOSApp" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 42FC63022BD2D2DD00C254F5; + productRefGroup = 42FC630C2BD2D2DD00C254F5 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 42FC630A2BD2D2DD00C254F5 /* sampleiOSApp */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 42FC63092BD2D2DD00C254F5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 42FC63162BD2D2DE00C254F5 /* Preview Assets.xcassets in Resources */, + 42FC63132BD2D2DE00C254F5 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 42FC631C2BD2D34200C254F5 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "cd \"$SRCROOT/..\"\n./gradlew :sample-app:embedAndSignAppleFrameworkForXcode\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 42FC63072BD2D2DD00C254F5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 42FC63112BD2D2DD00C254F5 /* ContentView.swift in Sources */, + 42FC630F2BD2D2DD00C254F5 /* sampleiOSAppApp.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 42FC63172BD2D2DE00C254F5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.2; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 42FC63182BD2D2DE00C254F5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 17.2; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 42FC631A2BD2D2DE00C254F5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"sampleiOSApp/Preview Content\""; + DEVELOPMENT_TEAM = 9B3DS6JXG9; + ENABLE_PREVIEWS = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../sample-app/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = dev.sergiobelda.navigation.compose.extended.sample.sampleiOSApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 42FC631B2BD2D2DE00C254F5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"sampleiOSApp/Preview Content\""; + DEVELOPMENT_TEAM = 9B3DS6JXG9; + ENABLE_PREVIEWS = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../sample-app/build/xcode-frameworks/$(CONFIGURATION)/$(SDK_NAME)"; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = dev.sergiobelda.navigation.compose.extended.sample.sampleiOSApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 42FC63062BD2D2DD00C254F5 /* Build configuration list for PBXProject "sampleiOSApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 42FC63172BD2D2DE00C254F5 /* Debug */, + 42FC63182BD2D2DE00C254F5 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 42FC63192BD2D2DE00C254F5 /* Build configuration list for PBXNativeTarget "sampleiOSApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 42FC631A2BD2D2DE00C254F5 /* Debug */, + 42FC631B2BD2D2DE00C254F5 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 42FC63032BD2D2DD00C254F5 /* Project object */; +} diff --git a/sampleiOSApp/sampleiOSApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/sampleiOSApp/sampleiOSApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/sampleiOSApp/sampleiOSApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/sampleiOSApp/sampleiOSApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/sampleiOSApp/sampleiOSApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/sampleiOSApp/sampleiOSApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/sampleiOSApp/sampleiOSApp.xcodeproj/project.xcworkspace/xcuserdata/sergiobelda.xcuserdatad/UserInterfaceState.xcuserstate b/sampleiOSApp/sampleiOSApp.xcodeproj/project.xcworkspace/xcuserdata/sergiobelda.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..808b20ae30c15cd6f5e1f50f8a443b4b900b8477 GIT binary patch literal 21327 zcmeIacVLs%{y%=sGt!wRZMp}vO=&A_(u^h@v}rS1tU#%>WkX5ZPy%gJk`yS2o(IK+ z3>6g>mA335!o_h_K*TLBKyWY=<%$cpI1s<@=XsL0VR-%B-{*V3|9mKIk~81uocDRZ zU+?jxv7^=L@oF@O5k?fE5rbGHK|v^Ve8wDy+v9Y#Psp&ln`SuSQ(cDF)iFN9)i~49 z$`dY8u>mYc0BtD74P&kT1@hAc5Q9d#tBPu|J zs0bCKVWb@Rp=Tt0*ypt(0DWfH6RC?j%Fe+>O>3B4d_O63%Ua>M|YzK(IaRL zT8q}9-DnTmi=IRK(DP_NdI7zNUP3RU*U>?A2+cdaX20);6ywK55bu@7pt%V8*u?H#O2tGhvN}=B%X*T;mLRk zo{AfA6K=-y@dA7uUWl*9H(-J}ya?ZjZ^5_XJMeORH@*))h#$edcrD(DAI018WB6(O z41N~x#(VHyydNLJhw;1k2tJD6!|&q{@Ckeh{|kSPzsBFT}LR;r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.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/sampleiOSApp/sampleiOSApp/Assets.xcassets/AccentColor.colorset/Contents.json b/sampleiOSApp/sampleiOSApp/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/sampleiOSApp/sampleiOSApp/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/sampleiOSApp/sampleiOSApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/sampleiOSApp/sampleiOSApp/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/sampleiOSApp/sampleiOSApp/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/sampleiOSApp/sampleiOSApp/Assets.xcassets/Contents.json b/sampleiOSApp/sampleiOSApp/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/sampleiOSApp/sampleiOSApp/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/sampleiOSApp/sampleiOSApp/ContentView.swift b/sampleiOSApp/sampleiOSApp/ContentView.swift new file mode 100644 index 0000000..93774f9 --- /dev/null +++ b/sampleiOSApp/sampleiOSApp/ContentView.swift @@ -0,0 +1,24 @@ +// +// ContentView.swift +// sampleiOSApp +// +// Created by Sergio Belda Galbis on 19/4/24. +// + +import SwiftUI +import sample_app + +struct ContentView: View { + var body: some View { + ComposeView().ignoresSafeArea(.all) // Compose has own keyboard handler + } +} + +struct ComposeView: UIViewControllerRepresentable { + func makeUIViewController(context: Context) -> UIViewController { + MainKt.MainViewController() + } + + func updateUIViewController(_ uiViewController: UIViewController, context: Context) { + } +} diff --git a/sampleiOSApp/sampleiOSApp/Preview Content/Preview Assets.xcassets/Contents.json b/sampleiOSApp/sampleiOSApp/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/sampleiOSApp/sampleiOSApp/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/sampleiOSApp/sampleiOSApp/sampleiOSAppApp.swift b/sampleiOSApp/sampleiOSApp/sampleiOSAppApp.swift new file mode 100644 index 0000000..053b2e1 --- /dev/null +++ b/sampleiOSApp/sampleiOSApp/sampleiOSAppApp.swift @@ -0,0 +1,17 @@ +// +// sampleiOSAppApp.swift +// sampleiOSApp +// +// Created by Sergio Belda Galbis on 19/4/24. +// + +import SwiftUI + +@main +struct sampleiOSAppApp: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/settings.gradle.kts b/settings.gradle.kts index ca362be..0bf32ae 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -7,10 +7,11 @@ pluginManagement { } } dependencyResolutionManagement { - repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositoriesMode.set(RepositoriesMode.PREFER_PROJECT) repositories { google() mavenCentral() + maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") } } enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")