From ac6bb030e4725ca39b5a28bafc669b840f482722 Mon Sep 17 00:00:00 2001 From: Gabriel Ittner Date: Tue, 17 Oct 2023 14:01:07 +0200 Subject: [PATCH] Revert "add deep links test helper" This reverts commit 9545218eb759b962b6eca726644f5c218135ccfe. --- deeplinks-plugin/api/deeplinks-plugin.api | 169 +++++++++++++- deeplinks-plugin/deeplinks-plugin.gradle.kts | 2 +- deeplinks-plugin/rules.pro | 4 + .../deeplinks/plugin}/DeepLinkDefinitions.kt | 4 +- .../deeplinks/plugin/DeepLinksExtension.kt | 7 - .../plugin/DeeplinksManifestConfigurator.kt | 8 +- .../DeeplinksManifestConfiguratorTask.kt | 4 +- .../deeplinks/plugin/DeeplinksPlugin.kt | 24 +- .../api/android/navigation-testing.api | 214 ------------------ .../api/jvm/navigation-testing.api | 170 -------------- .../navigation-testing.gradle.kts | 27 +-- .../navigation/deeplinks/DeepLinkTesting.kt | 36 --- .../khonshu/navigation/NavigatorTurbine.kt | 0 .../khonshu/navigation/ResultOwnerTesting.kt | 0 .../navigation/TestNavEventCollector.kt | 0 15 files changed, 199 insertions(+), 470 deletions(-) rename {navigation-testing/src/commonMain/kotlin/com/freeletics/khonshu/navigation/deeplinks => deeplinks-plugin/src/main/kotlin/com/freeletics/khonshu/deeplinks/plugin}/DeepLinkDefinitions.kt (90%) delete mode 100644 deeplinks-plugin/src/main/kotlin/com/freeletics/khonshu/deeplinks/plugin/DeepLinksExtension.kt delete mode 100644 navigation-testing/api/android/navigation-testing.api delete mode 100644 navigation-testing/api/jvm/navigation-testing.api delete mode 100644 navigation-testing/src/commonMain/kotlin/com/freeletics/khonshu/navigation/deeplinks/DeepLinkTesting.kt rename navigation-testing/src/{androidMain => main}/kotlin/com/freeletics/khonshu/navigation/NavigatorTurbine.kt (100%) rename navigation-testing/src/{androidMain => main}/kotlin/com/freeletics/khonshu/navigation/ResultOwnerTesting.kt (100%) rename navigation-testing/src/{androidMain => main}/kotlin/com/freeletics/khonshu/navigation/TestNavEventCollector.kt (100%) diff --git a/deeplinks-plugin/api/deeplinks-plugin.api b/deeplinks-plugin/api/deeplinks-plugin.api index 89eaa288d..88dac0e72 100644 --- a/deeplinks-plugin/api/deeplinks-plugin.api +++ b/deeplinks-plugin/api/deeplinks-plugin.api @@ -1,11 +1,77 @@ -public abstract class com/freeletics/khonshu/deeplinks/plugin/DeepLinksExtension { - public fun ()V - public abstract fun getDeepLinkDefinitionsFile ()Lorg/gradle/api/file/RegularFileProperty; +public final class com/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinition { + public static final field Companion Lcom/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinition$Companion; + public synthetic fun (ILjava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;)V + public synthetic fun (Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/util/List; + public final fun component2 ()Ljava/util/List; + public final fun component3 ()Ljava/util/List; + public final fun component4 ()Ljava/util/List; + public final fun copy (Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;)Lcom/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinition; + public static synthetic fun copy$default (Lcom/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinition;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;ILjava/lang/Object;)Lcom/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinition; + public fun equals (Ljava/lang/Object;)Z + public final fun getExampleQueries ()Ljava/util/List; + public final fun getPatterns ()Ljava/util/List; + public final fun getPlaceholders ()Ljava/util/List; + public final fun getPrefixes ()Ljava/util/List; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinition;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinition$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinition$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinition; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinition;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinition$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinitions { + public static final field Companion Lcom/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinitions$Companion; + public synthetic fun (ILjava/util/List;Ljava/util/List;Ljava/util/Map;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/util/List;Ljava/util/List;Ljava/util/Map;)V + public synthetic fun (Ljava/util/List;Ljava/util/List;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/util/List; + public final fun component2 ()Ljava/util/List; + public final fun component3 ()Ljava/util/Map; + public final fun copy (Ljava/util/List;Ljava/util/List;Ljava/util/Map;)Lcom/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinitions; + public static synthetic fun copy$default (Lcom/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinitions;Ljava/util/List;Ljava/util/List;Ljava/util/Map;ILjava/lang/Object;)Lcom/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinitions; + public fun equals (Ljava/lang/Object;)Z + public final fun getDeepLinks ()Ljava/util/Map; + public final fun getPlaceholders ()Ljava/util/List; + public final fun getPrefixes ()Ljava/util/List; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinitions;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinitions$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinitions$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinitions; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinitions;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinitions$Companion { + public final fun decodeFromString (Ljava/lang/String;)Lcom/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinitions; + public final fun serializer ()Lkotlinx/serialization/KSerializer; } public abstract class com/freeletics/khonshu/deeplinks/plugin/DeeplinksManifestConfiguratorTask : org/gradle/api/DefaultTask { public fun ()V - public abstract fun getDeepLinkDefinitionsFile ()Lorg/gradle/api/file/RegularFileProperty; + public abstract fun getDeeplinksConfigurationFile ()Lorg/gradle/api/file/RegularFileProperty; public abstract fun getMergedManifest ()Lorg/gradle/api/file/RegularFileProperty; public abstract fun getUpdatedManifest ()Lorg/gradle/api/file/RegularFileProperty; public final fun taskAction ()V @@ -17,3 +83,98 @@ public abstract class com/freeletics/khonshu/deeplinks/plugin/DeeplinksPlugin : public fun apply (Lorg/gradle/api/Project;)V } +public final class com/freeletics/khonshu/deeplinks/plugin/PatternDefinition { + public static final field Companion Lcom/freeletics/khonshu/deeplinks/plugin/PatternDefinition$Companion; + public static final synthetic fun box-impl (Ljava/lang/String;)Lcom/freeletics/khonshu/deeplinks/plugin/PatternDefinition; + public static fun constructor-impl (Ljava/lang/String;)Ljava/lang/String; + public fun equals (Ljava/lang/Object;)Z + public static fun equals-impl (Ljava/lang/String;Ljava/lang/Object;)Z + public static final fun equals-impl0 (Ljava/lang/String;Ljava/lang/String;)Z + public final fun getValue ()Ljava/lang/String; + public fun hashCode ()I + public static fun hashCode-impl (Ljava/lang/String;)I + public static final fun replacePlaceholders-impl (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Ljava/lang/String; + public fun toString ()Ljava/lang/String; + public static fun toString-impl (Ljava/lang/String;)Ljava/lang/String; + public final synthetic fun unbox-impl ()Ljava/lang/String; +} + +public final class com/freeletics/khonshu/deeplinks/plugin/PatternDefinition$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/freeletics/khonshu/deeplinks/plugin/PatternDefinition$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun deserialize-bHjcdSE (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/String; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun serialize-GtvXZAs (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/String;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/freeletics/khonshu/deeplinks/plugin/PatternDefinition$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/freeletics/khonshu/deeplinks/plugin/PlaceholderDefinition { + public static final field Companion Lcom/freeletics/khonshu/deeplinks/plugin/PlaceholderDefinition$Companion; + public synthetic fun (ILjava/lang/String;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/List;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/util/List; + public final fun copy (Ljava/lang/String;Ljava/util/List;)Lcom/freeletics/khonshu/deeplinks/plugin/PlaceholderDefinition; + public static synthetic fun copy$default (Lcom/freeletics/khonshu/deeplinks/plugin/PlaceholderDefinition;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lcom/freeletics/khonshu/deeplinks/plugin/PlaceholderDefinition; + public fun equals (Ljava/lang/Object;)Z + public final fun getExampleValues ()Ljava/util/List; + public final fun getKey ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/freeletics/khonshu/deeplinks/plugin/PlaceholderDefinition;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/freeletics/khonshu/deeplinks/plugin/PlaceholderDefinition$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/freeletics/khonshu/deeplinks/plugin/PlaceholderDefinition$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/freeletics/khonshu/deeplinks/plugin/PlaceholderDefinition; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/freeletics/khonshu/deeplinks/plugin/PlaceholderDefinition;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/freeletics/khonshu/deeplinks/plugin/PlaceholderDefinition$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/freeletics/khonshu/deeplinks/plugin/PrefixDefinition { + public static final field Companion Lcom/freeletics/khonshu/deeplinks/plugin/PrefixDefinition$Companion; + public synthetic fun (ILjava/lang/String;Ljava/lang/String;ZLkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;Z)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/String; + public final fun component3 ()Z + public final fun copy (Ljava/lang/String;Ljava/lang/String;Z)Lcom/freeletics/khonshu/deeplinks/plugin/PrefixDefinition; + public static synthetic fun copy$default (Lcom/freeletics/khonshu/deeplinks/plugin/PrefixDefinition;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Lcom/freeletics/khonshu/deeplinks/plugin/PrefixDefinition; + public fun equals (Ljava/lang/Object;)Z + public final fun getAutoVerified ()Z + public final fun getHost ()Ljava/lang/String; + public final fun getScheme ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/freeletics/khonshu/deeplinks/plugin/PrefixDefinition;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/freeletics/khonshu/deeplinks/plugin/PrefixDefinition$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/freeletics/khonshu/deeplinks/plugin/PrefixDefinition$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/freeletics/khonshu/deeplinks/plugin/PrefixDefinition; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/freeletics/khonshu/deeplinks/plugin/PrefixDefinition;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/freeletics/khonshu/deeplinks/plugin/PrefixDefinition$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + diff --git a/deeplinks-plugin/deeplinks-plugin.gradle.kts b/deeplinks-plugin/deeplinks-plugin.gradle.kts index 4d4d1789a..e0c430576 100644 --- a/deeplinks-plugin/deeplinks-plugin.gradle.kts +++ b/deeplinks-plugin/deeplinks-plugin.gradle.kts @@ -7,7 +7,7 @@ plugins { dependencies { implementation(libs.toml) implementation(libs.serialization) - implementation(projects.navigationTesting) + implementation(projects.navigation) compileOnly(libs.android.gradle.api) diff --git a/deeplinks-plugin/rules.pro b/deeplinks-plugin/rules.pro index cc46af3b5..e4ac397c5 100644 --- a/deeplinks-plugin/rules.pro +++ b/deeplinks-plugin/rules.pro @@ -15,6 +15,10 @@ # Keep your public API so that it's callable from scripts -keep class com.freeletics.khonshu.deeplinks.plugin.** { public *; } +-keepnames class kotlin.jvm.internal.DefaultConstructorMarker +-keepclassmembers @com.squareup.moshi.JsonClass @kotlin.Metadata class * { + synthetic (...); +} # No need to obfuscate class names -dontobfuscate diff --git a/navigation-testing/src/commonMain/kotlin/com/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions.kt b/deeplinks-plugin/src/main/kotlin/com/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinitions.kt similarity index 90% rename from navigation-testing/src/commonMain/kotlin/com/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions.kt rename to deeplinks-plugin/src/main/kotlin/com/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinitions.kt index b3647ff37..8e9e31e61 100644 --- a/navigation-testing/src/commonMain/kotlin/com/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions.kt +++ b/deeplinks-plugin/src/main/kotlin/com/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinitions.kt @@ -1,5 +1,7 @@ -package com.freeletics.khonshu.navigation.deeplinks +package com.freeletics.khonshu.deeplinks.plugin +import com.freeletics.khonshu.navigation.deeplinks.DeepLinkHandler +import com.freeletics.khonshu.navigation.deeplinks.replacePlaceholders import com.freeletics.khonshu.navigation.internal.InternalNavigationApi import kotlinx.serialization.Serializable import kotlinx.serialization.decodeFromString diff --git a/deeplinks-plugin/src/main/kotlin/com/freeletics/khonshu/deeplinks/plugin/DeepLinksExtension.kt b/deeplinks-plugin/src/main/kotlin/com/freeletics/khonshu/deeplinks/plugin/DeepLinksExtension.kt deleted file mode 100644 index 95afa6522..000000000 --- a/deeplinks-plugin/src/main/kotlin/com/freeletics/khonshu/deeplinks/plugin/DeepLinksExtension.kt +++ /dev/null @@ -1,7 +0,0 @@ -package com.freeletics.khonshu.deeplinks.plugin - -import org.gradle.api.file.RegularFileProperty - -public abstract class DeepLinksExtension() { - public abstract val deepLinkDefinitionsFile: RegularFileProperty -} diff --git a/deeplinks-plugin/src/main/kotlin/com/freeletics/khonshu/deeplinks/plugin/DeeplinksManifestConfigurator.kt b/deeplinks-plugin/src/main/kotlin/com/freeletics/khonshu/deeplinks/plugin/DeeplinksManifestConfigurator.kt index ba7459230..4ff64bac0 100644 --- a/deeplinks-plugin/src/main/kotlin/com/freeletics/khonshu/deeplinks/plugin/DeeplinksManifestConfigurator.kt +++ b/deeplinks-plugin/src/main/kotlin/com/freeletics/khonshu/deeplinks/plugin/DeeplinksManifestConfigurator.kt @@ -1,9 +1,6 @@ package com.freeletics.khonshu.deeplinks.plugin -import com.freeletics.khonshu.navigation.deeplinks.DeepLinkDefinition -import com.freeletics.khonshu.navigation.deeplinks.DeepLinkDefinitions -import com.freeletics.khonshu.navigation.deeplinks.PatternDefinition -import com.freeletics.khonshu.navigation.deeplinks.PrefixDefinition +import com.freeletics.khonshu.navigation.internal.InternalNavigationApi import java.io.File private const val PLACEHOLDER = "" @@ -19,8 +16,6 @@ internal fun configure( "Did not find $PLACEHOLDER in given manifest ${inputManifestFile.absolutePath}" } - check(configurationFile.exists()) - val definitions = DeepLinkDefinitions.decodeFromString(configurationFile.readText()) val indentation = manifest[placeholderIndex].takeWhile { it == ' ' } manifest[placeholderIndex] = intentFiltersFromConfig(definitions, indentation) @@ -82,6 +77,7 @@ private class IntentFilterBuilder( builder.appendLine("$indentation ") } + @OptIn(InternalNavigationApi::class) fun appendData(scheme: String, host: String, pattern: PatternDefinition) { val pathPattern = pattern.replacePlaceholders { ".*" } builder.appendLine("$indentation { override fun apply(project: Project) { - val extension = project.extensions.create("deepLinks", DeepLinksExtension::class.java) - extension.deepLinkDefinitionsFile.convention(project.layout.projectDirectory.file("deeplinks.toml")) + val configurationFile = File(project.projectDir, "deeplinks.toml") + if (!configurationFile.exists()) { + // configuration file doesn't exist -> skipping + return + } project.plugins.withId("com.android.library") { - setupDeeplinksManifestConfigurator(project, extension) + setupDeeplinksManifestConfigurator(project, configurationFile) } project.plugins.withId("com.android.application") { - setupDeeplinksManifestConfigurator(project, extension) + setupDeeplinksManifestConfigurator(project, configurationFile) } } - private fun setupDeeplinksManifestConfigurator(project: Project, extension: DeepLinksExtension) { + private fun setupDeeplinksManifestConfigurator(project: Project, configurationFile: File) { val androidComponents = project.extensions.getByType(AndroidComponentsExtension::class.java) androidComponents.onVariants { variant -> - val name = "${variant.name}DeeplinksManifestConfigurator" - val manifestUpdater = project.tasks.register(name, DeeplinksManifestConfiguratorTask::class.java) { - it.deepLinkDefinitionsFile.set(extension.deepLinkDefinitionsFile) + val manifestUpdater = project.tasks.register( + variant.name + "DeeplinksManifestConfigurator", + DeeplinksManifestConfiguratorTask::class.java, + ) { + it.deeplinksConfigurationFile.set( + configurationFile, + ) } variant.artifacts.use(manifestUpdater).wiredWithFiles( DeeplinksManifestConfiguratorTask::mergedManifest, diff --git a/navigation-testing/api/android/navigation-testing.api b/navigation-testing/api/android/navigation-testing.api deleted file mode 100644 index 3e908ba02..000000000 --- a/navigation-testing/api/android/navigation-testing.api +++ /dev/null @@ -1,214 +0,0 @@ -public abstract interface class com/freeletics/khonshu/navigation/NavigatorTurbine { - public abstract fun awaitNavigate (Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract fun awaitNavigateBack (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract fun awaitNavigateBackTo (Lkotlin/reflect/KClass;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract fun awaitNavigateForResult (Lcom/freeletics/khonshu/navigation/ActivityResultRequest;Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract fun awaitNavigateForResult (Lcom/freeletics/khonshu/navigation/ActivityResultRequest;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract fun awaitNavigateTo (Lcom/freeletics/khonshu/navigation/ActivityRoute;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract fun awaitNavigateTo (Lcom/freeletics/khonshu/navigation/NavRoute;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract fun awaitNavigateToRoot (Lcom/freeletics/khonshu/navigation/NavRoot;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract fun awaitNavigateUp (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract fun awaitNavigationResult (Lcom/freeletics/khonshu/navigation/NavigationResultRequest$Key;Landroid/os/Parcelable;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract fun awaitRequestPermissions (Lcom/freeletics/khonshu/navigation/PermissionsResultRequest;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract fun awaitRequestPermissions (Lcom/freeletics/khonshu/navigation/PermissionsResultRequest;[Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract fun awaitResetToRoot (Lcom/freeletics/khonshu/navigation/NavRoot;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract fun cancel (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract fun cancelAndIgnoreRemainingNavEvents (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract fun dispatchBackPress ()V -} - -public final class com/freeletics/khonshu/navigation/NavigatorTurbineKt { - public static final fun dispatchBackPress (Lcom/freeletics/khonshu/navigation/NavEventNavigator;)V - public static final fun test-C2H2yOE (Lcom/freeletics/khonshu/navigation/NavEventNavigator;Lkotlin/time/Duration;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun test-C2H2yOE$default (Lcom/freeletics/khonshu/navigation/NavEventNavigator;Lkotlin/time/Duration;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static final fun testIn-5_5nbZA (Lcom/freeletics/khonshu/navigation/NavEventNavigator;Lkotlinx/coroutines/CoroutineScope;Lkotlin/time/Duration;Ljava/lang/String;)Lcom/freeletics/khonshu/navigation/NavigatorTurbine; - public static synthetic fun testIn-5_5nbZA$default (Lcom/freeletics/khonshu/navigation/NavEventNavigator;Lkotlinx/coroutines/CoroutineScope;Lkotlin/time/Duration;Ljava/lang/String;ILjava/lang/Object;)Lcom/freeletics/khonshu/navigation/NavigatorTurbine; -} - -public final class com/freeletics/khonshu/navigation/ResultOwnerTestingKt { - public static final fun sendResult (Lcom/freeletics/khonshu/navigation/ActivityResultRequest;Ljava/lang/Object;)V - public static final fun sendResult (Lcom/freeletics/khonshu/navigation/NavigationResultRequest;Landroid/os/Parcelable;)V - public static final fun sendResult (Lcom/freeletics/khonshu/navigation/PermissionsResultRequest;Ljava/lang/String;Lcom/freeletics/khonshu/navigation/PermissionsResultRequest$PermissionResult;)V - public static final fun sendResult (Lcom/freeletics/khonshu/navigation/PermissionsResultRequest;Ljava/util/Map;)V - public static final fun sendResult (Lcom/freeletics/khonshu/navigation/PermissionsResultRequest;[Lkotlin/Pair;)V -} - -public final class com/freeletics/khonshu/navigation/TestNavEventCollector { - public final fun awaitNavigateBack ()V - public final fun awaitNavigateBackTo-UamjCxQ (Lkotlin/reflect/KClass;Z)V - public final fun awaitNavigateTo (Lcom/freeletics/khonshu/navigation/NavRoute;)V - public final fun awaitNavigateToRoot (Lcom/freeletics/khonshu/navigation/NavRoot;Z)V - public final fun awaitNavigateUp ()V - public final fun awaitResetToRoot (Lcom/freeletics/khonshu/navigation/NavRoot;)V -} - -public final class com/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinition { - public static final field Companion Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinition$Companion; - public synthetic fun (ILjava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;)V - public synthetic fun (Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/util/List; - public final fun component2 ()Ljava/util/List; - public final fun component3 ()Ljava/util/List; - public final fun component4 ()Ljava/util/List; - public final fun copy (Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;)Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinition; - public static synthetic fun copy$default (Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinition;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;ILjava/lang/Object;)Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinition; - public fun equals (Ljava/lang/Object;)Z - public final fun getExampleQueries ()Ljava/util/List; - public final fun getPatterns ()Ljava/util/List; - public final fun getPlaceholders ()Ljava/util/List; - public final fun getPrefixes ()Ljava/util/List; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinition;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinition$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinition$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinition; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinition;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinition$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions { - public static final field Companion Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions$Companion; - public synthetic fun (ILjava/util/List;Ljava/util/List;Ljava/util/Map;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/util/List;Ljava/util/List;Ljava/util/Map;)V - public synthetic fun (Ljava/util/List;Ljava/util/List;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/util/List; - public final fun component2 ()Ljava/util/List; - public final fun component3 ()Ljava/util/Map; - public final fun copy (Ljava/util/List;Ljava/util/List;Ljava/util/Map;)Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions; - public static synthetic fun copy$default (Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions;Ljava/util/List;Ljava/util/List;Ljava/util/Map;ILjava/lang/Object;)Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions; - public fun equals (Ljava/lang/Object;)Z - public final fun getDeepLinks ()Ljava/util/Map; - public final fun getPlaceholders ()Ljava/util/List; - public final fun getPrefixes ()Ljava/util/List; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions$Companion { - public final fun decodeFromString (Ljava/lang/String;)Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions; - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/freeletics/khonshu/navigation/deeplinks/DeepLinkTestingKt { - public static final fun containsAllDeepLinks (Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions;Ljava/util/Set;Ljava/util/Set;)V -} - -public final class com/freeletics/khonshu/navigation/deeplinks/PatternDefinition { - public static final field Companion Lcom/freeletics/khonshu/navigation/deeplinks/PatternDefinition$Companion; - public static final synthetic fun box-impl (Ljava/lang/String;)Lcom/freeletics/khonshu/navigation/deeplinks/PatternDefinition; - public static fun constructor-impl (Ljava/lang/String;)Ljava/lang/String; - public fun equals (Ljava/lang/Object;)Z - public static fun equals-impl (Ljava/lang/String;Ljava/lang/Object;)Z - public static final fun equals-impl0 (Ljava/lang/String;Ljava/lang/String;)Z - public final fun getValue ()Ljava/lang/String; - public fun hashCode ()I - public static fun hashCode-impl (Ljava/lang/String;)I - public static final fun replacePlaceholders-impl (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Ljava/lang/String; - public fun toString ()Ljava/lang/String; - public static fun toString-impl (Ljava/lang/String;)Ljava/lang/String; - public final synthetic fun unbox-impl ()Ljava/lang/String; -} - -public final class com/freeletics/khonshu/navigation/deeplinks/PatternDefinition$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/freeletics/khonshu/navigation/deeplinks/PatternDefinition$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun deserialize-UEwoQNk (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/String; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun serialize-8x5bDLE (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/String;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/freeletics/khonshu/navigation/deeplinks/PatternDefinition$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/freeletics/khonshu/navigation/deeplinks/PlaceholderDefinition { - public static final field Companion Lcom/freeletics/khonshu/navigation/deeplinks/PlaceholderDefinition$Companion; - public synthetic fun (ILjava/lang/String;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/util/List;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/util/List; - public final fun copy (Ljava/lang/String;Ljava/util/List;)Lcom/freeletics/khonshu/navigation/deeplinks/PlaceholderDefinition; - public static synthetic fun copy$default (Lcom/freeletics/khonshu/navigation/deeplinks/PlaceholderDefinition;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lcom/freeletics/khonshu/navigation/deeplinks/PlaceholderDefinition; - public fun equals (Ljava/lang/Object;)Z - public final fun getExampleValues ()Ljava/util/List; - public final fun getKey ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/freeletics/khonshu/navigation/deeplinks/PlaceholderDefinition;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/freeletics/khonshu/navigation/deeplinks/PlaceholderDefinition$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/freeletics/khonshu/navigation/deeplinks/PlaceholderDefinition$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/freeletics/khonshu/navigation/deeplinks/PlaceholderDefinition; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/freeletics/khonshu/navigation/deeplinks/PlaceholderDefinition;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/freeletics/khonshu/navigation/deeplinks/PlaceholderDefinition$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/freeletics/khonshu/navigation/deeplinks/PrefixDefinition { - public static final field Companion Lcom/freeletics/khonshu/navigation/deeplinks/PrefixDefinition$Companion; - public synthetic fun (ILjava/lang/String;Ljava/lang/String;ZLkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/lang/String;Z)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/lang/String; - public final fun component3 ()Z - public final fun copy (Ljava/lang/String;Ljava/lang/String;Z)Lcom/freeletics/khonshu/navigation/deeplinks/PrefixDefinition; - public static synthetic fun copy$default (Lcom/freeletics/khonshu/navigation/deeplinks/PrefixDefinition;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Lcom/freeletics/khonshu/navigation/deeplinks/PrefixDefinition; - public fun equals (Ljava/lang/Object;)Z - public final fun getAutoVerified ()Z - public final fun getHost ()Ljava/lang/String; - public final fun getScheme ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/freeletics/khonshu/navigation/deeplinks/PrefixDefinition;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/freeletics/khonshu/navigation/deeplinks/PrefixDefinition$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/freeletics/khonshu/navigation/deeplinks/PrefixDefinition$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/freeletics/khonshu/navigation/deeplinks/PrefixDefinition; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/freeletics/khonshu/navigation/deeplinks/PrefixDefinition;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/freeletics/khonshu/navigation/deeplinks/PrefixDefinition$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - diff --git a/navigation-testing/api/jvm/navigation-testing.api b/navigation-testing/api/jvm/navigation-testing.api deleted file mode 100644 index 14872d3c5..000000000 --- a/navigation-testing/api/jvm/navigation-testing.api +++ /dev/null @@ -1,170 +0,0 @@ -public final class com/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinition { - public static final field Companion Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinition$Companion; - public synthetic fun (ILjava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;)V - public synthetic fun (Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/util/List; - public final fun component2 ()Ljava/util/List; - public final fun component3 ()Ljava/util/List; - public final fun component4 ()Ljava/util/List; - public final fun copy (Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;)Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinition; - public static synthetic fun copy$default (Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinition;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;ILjava/lang/Object;)Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinition; - public fun equals (Ljava/lang/Object;)Z - public final fun getExampleQueries ()Ljava/util/List; - public final fun getPatterns ()Ljava/util/List; - public final fun getPlaceholders ()Ljava/util/List; - public final fun getPrefixes ()Ljava/util/List; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinition;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinition$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinition$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinition; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinition;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinition$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions { - public static final field Companion Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions$Companion; - public synthetic fun (ILjava/util/List;Ljava/util/List;Ljava/util/Map;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/util/List;Ljava/util/List;Ljava/util/Map;)V - public synthetic fun (Ljava/util/List;Ljava/util/List;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/util/List; - public final fun component2 ()Ljava/util/List; - public final fun component3 ()Ljava/util/Map; - public final fun copy (Ljava/util/List;Ljava/util/List;Ljava/util/Map;)Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions; - public static synthetic fun copy$default (Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions;Ljava/util/List;Ljava/util/List;Ljava/util/Map;ILjava/lang/Object;)Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions; - public fun equals (Ljava/lang/Object;)Z - public final fun getDeepLinks ()Ljava/util/Map; - public final fun getPlaceholders ()Ljava/util/List; - public final fun getPrefixes ()Ljava/util/List; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions$Companion { - public final fun decodeFromString (Ljava/lang/String;)Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions; - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/freeletics/khonshu/navigation/deeplinks/DeepLinkTestingKt { - public static final fun containsAllDeepLinks (Lcom/freeletics/khonshu/navigation/deeplinks/DeepLinkDefinitions;Ljava/util/Set;Ljava/util/Set;)V -} - -public final class com/freeletics/khonshu/navigation/deeplinks/PatternDefinition { - public static final field Companion Lcom/freeletics/khonshu/navigation/deeplinks/PatternDefinition$Companion; - public static final synthetic fun box-impl (Ljava/lang/String;)Lcom/freeletics/khonshu/navigation/deeplinks/PatternDefinition; - public static fun constructor-impl (Ljava/lang/String;)Ljava/lang/String; - public fun equals (Ljava/lang/Object;)Z - public static fun equals-impl (Ljava/lang/String;Ljava/lang/Object;)Z - public static final fun equals-impl0 (Ljava/lang/String;Ljava/lang/String;)Z - public final fun getValue ()Ljava/lang/String; - public fun hashCode ()I - public static fun hashCode-impl (Ljava/lang/String;)I - public static final fun replacePlaceholders-impl (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Ljava/lang/String; - public fun toString ()Ljava/lang/String; - public static fun toString-impl (Ljava/lang/String;)Ljava/lang/String; - public final synthetic fun unbox-impl ()Ljava/lang/String; -} - -public final class com/freeletics/khonshu/navigation/deeplinks/PatternDefinition$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/freeletics/khonshu/navigation/deeplinks/PatternDefinition$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun deserialize-UEwoQNk (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/String; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun serialize-8x5bDLE (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/String;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/freeletics/khonshu/navigation/deeplinks/PatternDefinition$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/freeletics/khonshu/navigation/deeplinks/PlaceholderDefinition { - public static final field Companion Lcom/freeletics/khonshu/navigation/deeplinks/PlaceholderDefinition$Companion; - public synthetic fun (ILjava/lang/String;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/util/List;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/util/List; - public final fun copy (Ljava/lang/String;Ljava/util/List;)Lcom/freeletics/khonshu/navigation/deeplinks/PlaceholderDefinition; - public static synthetic fun copy$default (Lcom/freeletics/khonshu/navigation/deeplinks/PlaceholderDefinition;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lcom/freeletics/khonshu/navigation/deeplinks/PlaceholderDefinition; - public fun equals (Ljava/lang/Object;)Z - public final fun getExampleValues ()Ljava/util/List; - public final fun getKey ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/freeletics/khonshu/navigation/deeplinks/PlaceholderDefinition;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/freeletics/khonshu/navigation/deeplinks/PlaceholderDefinition$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/freeletics/khonshu/navigation/deeplinks/PlaceholderDefinition$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/freeletics/khonshu/navigation/deeplinks/PlaceholderDefinition; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/freeletics/khonshu/navigation/deeplinks/PlaceholderDefinition;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/freeletics/khonshu/navigation/deeplinks/PlaceholderDefinition$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/freeletics/khonshu/navigation/deeplinks/PrefixDefinition { - public static final field Companion Lcom/freeletics/khonshu/navigation/deeplinks/PrefixDefinition$Companion; - public synthetic fun (ILjava/lang/String;Ljava/lang/String;ZLkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/lang/String;Z)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/lang/String; - public final fun component3 ()Z - public final fun copy (Ljava/lang/String;Ljava/lang/String;Z)Lcom/freeletics/khonshu/navigation/deeplinks/PrefixDefinition; - public static synthetic fun copy$default (Lcom/freeletics/khonshu/navigation/deeplinks/PrefixDefinition;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Lcom/freeletics/khonshu/navigation/deeplinks/PrefixDefinition; - public fun equals (Ljava/lang/Object;)Z - public final fun getAutoVerified ()Z - public final fun getHost ()Ljava/lang/String; - public final fun getScheme ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/freeletics/khonshu/navigation/deeplinks/PrefixDefinition;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/freeletics/khonshu/navigation/deeplinks/PrefixDefinition$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/freeletics/khonshu/navigation/deeplinks/PrefixDefinition$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/freeletics/khonshu/navigation/deeplinks/PrefixDefinition; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/freeletics/khonshu/navigation/deeplinks/PrefixDefinition;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/freeletics/khonshu/navigation/deeplinks/PrefixDefinition$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - diff --git a/navigation-testing/navigation-testing.gradle.kts b/navigation-testing/navigation-testing.gradle.kts index 0ec8576a1..85d289b0c 100644 --- a/navigation-testing/navigation-testing.gradle.kts +++ b/navigation-testing/navigation-testing.gradle.kts @@ -1,31 +1,16 @@ plugins { - alias(libs.plugins.fgp.multiplatform) + alias(libs.plugins.fgp.android) alias(libs.plugins.fgp.publish) - alias(libs.plugins.kotlin.serialization) } freeletics { optIn("com.freeletics.khonshu.navigation.internal.InternalNavigationApi") - - multiplatform { - addJvmTarget() - addAndroidTarget() - } -} - -dependencies { } dependencies { - "commonMainApi"(projects.navigation) - "commonMainApi"(libs.kotlin.test) - - "commonMainImplementation"(libs.toml) - "commonMainImplementation"(libs.serialization) - - "androidMainApi"(libs.coroutines.core) - "androidMainApi"(libs.turbine) - - "androidMainImplementation"(libs.androidx.activity) - "androidMainImplementation"(libs.truth) + api(projects.navigation) + api(libs.coroutines.core) + api(libs.turbine) + implementation(libs.androidx.activity) + implementation(libs.truth) } diff --git a/navigation-testing/src/commonMain/kotlin/com/freeletics/khonshu/navigation/deeplinks/DeepLinkTesting.kt b/navigation-testing/src/commonMain/kotlin/com/freeletics/khonshu/navigation/deeplinks/DeepLinkTesting.kt deleted file mode 100644 index 7a689be65..000000000 --- a/navigation-testing/src/commonMain/kotlin/com/freeletics/khonshu/navigation/deeplinks/DeepLinkTesting.kt +++ /dev/null @@ -1,36 +0,0 @@ -package com.freeletics.khonshu.navigation.deeplinks - -import kotlin.test.assertTrue - -public fun DeepLinkDefinitions.containsAllDeepLinks( - deepLinkHandlers: Set, - defaultPrefixes: Set, -) { - val codePrefixPatternCombinations = deepLinkHandlers.flatMapTo(HashSet()) { handler -> - handler.prefixes.ifEmpty { defaultPrefixes }.flatMap { prefix -> - handler.patterns.map { pattern -> - prefix to pattern - } - } - } - - val definedPrefixPatternCombinations = deepLinks.values.flatMapTo(HashSet()) { deepLink -> - deepLink.prefixes.ifEmpty { prefixes }.flatMap { prefix -> - deepLink.patterns.map { pattern -> - DeepLinkHandler.Prefix("${prefix.scheme}://${prefix.host}") to - DeepLinkHandler.Pattern(pattern.value) - } - } - } - - val codeOnly = codePrefixPatternCombinations - definedPrefixPatternCombinations - assertTrue( - codeOnly.isEmpty(), - "The following deep links are not defined in TOML but are present in code: $codeOnly", - ) - val tomlOnly = definedPrefixPatternCombinations - codePrefixPatternCombinations - assertTrue( - tomlOnly.isEmpty(), - "The following deep links are not defined in code but are present in the TOML file: $tomlOnly", - ) -} diff --git a/navigation-testing/src/androidMain/kotlin/com/freeletics/khonshu/navigation/NavigatorTurbine.kt b/navigation-testing/src/main/kotlin/com/freeletics/khonshu/navigation/NavigatorTurbine.kt similarity index 100% rename from navigation-testing/src/androidMain/kotlin/com/freeletics/khonshu/navigation/NavigatorTurbine.kt rename to navigation-testing/src/main/kotlin/com/freeletics/khonshu/navigation/NavigatorTurbine.kt diff --git a/navigation-testing/src/androidMain/kotlin/com/freeletics/khonshu/navigation/ResultOwnerTesting.kt b/navigation-testing/src/main/kotlin/com/freeletics/khonshu/navigation/ResultOwnerTesting.kt similarity index 100% rename from navigation-testing/src/androidMain/kotlin/com/freeletics/khonshu/navigation/ResultOwnerTesting.kt rename to navigation-testing/src/main/kotlin/com/freeletics/khonshu/navigation/ResultOwnerTesting.kt diff --git a/navigation-testing/src/androidMain/kotlin/com/freeletics/khonshu/navigation/TestNavEventCollector.kt b/navigation-testing/src/main/kotlin/com/freeletics/khonshu/navigation/TestNavEventCollector.kt similarity index 100% rename from navigation-testing/src/androidMain/kotlin/com/freeletics/khonshu/navigation/TestNavEventCollector.kt rename to navigation-testing/src/main/kotlin/com/freeletics/khonshu/navigation/TestNavEventCollector.kt