diff --git a/README.md b/README.md index 8329f7b31..d2579e90e 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ That's the whole flow. See [enro.dev](https://enro.dev) for the full guide. ## Learn Enro - **Documentation:** [enro.dev](https://enro.dev) — installation, concepts, results, animations, testing, platform guides, and the migration guide from Enro 2. -- **Recipes:** [`recipes/`](./recipes/src/commonMain/kotlin/dev/enro/recipes) — every concept (dialogs, bottom sheets, list-detail, tabs, deep links, managed flows, shared view models, custom animations) is a small runnable sample. +- **Recipes:** [`recipes/`](./recipes/common/src/commonMain/kotlin/dev/enro/recipes) — every concept (dialogs, bottom sheets, list-detail, tabs, deep links, managed flows, shared view models, custom animations) is a small runnable sample. - **API reference:** generate with `./gradlew dokkaGenerate`; the multi-module site lands at `build/dokka/html/index.html`. Also published as a `-javadoc.jar` alongside each artifact on Maven Central. - **Changelog:** [CHANGELOG.md](./CHANGELOG.md). diff --git a/build.gradle.kts b/build.gradle.kts index a82ce2612..ddc5051ce 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -74,15 +74,15 @@ subprojects { tasks.register("continuousIntegration") { val continuousIntegration = this tasks.findByName("lintDebug")?.let { continuousIntegration.dependsOn(it) } - tasks.findByName("testDebugUnitTest")?.let { continuousIntegration.dependsOn(it) } + tasks.findByName("testAndroidHostTest")?.let { continuousIntegration.dependsOn(it) } tasks.findByName("desktopTest")?.let { continuousIntegration.dependsOn(it) } tasks.findByName("wasmJsBrowserTest")?.let { continuousIntegration.dependsOn(it) } - tasks.findByName("testDebugWithEmulatorWtf")?.let { continuousIntegration.dependsOn(it) } + tasks.findByName("testWithEmulatorWtf")?.let { continuousIntegration.dependsOn(it) } // Compile-only fallbacks so modules without tests (e.g. recipes) // are still build-checked by CI. For modules with tests, these are // no-ops — the test tasks above already depend on compilation. tasks.findByName("compileKotlinDesktop")?.let { continuousIntegration.dependsOn(it) } - tasks.findByName("compileDebugKotlinAndroid")?.let { continuousIntegration.dependsOn(it) } + tasks.findByName("compileAndroidMain")?.let { continuousIntegration.dependsOn(it) } tasks.findByName("compileKotlinWasmJs")?.let { continuousIntegration.dependsOn(it) } } @@ -127,11 +127,11 @@ tasks.register("publishEnroLocal") { commandLine( "./gradlew", ":enro-processor:publishMavenPublicationToMavenLocal", - ":enro-annotations:publishAndroidReleasePublicationToMavenLocal", + ":enro-annotations:publishAndroidPublicationToMavenLocal", ":enro-annotations:publishDesktopPublicationToMavenLocal", "publishKotlinMultiplatformPublicationToMavenLocal", - "publishAndroidReleasePublicationToMavenLocal", + "publishAndroidPublicationToMavenLocal", "publishDesktopPublicationToMavenLocal", // "publishFrontendJsPublicationToMavenLocal", "publishIosArm64PublicationToMavenLocal", diff --git a/buildSrc/src/main/kotlin/ConfigureCompose.kt b/buildSrc/src/main/kotlin/ConfigureCompose.kt index fb46f74ad..070e975fd 100644 --- a/buildSrc/src/main/kotlin/ConfigureCompose.kt +++ b/buildSrc/src/main/kotlin/ConfigureCompose.kt @@ -1,10 +1,3 @@ -import com.android.build.api.dsl.AndroidResources -import com.android.build.api.dsl.BuildFeatures -import com.android.build.api.dsl.BuildType -import com.android.build.api.dsl.CommonExtension -import com.android.build.api.dsl.DefaultConfig -import com.android.build.api.dsl.Installation -import com.android.build.api.dsl.ProductFlavor import com.android.build.gradle.BaseExtension import org.gradle.accessors.dm.LibrariesForLibs import org.gradle.api.Plugin @@ -64,6 +57,9 @@ internal fun Project.configureComposeMultiplatform() { androidMain.dependencies { implementation(compose.preview) implementation(libs.compose.activity) + // The KMP library plugin has no build variants, so ui-tooling is added to + // androidMain rather than a debug-only configuration. + implementation(compose.uiTooling) } commonMain.dependencies { implementation(compose.runtime) @@ -82,17 +78,7 @@ internal fun Project.configureComposeMultiplatform() { } } } - - @Suppress("UNCHECKED_CAST") - val androidExtension = - project.extensions.getByType(CommonExtension::class) as CommonExtension - - androidExtension.apply { - buildFeatures { - compose = true - } - project.dependencies { - "debugImplementation"(compose.uiTooling) - } - } + // No `buildFeatures { compose = true }` needed here — the Compose compiler is applied + // across all KMP targets (incl. Android) by the `org.jetbrains.kotlin.plugin.compose` + // plugin above. } \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/ConfigureMultiplatformLibrary.kt b/buildSrc/src/main/kotlin/ConfigureMultiplatformLibrary.kt index 944f10b1c..277b236ca 100644 --- a/buildSrc/src/main/kotlin/ConfigureMultiplatformLibrary.kt +++ b/buildSrc/src/main/kotlin/ConfigureMultiplatformLibrary.kt @@ -1,8 +1,5 @@ -import com.android.build.api.dsl.LibraryExtension -import org.gradle.accessors.dm.LibrariesForLibs import org.gradle.api.Plugin import org.gradle.api.Project -import org.gradle.kotlin.dsl.the class ConfigureMultiplatformLibrary : Plugin { override fun apply(project: Project) { @@ -19,17 +16,11 @@ class ConfigureMultiplatformLibraryWithJs : Plugin { internal fun Project.configureMultiplatformLibrary( js: Boolean, ) { - val libs = project.the() - project.plugins.apply("com.android.library") + // KMP libraries with an Android target use the dedicated Android-KMP library plugin. + // The KMP plugin is applied first so the `androidLibrary {}` DSL it contributes is + // available; minSdk/compileSdk/namespace are configured there (see + // configureKotlinMultiplatform). + project.plugins.apply("org.jetbrains.kotlin.multiplatform") + project.plugins.apply("com.android.kotlin.multiplatform.library") project.configureKotlinMultiplatform(js = js) - - val androidExtension = project.extensions.getByType(LibraryExtension::class.java) - androidExtension.apply { - defaultConfig { - minSdk = libs.versions.android.minSdk.get().toInt() - } - testOptions { - targetSdk = libs.versions.android.targetSdk.get().toInt() - } - } } \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/Project.configureKotlinMultiplatform.kt b/buildSrc/src/main/kotlin/Project.configureKotlinMultiplatform.kt index cf855902f..e2318617c 100644 --- a/buildSrc/src/main/kotlin/Project.configureKotlinMultiplatform.kt +++ b/buildSrc/src/main/kotlin/Project.configureKotlinMultiplatform.kt @@ -1,8 +1,8 @@ import com.android.build.api.dsl.* import org.gradle.accessors.dm.LibrariesForLibs -import org.gradle.api.JavaVersion import org.gradle.api.Project +import org.gradle.api.plugins.ExtensionAware import org.gradle.kotlin.dsl.* import org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode import org.jetbrains.kotlin.gradle.dsl.JsSourceMapEmbedMode @@ -38,19 +38,6 @@ internal fun Project.configureKotlinMultiplatform( project.extensions.getByType(KotlinMultiplatformExtension::class.java) kotlinMultiplatformExtension.apply { explicitApi = ExplicitApiMode.Strict - if (android) { - androidTarget { - compilerOptions { - jvmTarget.set(JvmTarget.JVM_11) - freeCompilerArgs.addAll( - "-P", - "plugin:org.jetbrains.kotlin.parcelize:additionalAnnotation=dev.enro.annotations.Parcelize" - ) - freeCompilerArgs.addAll("-Xexpect-actual-classes") - optIn.addAll(*optIns) - } - } - } if (desktop) { jvm("desktop") { @@ -147,35 +134,42 @@ internal fun Project.configureKotlinMultiplatform( } if (android) { - @Suppress("UNCHECKED_CAST") - val androidExtension = - project.extensions.getByType(CommonExtension::class) as CommonExtension - - androidExtension.apply { - namespace = project.projectName.packageName - compileSdk = libs.versions.android.compileSdk.get().toInt() - defaultConfig { - minSdk = libs.versions.android.minSdk.get().toInt() - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + // Configure the Android library target contributed by the + // `com.android.kotlin.multiplatform.library` plugin. In build scripts this is the + // `kotlin { androidLibrary { ... } }` accessor; from a binary convention plugin we + // reach the same target via the KMP extension's ExtensionAware container. + val androidNamespace = project.projectName.packageName + val compileSdkVersion = libs.versions.android.compileSdk.get().toInt() + val minSdkVersion = libs.versions.android.minSdk.get().toInt() + // "androidLibrary" (rather than the "android" alias) so this resolves on AGP 9.0, + // whose Android plugin is the latest currently supported by IntelliJ. Both names + // refer to the same target on AGP 9.1+. + val androidLibrary = (kotlinMultiplatformExtension as ExtensionAware).extensions + .getByName("androidLibrary") as KotlinMultiplatformAndroidLibraryTarget + androidLibrary.apply { + namespace = androidNamespace + compileSdk = compileSdkVersion + minSdk = minSdkVersion + + // The KMP library plugin disables Android resource processing (and the + // generated R class) by default; enable it so modules with src/androidMain/res + // (and code that references R) build. No-op for modules without resources. + androidResources { + enable = true } - sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml") - sourceSets["main"].res.srcDirs("src/androidMain/res") - sourceSets["main"].resources.srcDirs("src/commonMain/resources") - - packaging { - resources { - excludes += "/META-INF/{AL2.0,LGPL2.1}" - } - } - buildTypes { - getByName("release") { - isMinifyEnabled = false - } - } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 + // Android test components (`withHostTest`/`withDeviceTest`) can each be + // enabled at most once, so they're opted into per-module rather than here + // (only enro-runtime currently runs Android host tests for its commonTest). + + compilerOptions { + jvmTarget.set(JvmTarget.JVM_11) + freeCompilerArgs.addAll( + "-P", + "plugin:org.jetbrains.kotlin.parcelize:additionalAnnotation=dev.enro.annotations.Parcelize" + ) + freeCompilerArgs.addAll("-Xexpect-actual-classes") + optIn.addAll(*optIns) } } } diff --git a/docs/ghpages/docs/advanced/animations.md b/docs/ghpages/docs/advanced/animations.md index 0876a5adf..7e4e20e72 100644 --- a/docs/ghpages/docs/advanced/animations.md +++ b/docs/ghpages/docs/advanced/animations.md @@ -320,7 +320,7 @@ sample items. shared icon and title. - [Navigation Destinations → Custom enter/exit on overlays](../core-concepts/navigation-destinations.md#custom-enterexit-on-overlays). -[animations-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/animations/AnimatedNavigation.kt -[staggered-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/animations/StaggeredAnimations.kt -[sharedelements-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/sharedelements/SharedElementAnimations.kt -[recipes-component]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/RecipesComponent.kt +[animations-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/animations/AnimatedNavigation.kt +[staggered-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/animations/StaggeredAnimations.kt +[sharedelements-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/sharedelements/SharedElementAnimations.kt +[recipes-component]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/RecipesComponent.kt diff --git a/docs/ghpages/docs/advanced/path-bindings.md b/docs/ghpages/docs/advanced/path-bindings.md index c9e861526..820bc0fa9 100644 --- a/docs/ghpages/docs/advanced/path-bindings.md +++ b/docs/ghpages/docs/advanced/path-bindings.md @@ -235,5 +235,5 @@ The web platform docs cover the URL/history wiring in detail — see [Advanced Deep Link][advanced-deep-link] — full working examples of annotated and programmatic bindings respectively. -[basic-deep-link]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/deeplink/BasicDeepLink.kt -[advanced-deep-link]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/deeplink/AdvancedDeepLink.kt +[basic-deep-link]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/deeplink/BasicDeepLink.kt +[advanced-deep-link]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/deeplink/AdvancedDeepLink.kt diff --git a/docs/ghpages/docs/advanced/plugins.md b/docs/ghpages/docs/advanced/plugins.md index 085573190..ef69a5494 100644 --- a/docs/ghpages/docs/advanced/plugins.md +++ b/docs/ghpages/docs/advanced/plugins.md @@ -134,4 +134,4 @@ contract. - [OpenedTimestampPlugin recipe][timestamp-recipe] — the worked example above. -[timestamp-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/plugins/OpenedTimestampPlugin.kt +[timestamp-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/plugins/OpenedTimestampPlugin.kt diff --git a/docs/ghpages/docs/advanced/results.md b/docs/ghpages/docs/advanced/results.md index 40d1010e0..1bec1cea9 100644 --- a/docs/ghpages/docs/advanced/results.md +++ b/docs/ghpages/docs/advanced/results.md @@ -199,4 +199,4 @@ back to whoever opened `EditProfile`. See - [Embedded result flows](results/embedded-result-flows.md) and [managed result flows](results/managed-result-flows.md). -[results-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/results/ReturningResults.kt +[results-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/results/ReturningResults.kt diff --git a/docs/ghpages/docs/advanced/results/embedded-result-flows.md b/docs/ghpages/docs/advanced/results/embedded-result-flows.md index 53500499e..7c844c752 100644 --- a/docs/ghpages/docs/advanced/results/embedded-result-flows.md +++ b/docs/ghpages/docs/advanced/results/embedded-result-flows.md @@ -78,4 +78,4 @@ straight-line-able?* If yes, use a managed flow; if no, use callbacks. conditional sequences. - [Returning Results recipe][results-recipe] — the canonical small example. -[results-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/results/ReturningResults.kt +[results-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/results/ReturningResults.kt diff --git a/docs/ghpages/docs/advanced/results/managed-result-flows.md b/docs/ghpages/docs/advanced/results/managed-result-flows.md index 224573d34..bf201d3cd 100644 --- a/docs/ghpages/docs/advanced/results/managed-result-flows.md +++ b/docs/ghpages/docs/advanced/results/managed-result-flows.md @@ -106,4 +106,4 @@ with all previous results intact. enough. - [Managed flow recipe][managedflow-recipe] — full runnable example. -[managedflow-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/managedflow/ManagedFlow.kt +[managedflow-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/managedflow/ManagedFlow.kt diff --git a/docs/ghpages/docs/advanced/synthetic-destinations.md b/docs/ghpages/docs/advanced/synthetic-destinations.md index 4887b80a9..59cb5ae0b 100644 --- a/docs/ghpages/docs/advanced/synthetic-destinations.md +++ b/docs/ghpages/docs/advanced/synthetic-destinations.md @@ -361,4 +361,4 @@ the operation through `container.execute(...)` as the - [Migrating from v2](../migrating-from-v2.md) — `sendResult` / `forwardResult` from Enro 2 are now `complete` / `completeFrom`. -[synthetic-recipes]: https://github.com/isaac-udy/Enro/tree/main/recipes/src/commonMain/kotlin/dev/enro/recipes/synthetic +[synthetic-recipes]: https://github.com/isaac-udy/Enro/tree/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/synthetic diff --git a/docs/ghpages/docs/advanced/view-models.md b/docs/ghpages/docs/advanced/view-models.md index ec81ced7e..b1938c99a 100644 --- a/docs/ghpages/docs/advanced/view-models.md +++ b/docs/ghpages/docs/advanced/view-models.md @@ -147,5 +147,5 @@ For a small inline example, see the [shared ViewModel recipe][shared-recipe]. - [Basic ViewModel recipe][basic-recipe] and [Shared ViewModel recipe][shared-recipe]. -[basic-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/viewmodel/BasicViewModel.kt -[shared-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/viewmodel/SharedViewModel.kt +[basic-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/viewmodel/BasicViewModel.kt +[shared-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/viewmodel/SharedViewModel.kt diff --git a/docs/ghpages/docs/core-concepts/navigation-containers.md b/docs/ghpages/docs/core-concepts/navigation-containers.md index ea9f24da0..6f73664d0 100644 --- a/docs/ghpages/docs/core-concepts/navigation-containers.md +++ b/docs/ghpages/docs/core-concepts/navigation-containers.md @@ -189,6 +189,6 @@ Two recipes go deeper on this pattern: - [Animations](../advanced/animations.md) — `NavigationAnimations` and per-element animation. - Recipes: [list-detail][listdetail-recipe], [tabs][tabs-recipe], [multiple back stacks][multistack-recipe]. -[listdetail-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/listdetail/ListDetailNavigation.kt -[tabs-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/tabs/TabNavigation.kt -[multistack-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/multiplestacks/MultipleBackStacks.kt +[listdetail-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/listdetail/ListDetailNavigation.kt +[tabs-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/tabs/TabNavigation.kt +[multistack-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/multiplestacks/MultipleBackStacks.kt diff --git a/docs/ghpages/docs/core-concepts/navigation-destinations.md b/docs/ghpages/docs/core-concepts/navigation-destinations.md index 4ed5904db..55e95c7c2 100644 --- a/docs/ghpages/docs/core-concepts/navigation-destinations.md +++ b/docs/ghpages/docs/core-concepts/navigation-destinations.md @@ -235,6 +235,6 @@ runtime takes care of bridging it. See the - [Animations](../advanced/animations.md) — animating destinations and their content. - [Recipes][recipes] — every metadata style and several custom scene strategies. -[entryprovider-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/entryprovider/DestinationRegistration.kt -[listdetail-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/listdetail/ListDetailNavigation.kt -[recipes]: https://github.com/isaac-udy/Enro/tree/main/recipes/src/commonMain/kotlin/dev/enro/recipes +[entryprovider-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/entryprovider/DestinationRegistration.kt +[listdetail-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/listdetail/ListDetailNavigation.kt +[recipes]: https://github.com/isaac-udy/Enro/tree/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes diff --git a/docs/ghpages/docs/core-concepts/navigation-handles.md b/docs/ghpages/docs/core-concepts/navigation-handles.md index e758de037..094424d4b 100644 --- a/docs/ghpages/docs/core-concepts/navigation-handles.md +++ b/docs/ghpages/docs/core-concepts/navigation-handles.md @@ -322,4 +322,4 @@ When the user navigates back, the same handle resumes. - [View Models](../advanced/view-models.md) — `by navigationHandle()` inside a ViewModel. - [Request-close confirmation recipe][requestclose-recipe] — full unsaved-changes example. -[requestclose-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/requestclose/RequestCloseConfirmation.kt +[requestclose-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/requestclose/RequestCloseConfirmation.kt diff --git a/docs/ghpages/docs/core-concepts/navigation-keys.md b/docs/ghpages/docs/core-concepts/navigation-keys.md index 7be80718a..0a170ec8c 100644 --- a/docs/ghpages/docs/core-concepts/navigation-keys.md +++ b/docs/ghpages/docs/core-concepts/navigation-keys.md @@ -205,6 +205,6 @@ See the [modular navigation recipe][modular-recipe] for a worked example. - [Results](../advanced/results.md) — how `WithResult` keys produce and consume values. - [Basic recipe][basic-recipe] — minimal end-to-end example. -[basic-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/basic/BasicNavigation.kt -[modular-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/modular/ModularNavigation.kt -[timestamp-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/plugins/OpenedTimestampPlugin.kt +[basic-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/basic/BasicNavigation.kt +[modular-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/modular/ModularNavigation.kt +[timestamp-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/plugins/OpenedTimestampPlugin.kt diff --git a/docs/ghpages/docs/getting-started/installation.md b/docs/ghpages/docs/getting-started/installation.md index 7623a3bcf..c44330576 100644 --- a/docs/ghpages/docs/getting-started/installation.md +++ b/docs/ghpages/docs/getting-started/installation.md @@ -174,4 +174,4 @@ button and URL bar behave as users expect. See the - Walk through [Your First Screen](your-first-screen.md) for an end-to-end example. - If you're upgrading an existing app, read the [migration guide](../migrating-from-v2.md). -[recipes-desktop]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/desktopMain/kotlin/main.kt +[recipes-desktop]: https://github.com/isaac-udy/Enro/blob/main/recipes/app/desktop/src/desktopMain/kotlin/main.kt diff --git a/docs/ghpages/docs/getting-started/your-first-screen.md b/docs/ghpages/docs/getting-started/your-first-screen.md index 60bdceb54..d8e79df69 100644 --- a/docs/ghpages/docs/getting-started/your-first-screen.md +++ b/docs/ghpages/docs/getting-started/your-first-screen.md @@ -173,5 +173,5 @@ That's a working app. From here: [Animations](../advanced/animations.md). - For testing, see [Testing](../advanced/testing.md). -[basic-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/basic/BasicNavigation.kt -[results-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/results/ReturningResults.kt +[basic-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/basic/BasicNavigation.kt +[results-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/results/ReturningResults.kt diff --git a/docs/ghpages/docs/migrating-from-v2.md b/docs/ghpages/docs/migrating-from-v2.md index c6ea72b89..f002558ea 100644 --- a/docs/ghpages/docs/migrating-from-v2.md +++ b/docs/ghpages/docs/migrating-from-v2.md @@ -380,4 +380,4 @@ Callers change from `push`/`present` to `open`, and from `closeWithResult` to - File an issue at [github.com/isaac-udy/Enro/issues](https://github.com/isaac-udy/Enro/issues) if you hit something not covered here. -[recipes]: https://github.com/isaac-udy/Enro/tree/main/recipes/src/commonMain/kotlin/dev/enro/recipes +[recipes]: https://github.com/isaac-udy/Enro/tree/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes diff --git a/docs/ghpages/docs/platform/android.md b/docs/ghpages/docs/platform/android.md index bfe127027..963e18fa3 100644 --- a/docs/ghpages/docs/platform/android.md +++ b/docs/ghpages/docs/platform/android.md @@ -155,5 +155,5 @@ addressable. [interop recipe][interop-recipe] demonstrates a native `AndroidView` inside an Enro destination. -[recipes]: https://github.com/isaac-udy/Enro/tree/main/recipes/src/commonMain/kotlin/dev/enro/recipes -[interop-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/interop/NativeInterop.kt +[recipes]: https://github.com/isaac-udy/Enro/tree/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes +[interop-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/interop/NativeInterop.kt diff --git a/docs/ghpages/docs/platform/desktop.md b/docs/ghpages/docs/platform/desktop.md index c274ea9f2..0cde28451 100644 --- a/docs/ghpages/docs/platform/desktop.md +++ b/docs/ghpages/docs/platform/desktop.md @@ -83,4 +83,4 @@ desktop app. - [Recipes desktop main][desktop-main] — full working example with multi-window, `MenuBar`, key shortcuts. -[desktop-main]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/desktopMain/kotlin/main.kt +[desktop-main]: https://github.com/isaac-udy/Enro/blob/main/recipes/app/desktop/src/desktopMain/kotlin/main.kt diff --git a/docs/ghpages/docs/platform/ios.md b/docs/ghpages/docs/platform/ios.md index cbbc177f0..c76082f58 100644 --- a/docs/ghpages/docs/platform/ios.md +++ b/docs/ghpages/docs/platform/ios.md @@ -107,4 +107,4 @@ class ViewController: UIViewController { - [Recipes iOS entrypoint][ios-recipe] — the working `MainViewController()` Enro uses for its own runnable iOS recipes. -[ios-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/iosMain/kotlin/dev/enro/recipes/MainViewController.kt +[ios-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/app/ios/src/iosMain/kotlin/dev/enro/recipes/MainViewController.kt diff --git a/docs/ghpages/docs/platform/web.md b/docs/ghpages/docs/platform/web.md index 78d0e338d..da2f5ac0f 100644 --- a/docs/ghpages/docs/platform/web.md +++ b/docs/ghpages/docs/platform/web.md @@ -155,4 +155,4 @@ need it to survive page reloads, handle it via your own - [Recipes web main][web-main] — full working bootstrap for the recipes app. [cmp-web]: https://github.com/JetBrains/compose-multiplatform/blob/master/web/README.md -[web-main]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/wasmJsMain/kotlin/main.kt +[web-main]: https://github.com/isaac-udy/Enro/blob/main/recipes/app/web/src/wasmJsMain/kotlin/main.kt diff --git a/docs/ghpages/docs/troubleshooting.md b/docs/ghpages/docs/troubleshooting.md index f0e9315d4..bd4a9a705 100644 --- a/docs/ghpages/docs/troubleshooting.md +++ b/docs/ghpages/docs/troubleshooting.md @@ -276,4 +276,4 @@ includes: - The Enro version you're on (e.g. `3.0.0-beta01`). - The platform (Android API level, iOS version, JDK version, browser). -[modular-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/src/commonMain/kotlin/dev/enro/recipes/modular/ModularNavigation.kt +[modular-recipe]: https://github.com/isaac-udy/Enro/blob/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes/modular/ModularNavigation.kt diff --git a/docs/ghpages/index.md b/docs/ghpages/index.md index 9eae704df..d66bea040 100644 --- a/docs/ghpages/index.md +++ b/docs/ghpages/index.md @@ -72,7 +72,7 @@ for the API delta and a step-by-step conversion. ## Recipes -The [recipes module](https://github.com/isaac-udy/Enro/tree/main/recipes/src/commonMain/kotlin/dev/enro/recipes) +The [recipes module](https://github.com/isaac-udy/Enro/tree/main/recipes/common/src/commonMain/kotlin/dev/enro/recipes) in the source repo is a set of small, runnable examples — one per concept. The documentation below links into them for every working snippet. diff --git a/enro-runtime/build.gradle.kts b/enro-runtime/build.gradle.kts index 5fc2342e3..19f7d5575 100644 --- a/enro-runtime/build.gradle.kts +++ b/enro-runtime/build.gradle.kts @@ -6,26 +6,30 @@ plugins { kotlin("plugin.serialization") } -android { - testOptions { - unitTests { +kotlin { + // Enable the Android host (unit) test component so commonTest also runs on the + // Android JVM target. + androidLibrary { + withHostTest { // Return default values for unmocked Android framework methods // rather than throwing "Method ... not mocked" — defensive against // any test path that brushes a stub from android.jar (e.g. // savedstate's Bundle). isReturnDefaultValues = true } - unitTests.all { - // These tests use Compose-UI-test or platform SavedState APIs - // that require a real Android runtime (Robolectric or instrumentation) - // to function. They already run on :enro-runtime:desktopTest - // (and iosSimulatorArm64Test) — keep coverage there and skip the - // JVM-only Android unit-test pass. - it.filter { - excludeTestsMatching("dev.enro.SceneHarnessSmokeTest") - excludeTestsMatching("dev.enro.SceneIntegrationTests") - excludeTestsMatching("dev.enro.BackstackSavedStateTests") - } + } +} + +// These tests use Compose-UI-test or platform SavedState APIs that require a real +// Android runtime (Robolectric or instrumentation) to function. They already run on +// :enro-runtime:desktopTest (and iosSimulatorArm64Test) — keep coverage there and skip +// the JVM-only Android host-test pass. +tasks.withType().configureEach { + if (name.contains("AndroidHostTest", ignoreCase = true)) { + filter { + excludeTestsMatching("dev.enro.SceneHarnessSmokeTest") + excludeTestsMatching("dev.enro.SceneIntegrationTests") + excludeTestsMatching("dev.enro.BackstackSavedStateTests") } } } diff --git a/enro/build.gradle.kts b/enro/build.gradle.kts index 2a26535b2..6b56d8f19 100644 --- a/enro/build.gradle.kts +++ b/enro/build.gradle.kts @@ -8,18 +8,6 @@ plugins { kotlin("plugin.serialization") } -android { - lint { - textReport = true - } - testOptions { - animationsDisabled = true - } - packaging { - resources.excludes.add("META-INF/*") - } -} - tasks.withType() { compilerOptions { jvmTarget.set(JvmTarget.JVM_11) @@ -28,6 +16,14 @@ tasks.withType() { } kotlin { + androidLibrary { + lint { + textReport = true + } + packaging { + resources.excludes.add("META-INF/*") + } + } sourceSets { desktopMain.dependencies { @@ -41,41 +37,6 @@ kotlin { androidMain.dependencies { } - androidUnitTest.dependencies { - implementation(libs.testing.junit) - implementation(libs.testing.androidx.junit) - implementation(libs.testing.androidx.runner) - implementation(libs.testing.robolectric) - implementation("dev.enro:enro-test:${project.enroVersionName}") - } - androidInstrumentedTest.dependencies { - implementation("dev.enro:enro-test:${project.enroVersionName}") - - implementation(libs.testing.junit) - - implementation(libs.kotlin.reflect) - implementation(libs.androidx.core) - implementation(libs.androidx.appcompat) - implementation(libs.androidx.fragment) - implementation(libs.androidx.activity) - implementation(libs.androidx.recyclerview) - - implementation(libs.testing.androidx.fragment) - implementation(libs.testing.androidx.junit) - implementation(libs.testing.androidx.espresso) - implementation(libs.testing.androidx.espressoRecyclerView) - implementation(libs.testing.androidx.espressoIntents) - implementation(libs.testing.androidx.runner) - - implementation(libs.testing.androidx.compose) - implementation(libs.compose.materialIcons) - - implementation(libs.androidx.navigation.fragment) - implementation(libs.androidx.navigation.ui) - - implementation(libs.leakcanary) - implementation(libs.testing.leakcanary.instrumentation) - } } } diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index f6b961fd5..b1b8ef56b 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 14b068f90..b52fb7e71 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,9 @@ -#Fri Nov 06 21:58:12 NZDT 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.0-bin.zip +networkTimeout=10000 +retries=0 +retryBackOffMs=500 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip diff --git a/gradlew b/gradlew index cccdd3d51..b9bb139f7 100755 --- a/gradlew +++ b/gradlew @@ -1,78 +1,128 @@ -#!/usr/bin/env sh +#!/bin/sh + +# +# Copyright © 2015 the original authors. +# +# 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 +# +# https://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. +# +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -81,92 +131,118 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=$((i+1)) + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" fi +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index f9553162f..24c62d56f 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,84 +1,82 @@ -@if "%DEBUG%" == "" @echo off +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @rem @rem ########################################################################## -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal +@rem Set local scope for the variables, and ensure extensions are enabled +setlocal EnableExtensions set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 -goto fail +"%COMSPEC%" /c exit 1 :findJavaFromJavaHome set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +if exist "%JAVA_EXE%" goto execute -goto fail +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* +"%COMSPEC%" /c exit 1 :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal +@rem Execute Gradle +@rem endlocal doesn't take effect until after the line is parsed and variables are expanded +@rem which allows us to clear the local environment before executing the java command +endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel -:omega +:exitWithErrorLevel +@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts +"%COMSPEC%" /c exit %ERRORLEVEL% diff --git a/libs.versions.toml b/libs.versions.toml index 5a465cf0d..30f5d8cda 100644 --- a/libs.versions.toml +++ b/libs.versions.toml @@ -1,5 +1,9 @@ [versions] -agp = "8.13.2" +# Pinned to 9.0.0 (not 9.2.0) so the project can be synced in IntelliJ IDEA, whose +# bundled Android plugin currently supports AGP up to 9.0.0. The KMP-library DSL uses +# the `androidLibrary {}` accessor, which is valid on 9.0–9.2, so this can be bumped +# back to "9.2.0" once the IDE supports it (with only a deprecation warning). +agp = "9.0.0" android-compileSdk = "36" android-minSdk = "23" android-targetSdk = "36" @@ -114,6 +118,7 @@ lint-api = "com.android.tools.lint:lint-api:32.2.1" [plugins] androidApplication = { id = "com.android.application", version.ref = "agp" } androidLibrary = { id = "com.android.library", version.ref = "agp" } +androidKotlinMultiplatformLibrary = { id = "com.android.kotlin.multiplatform.library", version.ref = "agp" } jetbrainsCompose = { id = "org.jetbrains.compose", version.ref = "compose-plugin" } compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } diff --git a/recipes/app/android/build.gradle.kts b/recipes/app/android/build.gradle.kts new file mode 100644 index 000000000..dde6d4c67 --- /dev/null +++ b/recipes/app/android/build.gradle.kts @@ -0,0 +1,52 @@ +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + +plugins { + id("com.android.application") + id("org.jetbrains.compose") + id("org.jetbrains.kotlin.plugin.compose") +} + +android { + namespace = "dev.enro.recipes" + compileSdk = libs.versions.android.compileSdk.get().toInt() + defaultConfig { + applicationId = "dev.enro.recipes" + minSdk = libs.versions.android.minSdk.get().toInt() + targetSdk = libs.versions.android.targetSdk.get().toInt() + versionCode = 1 + versionName = "1.0" + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + buildFeatures { + compose = true + } +} + +kotlin { + compilerOptions { + jvmTarget.set(JvmTarget.JVM_11) + optIn.addAll( + "dev.enro.annotations.AdvancedEnroApi", + "dev.enro.annotations.ExperimentalEnroApi", + "kotlin.uuid.ExperimentalUuidApi", + ) + } +} + +dependencies { + implementation(project(":recipes:common")) + implementation(compose.material) + implementation(compose.material3) + implementation(compose.uiTooling) + implementation(libs.compose.activity) + implementation(libs.androidx.core) + implementation(libs.androidx.appcompat) + implementation(libs.androidx.viewmodel) + implementation(libs.androidx.fragment) + implementation(libs.androidx.fragment.compose) + implementation(libs.androidx.activity) + implementation(libs.material) +} diff --git a/recipes/src/androidMain/AndroidManifest.xml b/recipes/app/android/src/main/AndroidManifest.xml similarity index 100% rename from recipes/src/androidMain/AndroidManifest.xml rename to recipes/app/android/src/main/AndroidManifest.xml diff --git a/recipes/src/androidMain/kotlin/dev/enro/recipes/RecipesActivity.kt b/recipes/app/android/src/main/kotlin/dev/enro/recipes/RecipesActivity.kt similarity index 100% rename from recipes/src/androidMain/kotlin/dev/enro/recipes/RecipesActivity.kt rename to recipes/app/android/src/main/kotlin/dev/enro/recipes/RecipesActivity.kt diff --git a/recipes/src/androidMain/kotlin/dev/enro/recipes/RecipesApplication.kt b/recipes/app/android/src/main/kotlin/dev/enro/recipes/RecipesApplication.kt similarity index 100% rename from recipes/src/androidMain/kotlin/dev/enro/recipes/RecipesApplication.kt rename to recipes/app/android/src/main/kotlin/dev/enro/recipes/RecipesApplication.kt diff --git a/recipes/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml b/recipes/app/android/src/main/res/drawable-v24/ic_launcher_foreground.xml similarity index 100% rename from recipes/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml rename to recipes/app/android/src/main/res/drawable-v24/ic_launcher_foreground.xml diff --git a/recipes/src/androidMain/res/drawable/ic_launcher_background.xml b/recipes/app/android/src/main/res/drawable/ic_launcher_background.xml similarity index 100% rename from recipes/src/androidMain/res/drawable/ic_launcher_background.xml rename to recipes/app/android/src/main/res/drawable/ic_launcher_background.xml diff --git a/recipes/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml b/recipes/app/android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from recipes/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml rename to recipes/app/android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/recipes/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml b/recipes/app/android/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml similarity index 100% rename from recipes/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml rename to recipes/app/android/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml diff --git a/recipes/src/androidMain/res/mipmap-anydpi-v33/ic_launcher.xml b/recipes/app/android/src/main/res/mipmap-anydpi-v33/ic_launcher.xml similarity index 100% rename from recipes/src/androidMain/res/mipmap-anydpi-v33/ic_launcher.xml rename to recipes/app/android/src/main/res/mipmap-anydpi-v33/ic_launcher.xml diff --git a/recipes/src/androidMain/res/mipmap-hdpi/ic_launcher.webp b/recipes/app/android/src/main/res/mipmap-hdpi/ic_launcher.webp similarity index 100% rename from recipes/src/androidMain/res/mipmap-hdpi/ic_launcher.webp rename to recipes/app/android/src/main/res/mipmap-hdpi/ic_launcher.webp diff --git a/recipes/src/androidMain/res/mipmap-hdpi/ic_launcher_round.webp b/recipes/app/android/src/main/res/mipmap-hdpi/ic_launcher_round.webp similarity index 100% rename from recipes/src/androidMain/res/mipmap-hdpi/ic_launcher_round.webp rename to recipes/app/android/src/main/res/mipmap-hdpi/ic_launcher_round.webp diff --git a/recipes/src/androidMain/res/mipmap-mdpi/ic_launcher.webp b/recipes/app/android/src/main/res/mipmap-mdpi/ic_launcher.webp similarity index 100% rename from recipes/src/androidMain/res/mipmap-mdpi/ic_launcher.webp rename to recipes/app/android/src/main/res/mipmap-mdpi/ic_launcher.webp diff --git a/recipes/src/androidMain/res/mipmap-mdpi/ic_launcher_round.webp b/recipes/app/android/src/main/res/mipmap-mdpi/ic_launcher_round.webp similarity index 100% rename from recipes/src/androidMain/res/mipmap-mdpi/ic_launcher_round.webp rename to recipes/app/android/src/main/res/mipmap-mdpi/ic_launcher_round.webp diff --git a/recipes/src/androidMain/res/mipmap-xhdpi/ic_launcher.webp b/recipes/app/android/src/main/res/mipmap-xhdpi/ic_launcher.webp similarity index 100% rename from recipes/src/androidMain/res/mipmap-xhdpi/ic_launcher.webp rename to recipes/app/android/src/main/res/mipmap-xhdpi/ic_launcher.webp diff --git a/recipes/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.webp b/recipes/app/android/src/main/res/mipmap-xhdpi/ic_launcher_round.webp similarity index 100% rename from recipes/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.webp rename to recipes/app/android/src/main/res/mipmap-xhdpi/ic_launcher_round.webp diff --git a/recipes/src/androidMain/res/mipmap-xxhdpi/ic_launcher.webp b/recipes/app/android/src/main/res/mipmap-xxhdpi/ic_launcher.webp similarity index 100% rename from recipes/src/androidMain/res/mipmap-xxhdpi/ic_launcher.webp rename to recipes/app/android/src/main/res/mipmap-xxhdpi/ic_launcher.webp diff --git a/recipes/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.webp b/recipes/app/android/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp similarity index 100% rename from recipes/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.webp rename to recipes/app/android/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp diff --git a/recipes/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.webp b/recipes/app/android/src/main/res/mipmap-xxxhdpi/ic_launcher.webp similarity index 100% rename from recipes/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.webp rename to recipes/app/android/src/main/res/mipmap-xxxhdpi/ic_launcher.webp diff --git a/recipes/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.webp b/recipes/app/android/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp similarity index 100% rename from recipes/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.webp rename to recipes/app/android/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp diff --git a/recipes/src/androidMain/res/values-night/themes.xml b/recipes/app/android/src/main/res/values-night/themes.xml similarity index 100% rename from recipes/src/androidMain/res/values-night/themes.xml rename to recipes/app/android/src/main/res/values-night/themes.xml diff --git a/recipes/src/androidMain/res/values/colors.xml b/recipes/app/android/src/main/res/values/colors.xml similarity index 100% rename from recipes/src/androidMain/res/values/colors.xml rename to recipes/app/android/src/main/res/values/colors.xml diff --git a/recipes/src/androidMain/res/values/strings.xml b/recipes/app/android/src/main/res/values/strings.xml similarity index 100% rename from recipes/src/androidMain/res/values/strings.xml rename to recipes/app/android/src/main/res/values/strings.xml diff --git a/recipes/src/androidMain/res/values/themes.xml b/recipes/app/android/src/main/res/values/themes.xml similarity index 100% rename from recipes/src/androidMain/res/values/themes.xml rename to recipes/app/android/src/main/res/values/themes.xml diff --git a/recipes/app/desktop/build.gradle.kts b/recipes/app/desktop/build.gradle.kts new file mode 100644 index 000000000..3070791b5 --- /dev/null +++ b/recipes/app/desktop/build.gradle.kts @@ -0,0 +1,46 @@ +import org.jetbrains.compose.desktop.application.dsl.TargetFormat +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + +plugins { + kotlin("multiplatform") + id("org.jetbrains.compose") + id("org.jetbrains.kotlin.plugin.compose") +} + +kotlin { + jvm("desktop") { + compilerOptions { + jvmTarget.set(JvmTarget.JVM_11) + optIn.addAll( + "dev.enro.annotations.AdvancedEnroApi", + "dev.enro.annotations.ExperimentalEnroApi", + "kotlin.uuid.ExperimentalUuidApi", + ) + } + } + sourceSets { + val desktopMain by getting + desktopMain.dependencies { + implementation(project(":recipes:common")) + implementation(compose.desktop.currentOs) + implementation(compose.runtime) + implementation(compose.foundation) + implementation(compose.material3) + implementation(libs.kotlin.reflect) + implementation(libs.kotlinx.coroutines.core) + implementation(libs.kotlinx.coroutines.swing) + implementation(libs.androidx.savedState) + } + } +} + +compose.desktop { + application { + mainClass = "MainKt" + nativeDistributions { + targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) + packageName = "dev.enro.recipes" + packageVersion = "1.0.0" + } + } +} diff --git a/recipes/src/desktopMain/kotlin/main.kt b/recipes/app/desktop/src/desktopMain/kotlin/main.kt similarity index 100% rename from recipes/src/desktopMain/kotlin/main.kt rename to recipes/app/desktop/src/desktopMain/kotlin/main.kt diff --git a/recipes/app/ios/build.gradle.kts b/recipes/app/ios/build.gradle.kts new file mode 100644 index 000000000..1c3b08091 --- /dev/null +++ b/recipes/app/ios/build.gradle.kts @@ -0,0 +1,31 @@ +plugins { + kotlin("multiplatform") + id("org.jetbrains.compose") + id("org.jetbrains.kotlin.plugin.compose") +} + +kotlin { + listOf( + iosArm64(), + iosSimulatorArm64(), + ).forEach { iosTarget -> + iosTarget.binaries.framework { + baseName = "RecipesApp" + isStatic = true + } + iosTarget.compilerOptions { + optIn.addAll( + "dev.enro.annotations.AdvancedEnroApi", + "dev.enro.annotations.ExperimentalEnroApi", + "kotlin.uuid.ExperimentalUuidApi", + "kotlin.experimental.ExperimentalObjCName", + ) + } + } + sourceSets { + iosMain.dependencies { + implementation(project(":recipes:common")) + implementation(compose.runtime) + } + } +} diff --git a/recipes/src/iosMain/kotlin/dev/enro/recipes/MainViewController.kt b/recipes/app/ios/src/iosMain/kotlin/dev/enro/recipes/MainViewController.kt similarity index 100% rename from recipes/src/iosMain/kotlin/dev/enro/recipes/MainViewController.kt rename to recipes/app/ios/src/iosMain/kotlin/dev/enro/recipes/MainViewController.kt diff --git a/recipes/app/web/build.gradle.kts b/recipes/app/web/build.gradle.kts new file mode 100644 index 000000000..fa4500d86 --- /dev/null +++ b/recipes/app/web/build.gradle.kts @@ -0,0 +1,36 @@ +import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl + +plugins { + kotlin("multiplatform") + id("org.jetbrains.compose") + id("org.jetbrains.kotlin.plugin.compose") +} + +kotlin { + @OptIn(ExperimentalWasmDsl::class) + wasmJs { + outputModuleName.set("recipes") + browser { + commonWebpackConfig { + outputFileName = "recipes.js" + } + } + binaries.executable() + compilerOptions { + optIn.addAll( + "dev.enro.annotations.AdvancedEnroApi", + "dev.enro.annotations.ExperimentalEnroApi", + "kotlin.uuid.ExperimentalUuidApi", + ) + } + } + sourceSets { + wasmJsMain.dependencies { + implementation(project(":recipes:common")) + implementation(compose.runtime) + implementation(compose.ui) + implementation(compose.foundation) + implementation(compose.components.resources) + } + } +} diff --git a/recipes/src/wasmJsMain/kotlin/main.kt b/recipes/app/web/src/wasmJsMain/kotlin/main.kt similarity index 100% rename from recipes/src/wasmJsMain/kotlin/main.kt rename to recipes/app/web/src/wasmJsMain/kotlin/main.kt diff --git a/recipes/src/wasmJsMain/resources/index.html b/recipes/app/web/src/wasmJsMain/resources/index.html similarity index 100% rename from recipes/src/wasmJsMain/resources/index.html rename to recipes/app/web/src/wasmJsMain/resources/index.html diff --git a/recipes/src/wasmJsMain/resources/styles.css b/recipes/app/web/src/wasmJsMain/resources/styles.css similarity index 100% rename from recipes/src/wasmJsMain/resources/styles.css rename to recipes/app/web/src/wasmJsMain/resources/styles.css diff --git a/recipes/build.gradle.kts b/recipes/common/build.gradle.kts similarity index 58% rename from recipes/build.gradle.kts rename to recipes/common/build.gradle.kts index 8c1263731..7d0a9943f 100644 --- a/recipes/build.gradle.kts +++ b/recipes/common/build.gradle.kts @@ -1,36 +1,26 @@ import org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode plugins { - id("configure-application") + id("configure-library") id("com.google.devtools.ksp") + id("configure-compose") kotlin("plugin.serialization") } kotlin { explicitApi = ExplicitApiMode.Disabled -} -kotlin { sourceSets { commonMain.dependencies { - implementation("dev.enro:enro:${project.enroVersionName}") - implementation("dev.enro:enro-compat:${project.enroVersionName}") + // `api` so the per-platform app modules (:recipes:app:*) get the Enro APIs + // (incl. platform entry points like EnroUIViewController / GenericRootWindow / + // EnroBrowserContent) transitively from :recipes:common. + api("dev.enro:enro:${project.enroVersionName}") + api("dev.enro:enro-compat:${project.enroVersionName}") implementation(libs.kotlinx.serialization) implementation(libs.compose.lifecycle) } - androidMain.dependencies { - implementation(libs.compose.material) - implementation(libs.kotlin.stdLib) - implementation(libs.androidx.core) - implementation(libs.androidx.appcompat) - implementation(libs.androidx.viewmodel) - implementation(libs.androidx.fragment) - implementation(libs.androidx.fragment.compose) - implementation(libs.androidx.activity) - implementation(libs.material) - } - desktopMain.dependencies { implementation(libs.kotlin.reflect) implementation(libs.kotlinx.coroutines.core) diff --git a/recipes/src/androidMain/kotlin/dev/enro/recipes/interop/NativeInterop.android.kt b/recipes/common/src/androidMain/kotlin/dev/enro/recipes/interop/NativeInterop.android.kt similarity index 100% rename from recipes/src/androidMain/kotlin/dev/enro/recipes/interop/NativeInterop.android.kt rename to recipes/common/src/androidMain/kotlin/dev/enro/recipes/interop/NativeInterop.android.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/RecipeScaffold.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/RecipeScaffold.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/RecipeScaffold.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/RecipeScaffold.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/RecipesComponent.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/RecipesComponent.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/RecipesComponent.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/RecipesComponent.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/SelectRecipe.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/SelectRecipe.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/SelectRecipe.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/SelectRecipe.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/animations/AnimatedNavigation.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/animations/AnimatedNavigation.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/animations/AnimatedNavigation.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/animations/AnimatedNavigation.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/animations/StaggeredAnimations.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/animations/StaggeredAnimations.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/animations/StaggeredAnimations.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/animations/StaggeredAnimations.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/basic/BasicNavigation.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/basic/BasicNavigation.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/basic/BasicNavigation.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/basic/BasicNavigation.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/bottomsheet/BottomSheetNavigation.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/bottomsheet/BottomSheetNavigation.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/bottomsheet/BottomSheetNavigation.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/bottomsheet/BottomSheetNavigation.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/conditional/ConditionalNavigation.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/conditional/ConditionalNavigation.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/conditional/ConditionalNavigation.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/conditional/ConditionalNavigation.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/deeplink/AdvancedDeepLink.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/deeplink/AdvancedDeepLink.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/deeplink/AdvancedDeepLink.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/deeplink/AdvancedDeepLink.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/deeplink/BasicDeepLink.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/deeplink/BasicDeepLink.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/deeplink/BasicDeepLink.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/deeplink/BasicDeepLink.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/dialog/DialogNavigation.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/dialog/DialogNavigation.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/dialog/DialogNavigation.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/dialog/DialogNavigation.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/entryprovider/DestinationRegistration.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/entryprovider/DestinationRegistration.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/entryprovider/DestinationRegistration.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/entryprovider/DestinationRegistration.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/interop/NativeInterop.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/interop/NativeInterop.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/interop/NativeInterop.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/interop/NativeInterop.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/listdetail/ListDetailNavigation.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/listdetail/ListDetailNavigation.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/listdetail/ListDetailNavigation.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/listdetail/ListDetailNavigation.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/listdetail/ListDetailScene.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/listdetail/ListDetailScene.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/listdetail/ListDetailScene.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/listdetail/ListDetailScene.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/listdetail/ListDetailWithContainersNavigation.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/listdetail/ListDetailWithContainersNavigation.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/listdetail/ListDetailWithContainersNavigation.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/listdetail/ListDetailWithContainersNavigation.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/managedflow/ManagedFlow.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/managedflow/ManagedFlow.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/managedflow/ManagedFlow.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/managedflow/ManagedFlow.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/modular/ModularNavigation.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/modular/ModularNavigation.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/modular/ModularNavigation.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/modular/ModularNavigation.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/multiplestacks/MultipleBackStacks.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/multiplestacks/MultipleBackStacks.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/multiplestacks/MultipleBackStacks.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/multiplestacks/MultipleBackStacks.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/plugins/OpenedTimestampPlugin.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/plugins/OpenedTimestampPlugin.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/plugins/OpenedTimestampPlugin.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/plugins/OpenedTimestampPlugin.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/requestclose/RequestCloseConfirmation.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/requestclose/RequestCloseConfirmation.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/requestclose/RequestCloseConfirmation.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/requestclose/RequestCloseConfirmation.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/results/ReturningResults.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/results/ReturningResults.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/results/ReturningResults.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/results/ReturningResults.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/saveable/SaveableBackStack.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/saveable/SaveableBackStack.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/saveable/SaveableBackStack.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/saveable/SaveableBackStack.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/README.md b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/README.md similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/README.md rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/README.md diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellBreakpoint.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellBreakpoint.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellBreakpoint.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellBreakpoint.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellMetadata.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellMetadata.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellMetadata.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellMetadata.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellOverlaySceneStrategy.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellOverlaySceneStrategy.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellOverlaySceneStrategy.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellOverlaySceneStrategy.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellPaneSceneStrategy.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellPaneSceneStrategy.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellPaneSceneStrategy.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellPaneSceneStrategy.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellSceneDecorator.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellSceneDecorator.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellSceneDecorator.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellSceneDecorator.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellSceneNavigation.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellSceneNavigation.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellSceneNavigation.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/ShellSceneNavigation.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/CartOverlayDestination.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/CartOverlayDestination.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/CartOverlayDestination.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/CartOverlayDestination.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/ImmersiveImageDestination.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/ImmersiveImageDestination.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/ImmersiveImageDestination.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/ImmersiveImageDestination.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/ProductDetailDestination.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/ProductDetailDestination.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/ProductDetailDestination.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/ProductDetailDestination.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/ProductFiltersDestination.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/ProductFiltersDestination.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/ProductFiltersDestination.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/ProductFiltersDestination.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/ProductListDestination.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/ProductListDestination.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/ProductListDestination.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/ProductListDestination.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/ShellHomeDestination.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/ShellHomeDestination.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/ShellHomeDestination.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/complex/destinations/ShellHomeDestination.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/simple/AdaptiveNavigationSceneDecorator.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/simple/AdaptiveNavigationSceneDecorator.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/simple/AdaptiveNavigationSceneDecorator.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/simple/AdaptiveNavigationSceneDecorator.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/simple/SceneDecorationNavigation.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/simple/SceneDecorationNavigation.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/simple/SceneDecorationNavigation.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/scenedecoration/simple/SceneDecorationNavigation.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/sharedelements/SharedElementAnimations.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/sharedelements/SharedElementAnimations.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/sharedelements/SharedElementAnimations.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/sharedelements/SharedElementAnimations.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/synthetic/AuthGateSynthetic.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/synthetic/AuthGateSynthetic.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/synthetic/AuthGateSynthetic.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/synthetic/AuthGateSynthetic.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/synthetic/ExternalUrlSynthetic.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/synthetic/ExternalUrlSynthetic.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/synthetic/ExternalUrlSynthetic.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/synthetic/ExternalUrlSynthetic.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/synthetic/ProfileDeciderSynthetic.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/synthetic/ProfileDeciderSynthetic.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/synthetic/ProfileDeciderSynthetic.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/synthetic/ProfileDeciderSynthetic.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/tabs/TabNavigation.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/tabs/TabNavigation.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/tabs/TabNavigation.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/tabs/TabNavigation.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/twopane/TwoPaneNavigation.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/twopane/TwoPaneNavigation.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/twopane/TwoPaneNavigation.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/twopane/TwoPaneNavigation.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/twopane/TwoPaneScene.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/twopane/TwoPaneScene.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/twopane/TwoPaneScene.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/twopane/TwoPaneScene.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/util/NavigationContainerGroup.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/util/NavigationContainerGroup.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/util/NavigationContainerGroup.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/util/NavigationContainerGroup.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/viewmodel/BasicViewModel.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/viewmodel/BasicViewModel.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/viewmodel/BasicViewModel.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/viewmodel/BasicViewModel.kt diff --git a/recipes/src/commonMain/kotlin/dev/enro/recipes/viewmodel/SharedViewModel.kt b/recipes/common/src/commonMain/kotlin/dev/enro/recipes/viewmodel/SharedViewModel.kt similarity index 100% rename from recipes/src/commonMain/kotlin/dev/enro/recipes/viewmodel/SharedViewModel.kt rename to recipes/common/src/commonMain/kotlin/dev/enro/recipes/viewmodel/SharedViewModel.kt diff --git a/recipes/src/desktopMain/kotlin/dev/enro/recipes/interop/NativeInterop.desktop.kt b/recipes/common/src/desktopMain/kotlin/dev/enro/recipes/interop/NativeInterop.desktop.kt similarity index 100% rename from recipes/src/desktopMain/kotlin/dev/enro/recipes/interop/NativeInterop.desktop.kt rename to recipes/common/src/desktopMain/kotlin/dev/enro/recipes/interop/NativeInterop.desktop.kt diff --git a/recipes/src/iosMain/kotlin/dev/enro/recipes/interop/NativeInterop.ios.kt b/recipes/common/src/iosMain/kotlin/dev/enro/recipes/interop/NativeInterop.ios.kt similarity index 100% rename from recipes/src/iosMain/kotlin/dev/enro/recipes/interop/NativeInterop.ios.kt rename to recipes/common/src/iosMain/kotlin/dev/enro/recipes/interop/NativeInterop.ios.kt diff --git a/recipes/src/wasmJsMain/kotlin/dev/enro/recipes/interop/NativeInterop.wasmJs.kt b/recipes/common/src/wasmJsMain/kotlin/dev/enro/recipes/interop/NativeInterop.wasmJs.kt similarity index 100% rename from recipes/src/wasmJsMain/kotlin/dev/enro/recipes/interop/NativeInterop.wasmJs.kt rename to recipes/common/src/wasmJsMain/kotlin/dev/enro/recipes/interop/NativeInterop.wasmJs.kt diff --git a/settings.gradle.kts b/settings.gradle.kts index 93439233e..5b5b72b0a 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -6,9 +6,18 @@ include(":enro") include(":enro-common") include(":enro-runtime") include(":enro-compat") -include(":tests:application") +include(":recipes:common") +include(":recipes:app:android") +include(":recipes:app:desktop") +include(":recipes:app:ios") +include(":recipes:app:web") + include(":tests:module-one") -include(":recipes") +include(":tests:application:common") +include(":tests:application:app:android") +include(":tests:application:app:desktop") +include(":tests:application:app:ios") +include(":tests:application:app:web") dependencyResolutionManagement { versionCatalogs { diff --git a/tests/application/app/android/build.gradle.kts b/tests/application/app/android/build.gradle.kts new file mode 100644 index 000000000..aa49a2050 --- /dev/null +++ b/tests/application/app/android/build.gradle.kts @@ -0,0 +1,31 @@ +plugins { + id("com.android.application") +} + +// Thin runnable APK around :tests:application:common. The Application/Activity classes +// referenced by the manifest, plus all resources, are provided by :common (a library). +// The instrumented test suite lives in :common's androidDeviceTest (same module as the +// content it exercises), so there are no tests here. +android { + // Distinct from :common's namespace (Android requires unique namespaces per module). + // The manifest's android:name entries are fully-qualified, so they still resolve to + // the dev.enro.tests.application.* classes provided by :common. applicationId keeps + // the original package id. + namespace = "dev.enro.tests.application.app" + compileSdk = libs.versions.android.compileSdk.get().toInt() + defaultConfig { + applicationId = "dev.enro.tests.application" + minSdk = libs.versions.android.minSdk.get().toInt() + targetSdk = libs.versions.android.targetSdk.get().toInt() + versionCode = 1 + versionName = "1.0" + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } +} + +dependencies { + implementation(project(":tests:application:common")) +} diff --git a/tests/application/src/androidMain/AndroidManifest.xml b/tests/application/app/android/src/main/AndroidManifest.xml similarity index 100% rename from tests/application/src/androidMain/AndroidManifest.xml rename to tests/application/app/android/src/main/AndroidManifest.xml diff --git a/tests/application/app/desktop/build.gradle.kts b/tests/application/app/desktop/build.gradle.kts new file mode 100644 index 000000000..ca802e16c --- /dev/null +++ b/tests/application/app/desktop/build.gradle.kts @@ -0,0 +1,46 @@ +import org.jetbrains.compose.desktop.application.dsl.TargetFormat +import org.jetbrains.kotlin.gradle.dsl.JvmTarget + +plugins { + kotlin("multiplatform") + id("org.jetbrains.compose") + id("org.jetbrains.kotlin.plugin.compose") +} + +kotlin { + jvm("desktop") { + compilerOptions { + jvmTarget.set(JvmTarget.JVM_11) + optIn.addAll( + "dev.enro.annotations.AdvancedEnroApi", + "dev.enro.annotations.ExperimentalEnroApi", + "kotlin.uuid.ExperimentalUuidApi", + ) + } + } + sourceSets { + val desktopMain by getting + desktopMain.dependencies { + implementation(project(":tests:application:common")) + implementation(compose.desktop.currentOs) + implementation(compose.runtime) + implementation(compose.foundation) + implementation(compose.material3) + implementation(libs.kotlin.reflect) + implementation(libs.kotlinx.coroutines.core) + implementation(libs.kotlinx.coroutines.swing) + implementation(libs.androidx.savedState) + } + } +} + +compose.desktop { + application { + mainClass = "MainKt" + nativeDistributions { + targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) + packageName = "dev.enro.tests.application" + packageVersion = "1.0.0" + } + } +} diff --git a/tests/application/src/desktopMain/kotlin/main.kt b/tests/application/app/desktop/src/desktopMain/kotlin/main.kt similarity index 100% rename from tests/application/src/desktopMain/kotlin/main.kt rename to tests/application/app/desktop/src/desktopMain/kotlin/main.kt diff --git a/tests/application/app/ios/build.gradle.kts b/tests/application/app/ios/build.gradle.kts new file mode 100644 index 000000000..cfe0d658f --- /dev/null +++ b/tests/application/app/ios/build.gradle.kts @@ -0,0 +1,33 @@ +plugins { + kotlin("multiplatform") + id("org.jetbrains.compose") + id("org.jetbrains.kotlin.plugin.compose") +} + +kotlin { + listOf( + iosArm64(), + iosSimulatorArm64(), + ).forEach { iosTarget -> + iosTarget.binaries.framework { + // Must match the name the Xcode project links / Swift imports + // (`import EnroTestsApplication`). + baseName = "EnroTestsApplication" + isStatic = true + } + iosTarget.compilerOptions { + optIn.addAll( + "dev.enro.annotations.AdvancedEnroApi", + "dev.enro.annotations.ExperimentalEnroApi", + "kotlin.uuid.ExperimentalUuidApi", + "kotlin.experimental.ExperimentalObjCName", + ) + } + } + sourceSets { + iosMain.dependencies { + implementation(project(":tests:application:common")) + implementation(compose.runtime) + } + } +} diff --git a/tests/application/src/iosMain/kotlin/dev/enro/tests/application/MainViewController.kt b/tests/application/app/ios/src/iosMain/kotlin/dev/enro/tests/application/MainViewController.kt similarity index 100% rename from tests/application/src/iosMain/kotlin/dev/enro/tests/application/MainViewController.kt rename to tests/application/app/ios/src/iosMain/kotlin/dev/enro/tests/application/MainViewController.kt diff --git a/tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication.xcodeproj/project.pbxproj b/tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication.xcodeproj/project.pbxproj similarity index 99% rename from tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication.xcodeproj/project.pbxproj rename to tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication.xcodeproj/project.pbxproj index e499fa93c..b88f22b29 100644 --- a/tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication.xcodeproj/project.pbxproj +++ b/tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication.xcodeproj/project.pbxproj @@ -276,7 +276,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd \"../../../../../../\"\n./gradlew :tests:application:embedAndSignAppleFrameworkForXcode\n"; + shellScript = "cd \"../../../../../../\"\n./gradlew :tests:application:app:ios:embedAndSignAppleFrameworkForXcode\n"; }; /* End PBXShellScriptBuildPhase section */ diff --git a/tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication.xcodeproj/xcuserdata/isaacudy.xcuserdatad/xcschemes/xcschememanagement.plist b/tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication.xcodeproj/xcuserdata/isaacudy.xcuserdatad/xcschemes/xcschememanagement.plist similarity index 73% rename from tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication.xcodeproj/xcuserdata/isaacudy.xcuserdatad/xcschemes/xcschememanagement.plist rename to tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication.xcodeproj/xcuserdata/isaacudy.xcuserdatad/xcschemes/xcschememanagement.plist index 18d7f27e0..c0221601e 100644 --- a/tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication.xcodeproj/xcuserdata/isaacudy.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication.xcodeproj/xcuserdata/isaacudy.xcuserdatad/xcschemes/xcschememanagement.plist @@ -9,6 +9,11 @@ orderHint 0 + EnroTestApplication.xcscheme_^#shared#^_ + + orderHint + 0 + diff --git a/tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication/Assets.xcassets/AccentColor.colorset/Contents.json b/tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication/Assets.xcassets/AccentColor.colorset/Contents.json similarity index 100% rename from tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication/Assets.xcassets/AccentColor.colorset/Contents.json rename to tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication/Assets.xcassets/AccentColor.colorset/Contents.json diff --git a/tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication/Assets.xcassets/AppIcon.appiconset/Contents.json b/tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication/Assets.xcassets/AppIcon.appiconset/Contents.json rename to tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication/Assets.xcassets/Contents.json b/tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication/Assets.xcassets/Contents.json similarity index 100% rename from tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication/Assets.xcassets/Contents.json rename to tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication/Assets.xcassets/Contents.json diff --git a/tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication/ContentView.swift b/tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication/ContentView.swift similarity index 100% rename from tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication/ContentView.swift rename to tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication/ContentView.swift diff --git a/tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication/EnroTestApplicationApp.swift b/tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication/EnroTestApplicationApp.swift similarity index 100% rename from tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication/EnroTestApplicationApp.swift rename to tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication/EnroTestApplicationApp.swift diff --git a/tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication/Info.plist b/tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication/Info.plist similarity index 100% rename from tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication/Info.plist rename to tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication/Info.plist diff --git a/tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication/MainViewControllerView.swift b/tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication/MainViewControllerView.swift similarity index 100% rename from tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication/MainViewControllerView.swift rename to tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication/MainViewControllerView.swift diff --git a/tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication/Preview Content/Preview Assets.xcassets/Contents.json b/tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication/Preview Content/Preview Assets.xcassets/Contents.json similarity index 100% rename from tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplication/Preview Content/Preview Assets.xcassets/Contents.json rename to tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplication/Preview Content/Preview Assets.xcassets/Contents.json diff --git a/tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplicationTests/EnroTestApplicationTests.swift b/tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplicationTests/EnroTestApplicationTests.swift similarity index 100% rename from tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplicationTests/EnroTestApplicationTests.swift rename to tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplicationTests/EnroTestApplicationTests.swift diff --git a/tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplicationUITests/EnroTestApplicationUITests.swift b/tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplicationUITests/EnroTestApplicationUITests.swift similarity index 100% rename from tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplicationUITests/EnroTestApplicationUITests.swift rename to tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplicationUITests/EnroTestApplicationUITests.swift diff --git a/tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplicationUITests/EnroTestApplicationUITestsLaunchTests.swift b/tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplicationUITests/EnroTestApplicationUITestsLaunchTests.swift similarity index 100% rename from tests/application/src/iosMain/xcode/EnroTestApplication/EnroTestApplicationUITests/EnroTestApplicationUITestsLaunchTests.swift rename to tests/application/app/ios/xcode/EnroTestApplication/EnroTestApplicationUITests/EnroTestApplicationUITestsLaunchTests.swift diff --git a/tests/application/app/web/build.gradle.kts b/tests/application/app/web/build.gradle.kts new file mode 100644 index 000000000..5368611bf --- /dev/null +++ b/tests/application/app/web/build.gradle.kts @@ -0,0 +1,45 @@ +import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl + +plugins { + kotlin("multiplatform") + id("org.jetbrains.compose") + id("org.jetbrains.kotlin.plugin.compose") +} + +kotlin { + @OptIn(ExperimentalWasmDsl::class) + wasmJs { + outputModuleName.set("enroTestApplication") + browser { + commonWebpackConfig { + outputFileName = "enroTestApplication.js" + } + } + binaries.executable() + compilerOptions { + optIn.addAll( + "dev.enro.annotations.AdvancedEnroApi", + "dev.enro.annotations.ExperimentalEnroApi", + "kotlin.uuid.ExperimentalUuidApi", + ) + } + } + sourceSets { + wasmJsMain.dependencies { + implementation(project(":tests:application:common")) + implementation(compose.runtime) + implementation(compose.ui) + implementation(compose.foundation) + implementation(compose.components.resources) + implementation(npm("@js-joda/core", "5.6.5")) + } + } +} + +// Keep the generated Compose resources package stable as +// `enro.tests.application.generated.resources` (matching the entry point's imports), +// rather than letting it derive from the :app:web module path. +compose.resources { + packageOfResClass = "enro.tests.application.generated.resources" + generateResClass = always +} diff --git a/tests/application/src/wasmJsMain/composeResources/font/NotoEmoji-SemiBold.ttf b/tests/application/app/web/src/commonMain/composeResources/font/NotoEmoji-SemiBold.ttf similarity index 100% rename from tests/application/src/wasmJsMain/composeResources/font/NotoEmoji-SemiBold.ttf rename to tests/application/app/web/src/commonMain/composeResources/font/NotoEmoji-SemiBold.ttf diff --git a/tests/application/src/wasmJsMain/kotlin/main.kt b/tests/application/app/web/src/wasmJsMain/kotlin/main.kt similarity index 100% rename from tests/application/src/wasmJsMain/kotlin/main.kt rename to tests/application/app/web/src/wasmJsMain/kotlin/main.kt diff --git a/tests/application/build.gradle.kts b/tests/application/build.gradle.kts deleted file mode 100644 index 80dc4be78..000000000 --- a/tests/application/build.gradle.kts +++ /dev/null @@ -1,127 +0,0 @@ -import org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode - -plugins { - id("configure-application") - id("com.google.devtools.ksp") - id("wtf.emulator.gradle") - kotlin("plugin.serialization") -} - -configureEmulatorWtf() - -kotlin { - explicitApi = ExplicitApiMode.Disabled -} - -android { - buildTypes { - getByName("debug") { - // Set isTestingProguard to true to test proguard rules - // this is useful when testing bugs that are related to minification - val isTestingProguard = false - - if (isTestingProguard) { - isDebuggable = false - isMinifyEnabled = true - proguardFiles( - getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" - ) - } - } - } -} - - -kotlin { - sourceSets { - desktopMain.dependencies { - implementation(libs.kotlin.reflect) - implementation(libs.kotlinx.coroutines.core) - implementation(libs.kotlinx.coroutines.swing) - implementation(libs.androidx.savedState) - } - commonMain.dependencies { - implementation("dev.enro:enro:${project.enroVersionName}") - implementation("dev.enro:enro-compat:${project.enroVersionName}") - implementation(libs.kotlinx.serialization) - implementation(libs.compose.lifecycle) - } - - androidMain.dependencies { - implementation(project(":tests:module-one")) - - implementation(libs.compose.material) - implementation(libs.compose.accompanist.systemUiController) - - implementation(libs.kotlin.reflect) - - implementation(libs.kotlin.stdLib) - implementation(libs.androidx.core) - implementation(libs.androidx.splashscreen) - implementation(libs.androidx.appcompat) - implementation(libs.androidx.viewmodel) - implementation(libs.androidx.constraintlayout) - implementation(libs.androidx.fragment) - implementation(libs.androidx.fragment.compose) - implementation(libs.androidx.activity) - - implementation(libs.material) - } - androidUnitTest.dependencies { - implementation(libs.testing.junit) - } - androidInstrumentedTest.dependencies { - implementation("dev.enro:enro-test:${project.enroVersionName}") - implementation(libs.testing.junit) - implementation(libs.kotlin.reflect) - implementation(libs.androidx.core) - implementation(libs.androidx.appcompat) - implementation(libs.androidx.fragment) - implementation(libs.androidx.activity) - implementation(libs.androidx.recyclerview) - implementation(libs.testing.androidx.espresso) - implementation(libs.testing.androidx.fragment) - implementation(libs.testing.androidx.junit) - implementation(libs.testing.androidx.espresso) - implementation(libs.testing.androidx.espressoRecyclerView) - implementation(libs.testing.androidx.espressoIntents) - implementation(libs.testing.androidx.runner) - implementation(libs.testing.androidx.compose) - } - - wasmJsMain.dependencies { - implementation(npm("@js-joda/core", "5.6.5")) - } -// iosX64Main { -// kotlin.srcDir("build/generated/ksp/iosX64/${name}/kotlin") -// } -// iosArm64Main { -// kotlin.srcDir("build/generated/ksp/iosArm64/${name}/kotlin") -// } -// iosSimulatorArm64Main { -// kotlin.srcDir("build/generated/ksp/iosSimulatorArm64/${name}/kotlin") -// } -// iosMain { -// kotlin.srcDir("build/generated/ksp/iosSimulatorArm64/iosSimulatorArm64Main/kotlin") -// } - } -} - -// Some android dependencies need to be declared at the top level like this, -// it's a bit gross but I can't figure out how to get it to work otherwise -dependencies { -// Uncomment the following line to enable leakcanary -// debugImplementation(libs.leakcanary) - - val enroProcessor = "dev.enro:enro-processor:${project.enroVersionName}" - add("kspCommonMainMetadata", enroProcessor) - add("kspAndroid", enroProcessor) - add("kspDesktop", enroProcessor) - add("kspWasmJs", enroProcessor) - add("kspIosArm64", enroProcessor) - add("kspIosSimulatorArm64", enroProcessor) - - lintChecks(project(":enro-lint")) -} - diff --git a/tests/application/common/build.gradle.kts b/tests/application/common/build.gradle.kts new file mode 100644 index 000000000..1c2de39ff --- /dev/null +++ b/tests/application/common/build.gradle.kts @@ -0,0 +1,105 @@ +import org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode + +plugins { + id("configure-library") + id("com.google.devtools.ksp") + id("configure-compose") + id("wtf.emulator.gradle") + kotlin("plugin.serialization") +} + +configureEmulatorWtf() + +kotlin { + explicitApi = ExplicitApiMode.Disabled + + // The test-app content is a KMP library. Its Android host (unit) and device + // (instrumented) test components are enabled here so the instrumented tests keep + // same-module visibility to the content/destinations they exercise. The runnable + // APK / desktop / web / iOS entry points live in the sibling :app:* modules. + androidLibrary { + // Override the convention's path-derived namespace (which would become + // dev.enro.tests.application.common) so the generated R class stays at + // dev.enro.tests.application.R, matching the existing source imports. + namespace = "dev.enro.tests.application" + + withHostTest {} + withDeviceTest { + instrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + } + + sourceSets { + desktopMain.dependencies { + implementation(libs.kotlin.reflect) + implementation(libs.kotlinx.coroutines.core) + implementation(libs.kotlinx.coroutines.swing) + implementation(libs.androidx.savedState) + } + commonMain.dependencies { + // `api` so the :app:* modules get the Enro APIs (incl. platform entry points) + // and the test-app content transitively from :common. + api("dev.enro:enro:${project.enroVersionName}") + api("dev.enro:enro-compat:${project.enroVersionName}") + implementation(libs.kotlinx.serialization) + implementation(libs.compose.lifecycle) + } + + androidMain.dependencies { + implementation(project(":tests:module-one")) + + implementation(libs.compose.material) + implementation(libs.compose.accompanist.systemUiController) + + implementation(libs.kotlin.reflect) + + implementation(libs.kotlin.stdLib) + implementation(libs.androidx.core) + implementation(libs.androidx.splashscreen) + implementation(libs.androidx.appcompat) + implementation(libs.androidx.viewmodel) + implementation(libs.androidx.constraintlayout) + implementation(libs.androidx.fragment) + implementation(libs.androidx.fragment.compose) + implementation(libs.androidx.activity) + + implementation(libs.material) + } + wasmJsMain.dependencies { + implementation(npm("@js-joda/core", "5.6.5")) + } + } +} + +dependencies { + val enroProcessor = "dev.enro:enro-processor:${project.enroVersionName}" + add("kspCommonMainMetadata", enroProcessor) + add("kspAndroid", enroProcessor) + add("kspDesktop", enroProcessor) + add("kspWasmJs", enroProcessor) + add("kspIosArm64", enroProcessor) + add("kspIosSimulatorArm64", enroProcessor) + + lintChecks(project(":enro-lint")) + + // Android host (unit) + device (instrumented) test dependencies. Declared via + // configuration names because the KMP library plugin creates the androidHostTest / + // androidDeviceTest source sets dynamically (no DSL accessor). + "androidHostTestImplementation"(libs.testing.junit) + + "androidDeviceTestImplementation"("dev.enro:enro-test:${project.enroVersionName}") + "androidDeviceTestImplementation"(libs.testing.junit) + "androidDeviceTestImplementation"(libs.kotlin.reflect) + "androidDeviceTestImplementation"(libs.androidx.core) + "androidDeviceTestImplementation"(libs.androidx.appcompat) + "androidDeviceTestImplementation"(libs.androidx.fragment) + "androidDeviceTestImplementation"(libs.androidx.activity) + "androidDeviceTestImplementation"(libs.androidx.recyclerview) + "androidDeviceTestImplementation"(libs.testing.androidx.espresso) + "androidDeviceTestImplementation"(libs.testing.androidx.fragment) + "androidDeviceTestImplementation"(libs.testing.androidx.junit) + "androidDeviceTestImplementation"(libs.testing.androidx.espressoRecyclerView) + "androidDeviceTestImplementation"(libs.testing.androidx.espressoIntents) + "androidDeviceTestImplementation"(libs.testing.androidx.runner) + "androidDeviceTestImplementation"(libs.testing.androidx.compose) +} diff --git a/tests/application/common/src/androidDeviceTest/AndroidManifest.xml b/tests/application/common/src/androidDeviceTest/AndroidManifest.xml new file mode 100644 index 000000000..da0a61cac --- /dev/null +++ b/tests/application/common/src/androidDeviceTest/AndroidManifest.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/AndroidSerializationTests.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/AndroidSerializationTests.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/AndroidSerializationTests.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/AndroidSerializationTests.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/CoreTestSuite.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/CoreTestSuite.kt similarity index 78% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/CoreTestSuite.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/CoreTestSuite.kt index b1b1d9f32..a050550a3 100644 --- a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/CoreTestSuite.kt +++ b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/CoreTestSuite.kt @@ -19,9 +19,12 @@ import org.junit.runner.RunWith class CoreTestSuite { @Test fun applicationLaunches() { - // Context of the app under test. + // Context of the app under test. These tests run as the self-instrumenting + // androidDeviceTest of the :tests:application:common library, so the target + // context's package carries the instrumentation ".test" suffix; strip it before + // asserting on the application package. val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("dev.enro.tests.application", appContext.packageName) + assertEquals("dev.enro.tests.application", appContext.packageName.removeSuffix(".test")) } @Test diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/OnlyPassesLocally.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/OnlyPassesLocally.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/OnlyPassesLocally.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/OnlyPassesLocally.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/SelectDestinationRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/SelectDestinationRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/SelectDestinationRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/SelectDestinationRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/Utility.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/Utility.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/Utility.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/Utility.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/activity/SimpleActivityRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/activity/SimpleActivityRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/activity/SimpleActivityRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/activity/SimpleActivityRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/BottomNavigationRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/BottomNavigationRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/BottomNavigationRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/BottomNavigationRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/BottomNavigationTest.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/BottomNavigationTest.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/BottomNavigationTest.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/BottomNavigationTest.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/BottomSheetChangeSizeBottomSheetRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/BottomSheetChangeSizeBottomSheetRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/BottomSheetChangeSizeBottomSheetRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/BottomSheetChangeSizeBottomSheetRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/BottomSheetChangeSizeRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/BottomSheetChangeSizeRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/BottomSheetChangeSizeRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/BottomSheetChangeSizeRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/BottomSheetChangeSizeTest.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/BottomSheetChangeSizeTest.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/BottomSheetChangeSizeTest.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/BottomSheetChangeSizeTest.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/BottomSheetCloseAndPresentBottomSheetRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/BottomSheetCloseAndPresentBottomSheetRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/BottomSheetCloseAndPresentBottomSheetRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/BottomSheetCloseAndPresentBottomSheetRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/BottomSheetCloseAndPresentRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/BottomSheetCloseAndPresentRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/BottomSheetCloseAndPresentRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/BottomSheetCloseAndPresentRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/BottomSheetCloseAndPresentTest.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/BottomSheetCloseAndPresentTest.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/BottomSheetCloseAndPresentTest.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/BottomSheetCloseAndPresentTest.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/CloseLandingPageAndPresentRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/CloseLandingPageAndPresentRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/CloseLandingPageAndPresentRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/CloseLandingPageAndPresentRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/CloseLandingPageAndPresentTest.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/CloseLandingPageAndPresentTest.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/CloseLandingPageAndPresentTest.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/CloseLandingPageAndPresentTest.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/ComposeAnimationsRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/ComposeAnimationsRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/ComposeAnimationsRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/ComposeAnimationsRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/ComposeAnimationsTest.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/ComposeAnimationsTest.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/ComposeAnimationsTest.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/ComposeAnimationsTest.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/ComposeSavePrimitivesRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/ComposeSavePrimitivesRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/ComposeSavePrimitivesRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/ComposeSavePrimitivesRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/ComposeSavePrimitivesTest.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/ComposeSavePrimitivesTest.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/ComposeSavePrimitivesTest.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/ComposeSavePrimitivesTest.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/FindContextRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/FindContextRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/FindContextRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/FindContextRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/FindContextTest.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/FindContextTest.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/FindContextTest.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/FindContextTest.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/HorizontalPagerRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/HorizontalPagerRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/HorizontalPagerRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/HorizontalPagerRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/HorizontalPagerTest.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/HorizontalPagerTest.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/HorizontalPagerTest.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/HorizontalPagerTest.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/LazyColumnRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/LazyColumnRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/LazyColumnRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/LazyColumnRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/LazyColumnTest.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/LazyColumnTest.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/LazyColumnTest.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/LazyColumnTest.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/SyntheticViewModelAccessRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/SyntheticViewModelAccessRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/SyntheticViewModelAccessRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/SyntheticViewModelAccessRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/SyntheticViewModelAccessTests.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/SyntheticViewModelAccessTests.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/SyntheticViewModelAccessTests.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/SyntheticViewModelAccessTests.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeAsyncManagedResultFlowRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeAsyncManagedResultFlowRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeAsyncManagedResultFlowRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeAsyncManagedResultFlowRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeAsyncManagedResultFlowTest.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeAsyncManagedResultFlowTest.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeAsyncManagedResultFlowTest.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeAsyncManagedResultFlowTest.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeEmbeddedResultFlowRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeEmbeddedResultFlowRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeEmbeddedResultFlowRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeEmbeddedResultFlowRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeEmbeddedResultFlowTest.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeEmbeddedResultFlowTest.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeEmbeddedResultFlowTest.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeEmbeddedResultFlowTest.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultFlowRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultFlowRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultFlowRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultFlowRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultFlowTest.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultFlowTest.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultFlowTest.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultFlowTest.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultsWithNestedFlowAndEmptyRootRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultsWithNestedFlowAndEmptyRootRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultsWithNestedFlowAndEmptyRootRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultsWithNestedFlowAndEmptyRootRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultsWithNestedFlowAndEmptyRootTest.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultsWithNestedFlowAndEmptyRootTest.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultsWithNestedFlowAndEmptyRootTest.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultsWithNestedFlowAndEmptyRootTest.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeMixedResultTypesRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeMixedResultTypesRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeMixedResultTypesRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeMixedResultTypesRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeMixedResultTypesTest.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeMixedResultTypesTest.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeMixedResultTypesTest.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeMixedResultTypesTest.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeNestedResultsRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeNestedResultsRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeNestedResultsRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeNestedResultsRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeNestedResultsTest.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeNestedResultsTest.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ComposeNestedResultsTest.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ComposeNestedResultsTest.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ResultsWithExtraTest.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ResultsWithExtraTest.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ResultsWithExtraTest.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ResultsWithExtraTest.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ResultsWithMetadataRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ResultsWithMetadataRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/compose/results/ResultsWithMetadataRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/compose/results/ResultsWithMetadataRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/fragment/FragmentPresentationRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/fragment/FragmentPresentationRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/fragment/FragmentPresentationRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/fragment/FragmentPresentationRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/fragment/FragmentPresentationTest.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/fragment/FragmentPresentationTest.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/fragment/FragmentPresentationTest.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/fragment/FragmentPresentationTest.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/fragment/UnboundBottomSheetRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/fragment/UnboundBottomSheetRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/fragment/UnboundBottomSheetRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/fragment/UnboundBottomSheetRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/fragment/UnboundBottomSheetTest.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/fragment/UnboundBottomSheetTest.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/fragment/UnboundBottomSheetTest.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/fragment/UnboundBottomSheetTest.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/managedflow/ManagedFlowInComposableRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/managedflow/ManagedFlowInComposableRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/managedflow/ManagedFlowInComposableRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/managedflow/ManagedFlowInComposableRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/managedflow/ManagedFlowInComposableTest.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/managedflow/ManagedFlowInComposableTest.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/managedflow/ManagedFlowInComposableTest.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/managedflow/ManagedFlowInComposableTest.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/managedflow/UserInformationRobot.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/managedflow/UserInformationRobot.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/managedflow/UserInformationRobot.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/managedflow/UserInformationRobot.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/ruleinterop/FirstTestWithEnroRule.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/ruleinterop/FirstTestWithEnroRule.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/ruleinterop/FirstTestWithEnroRule.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/ruleinterop/FirstTestWithEnroRule.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/ruleinterop/FirstTestWithoutEnroRule.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/ruleinterop/FirstTestWithoutEnroRule.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/ruleinterop/FirstTestWithoutEnroRule.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/ruleinterop/FirstTestWithoutEnroRule.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/ruleinterop/README.md b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/ruleinterop/README.md similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/ruleinterop/README.md rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/ruleinterop/README.md diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/ruleinterop/SecondTestWithEnroRule.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/ruleinterop/SecondTestWithEnroRule.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/ruleinterop/SecondTestWithEnroRule.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/ruleinterop/SecondTestWithEnroRule.kt diff --git a/tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/ruleinterop/SecondTestWithoutEnroRule.kt b/tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/ruleinterop/SecondTestWithoutEnroRule.kt similarity index 100% rename from tests/application/src/androidInstrumentedTest/kotlin/dev/enro/tests/application/ruleinterop/SecondTestWithoutEnroRule.kt rename to tests/application/common/src/androidDeviceTest/kotlin/dev/enro/tests/application/ruleinterop/SecondTestWithoutEnroRule.kt diff --git a/tests/application/src/androidUnitTest/kotlin/dev/enro/tests/application/ProjectChangeTests.kt b/tests/application/common/src/androidHostTest/kotlin/dev/enro/tests/application/ProjectChangeTests.kt similarity index 80% rename from tests/application/src/androidUnitTest/kotlin/dev/enro/tests/application/ProjectChangeTests.kt rename to tests/application/common/src/androidHostTest/kotlin/dev/enro/tests/application/ProjectChangeTests.kt index 8df5cf439..621251e0b 100644 --- a/tests/application/src/androidUnitTest/kotlin/dev/enro/tests/application/ProjectChangeTests.kt +++ b/tests/application/common/src/androidHostTest/kotlin/dev/enro/tests/application/ProjectChangeTests.kt @@ -71,7 +71,7 @@ class ProjectChangeTests { @Test fun givenFileInModule_whenDestinationFileContentsUpdated_thenBuildSucceeds() { execAssembleDebug() - val editableFile = File("../module-one/src/main/java/dev/enro/tests/module/TestModuleEditableDestination.kt") + val editableFile = File("../../module-one/src/androidMain/kotlin/dev/enro/tests/module/TestModuleEditableDestination.kt") val editedContent = editableFile.readText() .replace("TestModuleEditableDestination", "TestModuleEditableDestination_Edited_5") .replace("TestModuleEditableScreen", "TestModuleEditableScreen_Edited_5") @@ -82,8 +82,8 @@ class ProjectChangeTests { @Test fun givenFileInModule_whenDestinationFileRenamed_thenBuildSucceeds() { execAssembleDebug() - val editableFile = File("../module-one/src/main/java/dev/enro/tests/module/TestModuleEditableDestination.kt") - val renamedFile = File("../module-one/src/main/java/dev/enro/tests/module/TestModuleEditableDestination_Edited_6.kt") + val editableFile = File("../../module-one/src/androidMain/kotlin/dev/enro/tests/module/TestModuleEditableDestination.kt") + val renamedFile = File("../../module-one/src/androidMain/kotlin/dev/enro/tests/module/TestModuleEditableDestination_Edited_6.kt") editableFile.renameTo(renamedFile) execAssembleDebug() } @@ -91,7 +91,7 @@ class ProjectChangeTests { @Test fun givenFileInModule_whenDestinationFileDeleted_thenBuildSucceeds() { execAssembleDebug() - val editableFile = File("../module-one/src/main/java/dev/enro/tests/module/TestModuleEditableDestination.kt") + val editableFile = File("../../module-one/src/androidMain/kotlin/dev/enro/tests/module/TestModuleEditableDestination.kt") editableFile.delete() execAssembleDebug() } @@ -99,19 +99,19 @@ class ProjectChangeTests { @Test fun givenFileInModule_whenFileIsRenamedAndContentsUpdated_thenBuildSucceeds() { execAssembleDebug() - val editableFile = File("../module-one/src/main/java/dev/enro/tests/module/TestModuleEditableDestination.kt") + val editableFile = File("../../module-one/src/androidMain/kotlin/dev/enro/tests/module/TestModuleEditableDestination.kt") val editedContent = editableFile.readText() .replace("TestModuleEditableDestination", "TestModuleEditableDestination_Edited_8") .replace("TestModuleEditableScreen", "TestModuleEditableScreen_Edited_8") editableFile.writeText(editedContent) - val renamedFile = File("../module-one/src/main/java/dev/enro/tests/module/TestModuleEditableDestination_Edited_8.kt") + val renamedFile = File("../../module-one/src/androidMain/kotlin/dev/enro/tests/module/TestModuleEditableDestination_Edited_8.kt") editableFile.renameTo(renamedFile) execAssembleDebug() } } private fun execAssembleDebug() { - exec("./gradlew", ":tests:application:assembleDebug", "--no-build-cache") + exec("./gradlew", ":tests:application:app:android:assembleDebug", "--no-build-cache") } private fun isGitClean(): Boolean { @@ -129,11 +129,11 @@ private fun exec( ProcessBuilder() .command(*command) .directory( - File(".") - .absoluteFile - .parentFile!! - .parentFile!! - .parentFile!! + // Walk up from the module dir to the repository root (where + // settings.gradle.kts lives) so git + ./gradlew run from the root, + // regardless of how deeply nested this module is. + generateSequence(File(".").absoluteFile) { it.parentFile } + .first { File(it, "settings.gradle.kts").exists() } ) .apply { environment().apply { diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/ComposeStability.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/ComposeStability.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/ComposeStability.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/ComposeStability.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/MultipleNestedContainerExample.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/MultipleNestedContainerExample.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/MultipleNestedContainerExample.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/MultipleNestedContainerExample.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/TestActivity.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/TestActivity.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/TestActivity.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/TestActivity.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/TestApplication.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/TestApplication.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/TestApplication.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/TestApplication.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/TestApplicationEditableDestination.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/TestApplicationEditableDestination.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/TestApplicationEditableDestination.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/TestApplicationEditableDestination.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/TestApplicationPlugin.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/TestApplicationPlugin.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/TestApplicationPlugin.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/TestApplicationPlugin.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/activity/Activity.applyInsetsForContentView.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/activity/Activity.applyInsetsForContentView.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/activity/Activity.applyInsetsForContentView.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/activity/Activity.applyInsetsForContentView.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/activity/PictureInPicture.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/activity/PictureInPicture.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/activity/PictureInPicture.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/activity/PictureInPicture.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/activity/SimpleActivity.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/activity/SimpleActivity.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/activity/SimpleActivity.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/activity/SimpleActivity.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/BottomNavigation.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/BottomNavigation.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/BottomNavigation.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/BottomNavigation.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/BottomSheetChangeSize.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/BottomSheetChangeSize.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/BottomSheetChangeSize.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/BottomSheetChangeSize.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/BottomSheetCloseAndPresent.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/BottomSheetCloseAndPresent.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/BottomSheetCloseAndPresent.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/BottomSheetCloseAndPresent.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/CloseLandingPageAndPresent.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/CloseLandingPageAndPresent.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/CloseLandingPageAndPresent.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/CloseLandingPageAndPresent.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/ComposeAnimations.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/ComposeAnimations.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/ComposeAnimations.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/ComposeAnimations.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/ComposeSavePrimitives.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/ComposeSavePrimitives.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/ComposeSavePrimitives.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/ComposeSavePrimitives.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/ComposeStability.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/ComposeStability.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/ComposeStability.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/ComposeStability.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/EmbeddedDestination.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/EmbeddedDestination.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/EmbeddedDestination.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/EmbeddedDestination.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/FindContext.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/FindContext.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/FindContext.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/FindContext.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/LazyColumn.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/LazyColumn.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/LazyColumn.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/LazyColumn.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/SyntheticViewModelAccess.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/SyntheticViewModelAccess.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/SyntheticViewModelAccess.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/SyntheticViewModelAccess.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/common/Stability.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/common/Stability.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/common/Stability.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/common/Stability.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/results/ComposeEmbeddedResultFlow.android.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/results/ComposeEmbeddedResultFlow.android.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/compose/results/ComposeEmbeddedResultFlow.android.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/compose/results/ComposeEmbeddedResultFlow.android.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/fragment/FragmentPresentation.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/fragment/FragmentPresentation.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/fragment/FragmentPresentation.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/fragment/FragmentPresentation.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/fragment/UnboundBottomSheetFragment.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/fragment/UnboundBottomSheetFragment.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/fragment/UnboundBottomSheetFragment.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/fragment/UnboundBottomSheetFragment.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/linting/LintingExamples.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/linting/LintingExamples.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/linting/LintingExamples.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/linting/LintingExamples.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/managedflow/ManagedFlowInComposable.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/managedflow/ManagedFlowInComposable.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/managedflow/ManagedFlowInComposable.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/managedflow/ManagedFlowInComposable.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/managedflow/UserInformationFlow.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/managedflow/UserInformationFlow.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/managedflow/UserInformationFlow.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/managedflow/UserInformationFlow.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/savedstate/SavedStateDestination.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/savedstate/SavedStateDestination.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/savedstate/SavedStateDestination.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/savedstate/SavedStateDestination.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/serialization/AndroidSerialization.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/serialization/AndroidSerialization.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/serialization/AndroidSerialization.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/serialization/AndroidSerialization.kt diff --git a/tests/application/src/androidMain/kotlin/dev/enro/tests/application/window/SimpleWindow.kt b/tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/window/SimpleWindow.kt similarity index 100% rename from tests/application/src/androidMain/kotlin/dev/enro/tests/application/window/SimpleWindow.kt rename to tests/application/common/src/androidMain/kotlin/dev/enro/tests/application/window/SimpleWindow.kt diff --git a/tests/application/src/androidMain/res/animator/fragment_animations_present_enter.xml b/tests/application/common/src/androidMain/res/animator/fragment_animations_present_enter.xml similarity index 100% rename from tests/application/src/androidMain/res/animator/fragment_animations_present_enter.xml rename to tests/application/common/src/androidMain/res/animator/fragment_animations_present_enter.xml diff --git a/tests/application/src/androidMain/res/animator/fragment_animations_present_exit.xml b/tests/application/common/src/androidMain/res/animator/fragment_animations_present_exit.xml similarity index 100% rename from tests/application/src/androidMain/res/animator/fragment_animations_present_exit.xml rename to tests/application/common/src/androidMain/res/animator/fragment_animations_present_exit.xml diff --git a/tests/application/src/androidMain/res/animator/fragment_animations_push_enter.xml b/tests/application/common/src/androidMain/res/animator/fragment_animations_push_enter.xml similarity index 100% rename from tests/application/src/androidMain/res/animator/fragment_animations_push_enter.xml rename to tests/application/common/src/androidMain/res/animator/fragment_animations_push_enter.xml diff --git a/tests/application/src/androidMain/res/animator/fragment_animations_push_exit.xml b/tests/application/common/src/androidMain/res/animator/fragment_animations_push_exit.xml similarity index 100% rename from tests/application/src/androidMain/res/animator/fragment_animations_push_exit.xml rename to tests/application/common/src/androidMain/res/animator/fragment_animations_push_exit.xml diff --git a/tests/application/src/androidMain/res/animator/fragment_animations_push_return_enter.xml b/tests/application/common/src/androidMain/res/animator/fragment_animations_push_return_enter.xml similarity index 100% rename from tests/application/src/androidMain/res/animator/fragment_animations_push_return_enter.xml rename to tests/application/common/src/androidMain/res/animator/fragment_animations_push_return_enter.xml diff --git a/tests/application/src/androidMain/res/animator/fragment_animations_push_return_exit.xml b/tests/application/common/src/androidMain/res/animator/fragment_animations_push_return_exit.xml similarity index 100% rename from tests/application/src/androidMain/res/animator/fragment_animations_push_return_exit.xml rename to tests/application/common/src/androidMain/res/animator/fragment_animations_push_return_exit.xml diff --git a/tests/application/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml b/tests/application/common/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml similarity index 100% rename from tests/application/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml rename to tests/application/common/src/androidMain/res/drawable-v24/ic_launcher_foreground.xml diff --git a/tests/application/src/androidMain/res/drawable/ic_launcher_background.xml b/tests/application/common/src/androidMain/res/drawable/ic_launcher_background.xml similarity index 100% rename from tests/application/src/androidMain/res/drawable/ic_launcher_background.xml rename to tests/application/common/src/androidMain/res/drawable/ic_launcher_background.xml diff --git a/tests/application/src/androidMain/res/layout/activity_fragment_animations.xml b/tests/application/common/src/androidMain/res/layout/activity_fragment_animations.xml similarity index 100% rename from tests/application/src/androidMain/res/layout/activity_fragment_animations.xml rename to tests/application/common/src/androidMain/res/layout/activity_fragment_animations.xml diff --git a/tests/application/src/androidMain/res/layout/activity_fragment_presentation.xml b/tests/application/common/src/androidMain/res/layout/activity_fragment_presentation.xml similarity index 100% rename from tests/application/src/androidMain/res/layout/activity_fragment_presentation.xml rename to tests/application/common/src/androidMain/res/layout/activity_fragment_presentation.xml diff --git a/tests/application/src/androidMain/res/layout/fragment_fragment_animations.xml b/tests/application/common/src/androidMain/res/layout/fragment_fragment_animations.xml similarity index 100% rename from tests/application/src/androidMain/res/layout/fragment_fragment_animations.xml rename to tests/application/common/src/androidMain/res/layout/fragment_fragment_animations.xml diff --git a/tests/application/src/androidMain/res/layout/fragment_shared_element_activity.xml b/tests/application/common/src/androidMain/res/layout/fragment_shared_element_activity.xml similarity index 100% rename from tests/application/src/androidMain/res/layout/fragment_shared_element_activity.xml rename to tests/application/common/src/androidMain/res/layout/fragment_shared_element_activity.xml diff --git a/tests/application/src/androidMain/res/layout/managed_flow_in_fragment_activity.xml b/tests/application/common/src/androidMain/res/layout/managed_flow_in_fragment_activity.xml similarity index 100% rename from tests/application/src/androidMain/res/layout/managed_flow_in_fragment_activity.xml rename to tests/application/common/src/androidMain/res/layout/managed_flow_in_fragment_activity.xml diff --git a/tests/application/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml b/tests/application/common/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from tests/application/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml rename to tests/application/common/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/tests/application/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml b/tests/application/common/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml similarity index 100% rename from tests/application/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml rename to tests/application/common/src/androidMain/res/mipmap-anydpi-v26/ic_launcher_round.xml diff --git a/tests/application/src/androidMain/res/mipmap-anydpi-v33/ic_launcher.xml b/tests/application/common/src/androidMain/res/mipmap-anydpi-v33/ic_launcher.xml similarity index 100% rename from tests/application/src/androidMain/res/mipmap-anydpi-v33/ic_launcher.xml rename to tests/application/common/src/androidMain/res/mipmap-anydpi-v33/ic_launcher.xml diff --git a/tests/application/src/androidMain/res/mipmap-hdpi/ic_launcher.webp b/tests/application/common/src/androidMain/res/mipmap-hdpi/ic_launcher.webp similarity index 100% rename from tests/application/src/androidMain/res/mipmap-hdpi/ic_launcher.webp rename to tests/application/common/src/androidMain/res/mipmap-hdpi/ic_launcher.webp diff --git a/tests/application/src/androidMain/res/mipmap-hdpi/ic_launcher_round.webp b/tests/application/common/src/androidMain/res/mipmap-hdpi/ic_launcher_round.webp similarity index 100% rename from tests/application/src/androidMain/res/mipmap-hdpi/ic_launcher_round.webp rename to tests/application/common/src/androidMain/res/mipmap-hdpi/ic_launcher_round.webp diff --git a/tests/application/src/androidMain/res/mipmap-mdpi/ic_launcher.webp b/tests/application/common/src/androidMain/res/mipmap-mdpi/ic_launcher.webp similarity index 100% rename from tests/application/src/androidMain/res/mipmap-mdpi/ic_launcher.webp rename to tests/application/common/src/androidMain/res/mipmap-mdpi/ic_launcher.webp diff --git a/tests/application/src/androidMain/res/mipmap-mdpi/ic_launcher_round.webp b/tests/application/common/src/androidMain/res/mipmap-mdpi/ic_launcher_round.webp similarity index 100% rename from tests/application/src/androidMain/res/mipmap-mdpi/ic_launcher_round.webp rename to tests/application/common/src/androidMain/res/mipmap-mdpi/ic_launcher_round.webp diff --git a/tests/application/src/androidMain/res/mipmap-xhdpi/ic_launcher.webp b/tests/application/common/src/androidMain/res/mipmap-xhdpi/ic_launcher.webp similarity index 100% rename from tests/application/src/androidMain/res/mipmap-xhdpi/ic_launcher.webp rename to tests/application/common/src/androidMain/res/mipmap-xhdpi/ic_launcher.webp diff --git a/tests/application/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.webp b/tests/application/common/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.webp similarity index 100% rename from tests/application/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.webp rename to tests/application/common/src/androidMain/res/mipmap-xhdpi/ic_launcher_round.webp diff --git a/tests/application/src/androidMain/res/mipmap-xxhdpi/ic_launcher.webp b/tests/application/common/src/androidMain/res/mipmap-xxhdpi/ic_launcher.webp similarity index 100% rename from tests/application/src/androidMain/res/mipmap-xxhdpi/ic_launcher.webp rename to tests/application/common/src/androidMain/res/mipmap-xxhdpi/ic_launcher.webp diff --git a/tests/application/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.webp b/tests/application/common/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.webp similarity index 100% rename from tests/application/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.webp rename to tests/application/common/src/androidMain/res/mipmap-xxhdpi/ic_launcher_round.webp diff --git a/tests/application/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.webp b/tests/application/common/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.webp similarity index 100% rename from tests/application/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.webp rename to tests/application/common/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.webp diff --git a/tests/application/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.webp b/tests/application/common/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.webp similarity index 100% rename from tests/application/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.webp rename to tests/application/common/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_round.webp diff --git a/tests/application/src/androidMain/res/values-night/themes.xml b/tests/application/common/src/androidMain/res/values-night/themes.xml similarity index 100% rename from tests/application/src/androidMain/res/values-night/themes.xml rename to tests/application/common/src/androidMain/res/values-night/themes.xml diff --git a/tests/application/src/androidMain/res/values/colors.xml b/tests/application/common/src/androidMain/res/values/colors.xml similarity index 100% rename from tests/application/src/androidMain/res/values/colors.xml rename to tests/application/common/src/androidMain/res/values/colors.xml diff --git a/tests/application/src/androidMain/res/values/ids.xml b/tests/application/common/src/androidMain/res/values/ids.xml similarity index 100% rename from tests/application/src/androidMain/res/values/ids.xml rename to tests/application/common/src/androidMain/res/values/ids.xml diff --git a/tests/application/src/androidMain/res/values/strings.xml b/tests/application/common/src/androidMain/res/values/strings.xml similarity index 100% rename from tests/application/src/androidMain/res/values/strings.xml rename to tests/application/common/src/androidMain/res/values/strings.xml diff --git a/tests/application/src/androidMain/res/values/themes.xml b/tests/application/common/src/androidMain/res/values/themes.xml similarity index 100% rename from tests/application/src/androidMain/res/values/themes.xml rename to tests/application/common/src/androidMain/res/values/themes.xml diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/SelectDestination.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/SelectDestination.kt similarity index 97% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/SelectDestination.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/SelectDestination.kt index feeba2d5f..f27c897a2 100644 --- a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/SelectDestination.kt +++ b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/SelectDestination.kt @@ -40,7 +40,9 @@ import dev.enro.tests.application.window.SimpleWindow import kotlinx.serialization.Serializable @Serializable -internal class SelectDestination() : NavigationKey { +// Public so the per-platform app entry points (:tests:application:app:*) can use it as +// the initial backstack destination. +class SelectDestination() : NavigationKey { internal companion object { internal val selectableDestinations = run { val commonDestinations = listOf( diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/TestApplicationComponent.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/TestApplicationComponent.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/TestApplicationComponent.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/TestApplicationComponent.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/ComposableNavigationPath.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/ComposableNavigationPath.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/ComposableNavigationPath.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/ComposableNavigationPath.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/ComposeSharedElementTransitions.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/ComposeSharedElementTransitions.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/ComposeSharedElementTransitions.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/ComposeSharedElementTransitions.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/DialogScene.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/DialogScene.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/DialogScene.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/DialogScene.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/HorizontalPager.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/HorizontalPager.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/HorizontalPager.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/HorizontalPager.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/common/TitledColumn.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/common/TitledColumn.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/common/TitledColumn.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/common/TitledColumn.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/common/TitledLazyColumn.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/common/TitledLazyColumn.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/common/TitledLazyColumn.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/common/TitledLazyColumn.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/common/TitledRow.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/common/TitledRow.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/common/TitledRow.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/common/TitledRow.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeAsyncManagedResultFlow.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeAsyncManagedResultFlow.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeAsyncManagedResultFlow.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeAsyncManagedResultFlow.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeEmbeddedResultFlow.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeEmbeddedResultFlow.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeEmbeddedResultFlow.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeEmbeddedResultFlow.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultFlow.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultFlow.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultFlow.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultFlow.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultsWithNestedFlowAndEmptyRoot.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultsWithNestedFlowAndEmptyRoot.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultsWithNestedFlowAndEmptyRoot.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultsWithNestedFlowAndEmptyRoot.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeMixedResultTypes.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeMixedResultTypes.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeMixedResultTypes.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeMixedResultTypes.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeNestedResults.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeNestedResults.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeNestedResults.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ComposeNestedResults.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ResultsWithMetadata.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ResultsWithMetadata.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ResultsWithMetadata.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/compose/results/ResultsWithMetadata.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/SelectSampleDestination.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/SelectSampleDestination.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/SelectSampleDestination.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/SelectSampleDestination.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/CreateLoanSampleDestination.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/CreateLoanSampleDestination.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/CreateLoanSampleDestination.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/CreateLoanSampleDestination.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/domain/LoanApplication.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/domain/LoanApplication.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/domain/LoanApplication.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/domain/LoanApplication.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetLoanAmount.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetLoanAmount.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetLoanAmount.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetLoanAmount.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetLoanPurposeScreen.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetLoanPurposeScreen.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetLoanPurposeScreen.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetLoanPurposeScreen.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetLoanTerm.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetLoanTerm.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetLoanTerm.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetLoanTerm.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetOtherApplicants.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetOtherApplicants.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetOtherApplicants.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetOtherApplicants.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetPrimaryApplicantInfo.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetPrimaryApplicantInfo.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetPrimaryApplicantInfo.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetPrimaryApplicantInfo.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetPropertyPurposeScreen.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetPropertyPurposeScreen.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetPropertyPurposeScreen.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetPropertyPurposeScreen.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetRepaymentFrequencyScreen.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetRepaymentFrequencyScreen.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetRepaymentFrequencyScreen.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetRepaymentFrequencyScreen.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetRepaymentTypeScreen.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetRepaymentTypeScreen.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetRepaymentTypeScreen.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/GetRepaymentTypeScreen.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/LoanApplicationSummary.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/LoanApplicationSummary.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/LoanApplicationSummary.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/LoanApplicationSummary.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/MultiChoiceDestination.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/MultiChoiceDestination.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/MultiChoiceDestination.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/MultiChoiceDestination.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/MultiChoiceScreen.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/MultiChoiceScreen.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/MultiChoiceScreen.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/MultiChoiceScreen.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/SelectOwnershipType.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/SelectOwnershipType.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/SelectOwnershipType.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/loan/ui/SelectOwnershipType.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/CreateRecipe.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/CreateRecipe.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/CreateRecipe.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/CreateRecipe.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/EditRecipe.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/EditRecipe.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/EditRecipe.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/EditRecipe.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/Recipe.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/Recipe.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/Recipe.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/Recipe.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/RecipeDetail.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/RecipeDetail.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/RecipeDetail.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/RecipeDetail.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/RecipeList.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/RecipeList.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/RecipeList.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/RecipeList.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/RecipeRepository.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/RecipeRepository.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/RecipeRepository.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/RecipeRepository.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/RecipesSampleDestination.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/RecipesSampleDestination.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/RecipesSampleDestination.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/RecipesSampleDestination.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/AddIngredients.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/AddIngredients.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/AddIngredients.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/AddIngredients.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/AddNotes.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/AddNotes.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/AddNotes.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/AddNotes.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/AddSteps.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/AddSteps.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/AddSteps.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/AddSteps.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/AskToAddNotes.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/AskToAddNotes.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/AskToAddNotes.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/AskToAddNotes.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/EnterCookingTime.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/EnterCookingTime.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/EnterCookingTime.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/EnterCookingTime.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/EnterDescription.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/EnterDescription.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/EnterDescription.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/EnterDescription.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/EnterDuration.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/EnterDuration.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/EnterDuration.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/EnterDuration.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/EnterTitle.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/EnterTitle.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/EnterTitle.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/recipes/create/EnterTitle.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/HomeDestination.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/HomeDestination.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/HomeDestination.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/HomeDestination.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/LoginDestination.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/LoginDestination.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/LoginDestination.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/LoginDestination.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/TravelSampleDestination.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/TravelSampleDestination.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/TravelSampleDestination.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/TravelSampleDestination.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/data/TravelDestinationRepository.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/data/TravelDestinationRepository.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/data/TravelDestinationRepository.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/data/TravelDestinationRepository.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/data/TravelUserRepository.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/data/TravelUserRepository.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/data/TravelUserRepository.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/data/TravelUserRepository.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/domain/TravelDestination.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/domain/TravelDestination.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/domain/TravelDestination.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/domain/TravelDestination.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/domain/TravelUser.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/domain/TravelUser.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/domain/TravelUser.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/domain/TravelUser.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/registration/RegistrationNameDestination.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/registration/RegistrationNameDestination.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/registration/RegistrationNameDestination.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/registration/RegistrationNameDestination.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/registration/RegistrationOverviewDestination.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/registration/RegistrationOverviewDestination.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/registration/RegistrationOverviewDestination.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/registration/RegistrationOverviewDestination.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/registration/RegistrationPasswordDestination.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/registration/RegistrationPasswordDestination.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/registration/RegistrationPasswordDestination.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/registration/RegistrationPasswordDestination.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/registration/RegistrationSuccessfulDestination.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/registration/RegistrationSuccessfulDestination.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/registration/RegistrationSuccessfulDestination.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/registration/RegistrationSuccessfulDestination.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/registration/RegistrationUsernameDestination.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/registration/RegistrationUsernameDestination.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/registration/RegistrationUsernameDestination.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/registration/RegistrationUsernameDestination.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/theme/TravelTheme.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/theme/TravelTheme.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/theme/TravelTheme.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/samples/travel/ui/theme/TravelTheme.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/serialization/CommonSerialization.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/serialization/CommonSerialization.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/serialization/CommonSerialization.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/serialization/CommonSerialization.kt diff --git a/tests/application/src/commonMain/kotlin/dev/enro/tests/application/window/SimpleWindow.kt b/tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/window/SimpleWindow.kt similarity index 100% rename from tests/application/src/commonMain/kotlin/dev/enro/tests/application/window/SimpleWindow.kt rename to tests/application/common/src/commonMain/kotlin/dev/enro/tests/application/window/SimpleWindow.kt diff --git a/tests/application/src/desktopMain/kotlin/dev/enro/tests/application/compose/results/ComposeEmbeddedResultFlow.desktop.kt b/tests/application/common/src/desktopMain/kotlin/dev/enro/tests/application/compose/results/ComposeEmbeddedResultFlow.desktop.kt similarity index 100% rename from tests/application/src/desktopMain/kotlin/dev/enro/tests/application/compose/results/ComposeEmbeddedResultFlow.desktop.kt rename to tests/application/common/src/desktopMain/kotlin/dev/enro/tests/application/compose/results/ComposeEmbeddedResultFlow.desktop.kt diff --git a/tests/application/src/desktopMain/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultFlow.desktop.kt b/tests/application/common/src/desktopMain/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultFlow.desktop.kt similarity index 100% rename from tests/application/src/desktopMain/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultFlow.desktop.kt rename to tests/application/common/src/desktopMain/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultFlow.desktop.kt diff --git a/tests/application/src/desktopMain/kotlin/dev/enro/tests/application/samples/loan/CreateLoanApplication.desktop.kt b/tests/application/common/src/desktopMain/kotlin/dev/enro/tests/application/samples/loan/CreateLoanApplication.desktop.kt similarity index 100% rename from tests/application/src/desktopMain/kotlin/dev/enro/tests/application/samples/loan/CreateLoanApplication.desktop.kt rename to tests/application/common/src/desktopMain/kotlin/dev/enro/tests/application/samples/loan/CreateLoanApplication.desktop.kt diff --git a/tests/application/src/desktopMain/kotlin/dev/enro/tests/application/samples/recipes/CreateRecipe.desktop.kt b/tests/application/common/src/desktopMain/kotlin/dev/enro/tests/application/samples/recipes/CreateRecipe.desktop.kt similarity index 100% rename from tests/application/src/desktopMain/kotlin/dev/enro/tests/application/samples/recipes/CreateRecipe.desktop.kt rename to tests/application/common/src/desktopMain/kotlin/dev/enro/tests/application/samples/recipes/CreateRecipe.desktop.kt diff --git a/tests/application/src/desktopMain/kotlin/dev/enro/tests/application/samples/recipes/RecipesHome.desktop.kt b/tests/application/common/src/desktopMain/kotlin/dev/enro/tests/application/samples/recipes/RecipesHome.desktop.kt similarity index 100% rename from tests/application/src/desktopMain/kotlin/dev/enro/tests/application/samples/recipes/RecipesHome.desktop.kt rename to tests/application/common/src/desktopMain/kotlin/dev/enro/tests/application/samples/recipes/RecipesHome.desktop.kt diff --git a/tests/application/src/desktopMain/kotlin/dev/enro/tests/application/samples/travel/TravelSample.desktop.kt b/tests/application/common/src/desktopMain/kotlin/dev/enro/tests/application/samples/travel/TravelSample.desktop.kt similarity index 100% rename from tests/application/src/desktopMain/kotlin/dev/enro/tests/application/samples/travel/TravelSample.desktop.kt rename to tests/application/common/src/desktopMain/kotlin/dev/enro/tests/application/samples/travel/TravelSample.desktop.kt diff --git a/tests/application/src/desktopMain/kotlin/dev/enro/tests/application/util/EnroTestApplicationMenu.kt b/tests/application/common/src/desktopMain/kotlin/dev/enro/tests/application/util/EnroTestApplicationMenu.kt similarity index 100% rename from tests/application/src/desktopMain/kotlin/dev/enro/tests/application/util/EnroTestApplicationMenu.kt rename to tests/application/common/src/desktopMain/kotlin/dev/enro/tests/application/util/EnroTestApplicationMenu.kt diff --git a/tests/application/src/desktopMain/kotlin/dev/enro/tests/application/window/SimpleWindowDestination.kt b/tests/application/common/src/desktopMain/kotlin/dev/enro/tests/application/window/SimpleWindowDestination.kt similarity index 100% rename from tests/application/src/desktopMain/kotlin/dev/enro/tests/application/window/SimpleWindowDestination.kt rename to tests/application/common/src/desktopMain/kotlin/dev/enro/tests/application/window/SimpleWindowDestination.kt diff --git a/tests/application/src/iosMain/kotlin/dev/enro/tests/application/SelectDestination.ios.kt b/tests/application/common/src/iosMain/kotlin/dev/enro/tests/application/SelectDestination.ios.kt similarity index 100% rename from tests/application/src/iosMain/kotlin/dev/enro/tests/application/SelectDestination.ios.kt rename to tests/application/common/src/iosMain/kotlin/dev/enro/tests/application/SelectDestination.ios.kt diff --git a/tests/application/src/iosMain/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultFlow.ios.kt b/tests/application/common/src/iosMain/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultFlow.ios.kt similarity index 100% rename from tests/application/src/iosMain/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultFlow.ios.kt rename to tests/application/common/src/iosMain/kotlin/dev/enro/tests/application/compose/results/ComposeManagedResultFlow.ios.kt diff --git a/tests/application/src/iosMain/kotlin/dev/enro/tests/application/ios/NativeSwiftUIView.kt b/tests/application/common/src/iosMain/kotlin/dev/enro/tests/application/ios/NativeSwiftUIView.kt similarity index 100% rename from tests/application/src/iosMain/kotlin/dev/enro/tests/application/ios/NativeSwiftUIView.kt rename to tests/application/common/src/iosMain/kotlin/dev/enro/tests/application/ios/NativeSwiftUIView.kt diff --git a/tests/application/src/iosMain/kotlin/dev/enro/tests/application/ios/NativeUIViewController.kt b/tests/application/common/src/iosMain/kotlin/dev/enro/tests/application/ios/NativeUIViewController.kt similarity index 100% rename from tests/application/src/iosMain/kotlin/dev/enro/tests/application/ios/NativeUIViewController.kt rename to tests/application/common/src/iosMain/kotlin/dev/enro/tests/application/ios/NativeUIViewController.kt diff --git a/tests/application/src/iosMain/kotlin/dev/enro/tests/application/ios/UIViewControllerComposeDestination.kt b/tests/application/common/src/iosMain/kotlin/dev/enro/tests/application/ios/UIViewControllerComposeDestination.kt similarity index 100% rename from tests/application/src/iosMain/kotlin/dev/enro/tests/application/ios/UIViewControllerComposeDestination.kt rename to tests/application/common/src/iosMain/kotlin/dev/enro/tests/application/ios/UIViewControllerComposeDestination.kt diff --git a/tests/application/src/iosMain/kotlin/dev/enro/tests/application/ios/UIViewControllerPresentDestination.kt b/tests/application/common/src/iosMain/kotlin/dev/enro/tests/application/ios/UIViewControllerPresentDestination.kt similarity index 100% rename from tests/application/src/iosMain/kotlin/dev/enro/tests/application/ios/UIViewControllerPresentDestination.kt rename to tests/application/common/src/iosMain/kotlin/dev/enro/tests/application/ios/UIViewControllerPresentDestination.kt diff --git a/tests/application/src/iosMain/kotlin/dev/enro/tests/application/ios/UIViewControllerPushDestination.kt b/tests/application/common/src/iosMain/kotlin/dev/enro/tests/application/ios/UIViewControllerPushDestination.kt similarity index 100% rename from tests/application/src/iosMain/kotlin/dev/enro/tests/application/ios/UIViewControllerPushDestination.kt rename to tests/application/common/src/iosMain/kotlin/dev/enro/tests/application/ios/UIViewControllerPushDestination.kt diff --git a/tests/application/src/wasmJsMain/resources/index.html b/tests/application/common/src/wasmJsMain/resources/index.html similarity index 100% rename from tests/application/src/wasmJsMain/resources/index.html rename to tests/application/common/src/wasmJsMain/resources/index.html diff --git a/tests/application/src/wasmJsMain/resources/styles.css b/tests/application/common/src/wasmJsMain/resources/styles.css similarity index 100% rename from tests/application/src/wasmJsMain/resources/styles.css rename to tests/application/common/src/wasmJsMain/resources/styles.css diff --git a/tests/module-one/build.gradle.kts b/tests/module-one/build.gradle.kts index 99fe7a948..c4c1bd25e 100644 --- a/tests/module-one/build.gradle.kts +++ b/tests/module-one/build.gradle.kts @@ -1,34 +1,32 @@ import org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode plugins { + id("configure-library") id("com.google.devtools.ksp") - id("com.android.library") - id("kotlin-android") - id("kotlin-parcelize") id("configure-compose") } -configureAndroidLibrary("dev.enro.tests.moduleone") kotlin { explicitApi = ExplicitApiMode.Disabled + + sourceSets { + commonMain.dependencies { + implementation("dev.enro:enro:${project.enroVersionName}") + implementation("dev.enro:enro-compat:${project.enroVersionName}") + } + androidMain.dependencies { + implementation(libs.compose.accompanist.systemUiController) + implementation(libs.androidx.core) + implementation(libs.androidx.appcompat) + implementation(libs.androidx.viewmodel) + implementation(libs.androidx.fragment) + implementation(libs.androidx.activity) + implementation(libs.material) + } + } } dependencies { - implementation("dev.enro:enro:${project.enroVersionName}") - implementation("dev.enro:enro-compat:${project.enroVersionName}") - ksp("dev.enro:enro-processor:${project.enroVersionName}") - + add("kspAndroid", "dev.enro:enro-processor:${project.enroVersionName}") lintChecks(project(":enro-lint")) - - implementation(libs.compose.material) - implementation(libs.compose.accompanist.systemUiController) - - implementation(libs.kotlin.stdLib) - implementation(libs.androidx.core) - implementation(libs.androidx.appcompat) - implementation(libs.androidx.viewmodel) - implementation(libs.androidx.fragment) - implementation(libs.androidx.activity) - - implementation(libs.material) -} \ No newline at end of file +} diff --git a/tests/module-one/src/main/AndroidManifest.xml b/tests/module-one/src/androidMain/AndroidManifest.xml similarity index 100% rename from tests/module-one/src/main/AndroidManifest.xml rename to tests/module-one/src/androidMain/AndroidManifest.xml diff --git a/tests/module-one/src/main/java/dev/enro/tests/module/ModuleOneDestination.kt b/tests/module-one/src/androidMain/kotlin/dev/enro/tests/module/ModuleOneDestination.kt similarity index 100% rename from tests/module-one/src/main/java/dev/enro/tests/module/ModuleOneDestination.kt rename to tests/module-one/src/androidMain/kotlin/dev/enro/tests/module/ModuleOneDestination.kt diff --git a/tests/module-one/src/main/java/dev/enro/tests/module/ModuleOneScreen.kt b/tests/module-one/src/androidMain/kotlin/dev/enro/tests/module/ModuleOneScreen.kt similarity index 100% rename from tests/module-one/src/main/java/dev/enro/tests/module/ModuleOneScreen.kt rename to tests/module-one/src/androidMain/kotlin/dev/enro/tests/module/ModuleOneScreen.kt diff --git a/tests/module-one/src/main/java/dev/enro/tests/module/TestModuleEditableDestination.kt b/tests/module-one/src/androidMain/kotlin/dev/enro/tests/module/TestModuleEditableDestination.kt similarity index 100% rename from tests/module-one/src/main/java/dev/enro/tests/module/TestModuleEditableDestination.kt rename to tests/module-one/src/androidMain/kotlin/dev/enro/tests/module/TestModuleEditableDestination.kt