Skip to content

Commit

Permalink
make navigation-testing a multiplatform module
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielittner committed Oct 17, 2023
1 parent ac6bb03 commit 03a3d24
Show file tree
Hide file tree
Showing 12 changed files with 403 additions and 226 deletions.
166 changes: 0 additions & 166 deletions deeplinks-plugin/api/deeplinks-plugin.api
Original file line number Diff line number Diff line change
@@ -1,74 +1,3 @@
public final class com/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinition {
public static final field Companion Lcom/freeletics/khonshu/deeplinks/plugin/DeepLinkDefinition$Companion;
public synthetic fun <init> (ILjava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;)V
public synthetic fun <init> (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 <init> (ILjava/util/List;Ljava/util/List;Ljava/util/Map;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (Ljava/util/List;Ljava/util/List;Ljava/util/Map;)V
public synthetic fun <init> (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 <init> ()V
public abstract fun getDeeplinksConfigurationFile ()Lorg/gradle/api/file/RegularFileProperty;
Expand All @@ -83,98 +12,3 @@ 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 <init> (ILjava/lang/String;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (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 <init> (ILjava/lang/String;Ljava/lang/String;ZLkotlinx/serialization/internal/SerializationConstructorMarker;)V
public fun <init> (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;
}

2 changes: 1 addition & 1 deletion deeplinks-plugin/deeplinks-plugin.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
dependencies {
implementation(libs.toml)
implementation(libs.serialization)
implementation(projects.navigation)
implementation(projects.navigationTesting)

compileOnly(libs.android.gradle.api)

Expand Down
4 changes: 0 additions & 4 deletions deeplinks-plugin/rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@

# 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 <init>(...);
}

# No need to obfuscate class names
-dontobfuscate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.freeletics.khonshu.deeplinks.plugin

import com.freeletics.khonshu.navigation.internal.InternalNavigationApi
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 java.io.File

private const val PLACEHOLDER = "<!-- DEEPLINK INTENT FILTERS -->"
Expand Down Expand Up @@ -77,7 +80,6 @@ private class IntentFilterBuilder(
builder.appendLine("$indentation <category android:name=\"${category}\" />")
}

@OptIn(InternalNavigationApi::class)
fun appendData(scheme: String, host: String, pattern: PatternDefinition) {
val pathPattern = pattern.replacePlaceholders { ".*" }
builder.appendLine("$indentation <data")
Expand Down
Loading

0 comments on commit 03a3d24

Please sign in to comment.