Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support kmp for the placeholder module #396

Merged
merged 2 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions landscapist-placeholder/api/android/landscapist-placeholder.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
public abstract class com/skydoves/landscapist/placeholder/placeholder/PlaceholderPlugin {
public static final field $stable I
}

public final class com/skydoves/landscapist/placeholder/placeholder/PlaceholderPlugin$Failure : com/skydoves/landscapist/placeholder/placeholder/PlaceholderPlugin, com/skydoves/landscapist/plugins/ImagePlugin$FailureStatePlugin {
public static final field $stable I
public fun <init> (Ljava/lang/Object;)V
public final fun component1 ()Ljava/lang/Object;
public fun compose (Landroidx/compose/ui/Modifier;Lcom/skydoves/landscapist/ImageOptions;Ljava/lang/Throwable;Landroidx/compose/runtime/Composer;I)Lcom/skydoves/landscapist/plugins/ImagePlugin;
public final fun copy (Ljava/lang/Object;)Lcom/skydoves/landscapist/placeholder/placeholder/PlaceholderPlugin$Failure;
public static synthetic fun copy$default (Lcom/skydoves/landscapist/placeholder/placeholder/PlaceholderPlugin$Failure;Ljava/lang/Object;ILjava/lang/Object;)Lcom/skydoves/landscapist/placeholder/placeholder/PlaceholderPlugin$Failure;
public fun equals (Ljava/lang/Object;)Z
public final fun getSource ()Ljava/lang/Object;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class com/skydoves/landscapist/placeholder/placeholder/PlaceholderPlugin$Loading : com/skydoves/landscapist/placeholder/placeholder/PlaceholderPlugin, com/skydoves/landscapist/plugins/ImagePlugin$LoadingStatePlugin {
public static final field $stable I
public fun <init> (Ljava/lang/Object;)V
public final fun component1 ()Ljava/lang/Object;
public fun compose (Landroidx/compose/ui/Modifier;Lcom/skydoves/landscapist/ImageOptions;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;I)Lcom/skydoves/landscapist/plugins/ImagePlugin;
public final fun copy (Ljava/lang/Object;)Lcom/skydoves/landscapist/placeholder/placeholder/PlaceholderPlugin$Loading;
public static synthetic fun copy$default (Lcom/skydoves/landscapist/placeholder/placeholder/PlaceholderPlugin$Loading;Ljava/lang/Object;ILjava/lang/Object;)Lcom/skydoves/landscapist/placeholder/placeholder/PlaceholderPlugin$Loading;
public fun equals (Ljava/lang/Object;)Z
public final fun getSource ()Ljava/lang/Object;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class com/skydoves/landscapist/placeholder/shimmer/LocalShimmerKt {
public static final fun getLocalShimmerPlugin ()Landroidx/compose/runtime/ProvidableCompositionLocal;
}

public final class com/skydoves/landscapist/placeholder/shimmer/ShimmerKt {
public static final fun Shimmer-eopBjH0 (Landroidx/compose/ui/Modifier;JJLcom/skydoves/landscapist/placeholder/shimmer/ShimmerType;Landroidx/compose/runtime/Composer;II)V
}

public final class com/skydoves/landscapist/placeholder/shimmer/ShimmerPlugin : com/skydoves/landscapist/plugins/ImagePlugin$LoadingStatePlugin {
public static final field $stable I
public synthetic fun <init> (JJLcom/skydoves/landscapist/placeholder/shimmer/ShimmerType;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (JJLcom/skydoves/landscapist/placeholder/shimmer/ShimmerType;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1-0d7_KjU ()J
public final fun component2-0d7_KjU ()J
public final fun component3 ()Lcom/skydoves/landscapist/placeholder/shimmer/ShimmerType;
public fun compose (Landroidx/compose/ui/Modifier;Lcom/skydoves/landscapist/ImageOptions;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;I)Lcom/skydoves/landscapist/plugins/ImagePlugin;
public final fun copy-jxsXWHM (JJLcom/skydoves/landscapist/placeholder/shimmer/ShimmerType;)Lcom/skydoves/landscapist/placeholder/shimmer/ShimmerPlugin;
public static synthetic fun copy-jxsXWHM$default (Lcom/skydoves/landscapist/placeholder/shimmer/ShimmerPlugin;JJLcom/skydoves/landscapist/placeholder/shimmer/ShimmerType;ILjava/lang/Object;)Lcom/skydoves/landscapist/placeholder/shimmer/ShimmerPlugin;
public fun equals (Ljava/lang/Object;)Z
public final fun getBaseColor-0d7_KjU ()J
public final fun getHighlightColor-0d7_KjU ()J
public final fun getShimmerType ()Lcom/skydoves/landscapist/placeholder/shimmer/ShimmerType;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class com/skydoves/landscapist/placeholder/shimmer/ShimmerType : java/lang/Enum {
public static final field FADE Lcom/skydoves/landscapist/placeholder/shimmer/ShimmerType;
public static final field RESONATE Lcom/skydoves/landscapist/placeholder/shimmer/ShimmerType;
public static fun getEntries ()Lkotlin/enums/EnumEntries;
public static fun valueOf (Ljava/lang/String;)Lcom/skydoves/landscapist/placeholder/shimmer/ShimmerType;
public static fun values ()[Lcom/skydoves/landscapist/placeholder/shimmer/ShimmerType;
}

public final class com/skydoves/landscapist/placeholder/thumbnail/ThumbnailPlugin : com/skydoves/landscapist/plugins/ImagePlugin$LoadingStatePlugin {
public static final field $stable I
public synthetic fun <init> (JILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (JLkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun compose (Landroidx/compose/ui/Modifier;Lcom/skydoves/landscapist/ImageOptions;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;I)Lcom/skydoves/landscapist/plugins/ImagePlugin;
}

71 changes: 71 additions & 0 deletions landscapist-placeholder/api/desktop/landscapist-placeholder.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
public abstract class com/skydoves/landscapist/placeholder/placeholder/PlaceholderPlugin {
public static final field $stable I
}

public final class com/skydoves/landscapist/placeholder/placeholder/PlaceholderPlugin$Failure : com/skydoves/landscapist/placeholder/placeholder/PlaceholderPlugin, com/skydoves/landscapist/plugins/ImagePlugin$FailureStatePlugin {
public static final field $stable I
public fun <init> (Ljava/lang/Object;)V
public final fun component1 ()Ljava/lang/Object;
public fun compose (Landroidx/compose/ui/Modifier;Lcom/skydoves/landscapist/ImageOptions;Ljava/lang/Throwable;Landroidx/compose/runtime/Composer;I)Lcom/skydoves/landscapist/plugins/ImagePlugin;
public final fun copy (Ljava/lang/Object;)Lcom/skydoves/landscapist/placeholder/placeholder/PlaceholderPlugin$Failure;
public static synthetic fun copy$default (Lcom/skydoves/landscapist/placeholder/placeholder/PlaceholderPlugin$Failure;Ljava/lang/Object;ILjava/lang/Object;)Lcom/skydoves/landscapist/placeholder/placeholder/PlaceholderPlugin$Failure;
public fun equals (Ljava/lang/Object;)Z
public final fun getSource ()Ljava/lang/Object;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class com/skydoves/landscapist/placeholder/placeholder/PlaceholderPlugin$Loading : com/skydoves/landscapist/placeholder/placeholder/PlaceholderPlugin, com/skydoves/landscapist/plugins/ImagePlugin$LoadingStatePlugin {
public static final field $stable I
public fun <init> (Ljava/lang/Object;)V
public final fun component1 ()Ljava/lang/Object;
public fun compose (Landroidx/compose/ui/Modifier;Lcom/skydoves/landscapist/ImageOptions;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;I)Lcom/skydoves/landscapist/plugins/ImagePlugin;
public final fun copy (Ljava/lang/Object;)Lcom/skydoves/landscapist/placeholder/placeholder/PlaceholderPlugin$Loading;
public static synthetic fun copy$default (Lcom/skydoves/landscapist/placeholder/placeholder/PlaceholderPlugin$Loading;Ljava/lang/Object;ILjava/lang/Object;)Lcom/skydoves/landscapist/placeholder/placeholder/PlaceholderPlugin$Loading;
public fun equals (Ljava/lang/Object;)Z
public final fun getSource ()Ljava/lang/Object;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class com/skydoves/landscapist/placeholder/shimmer/LocalShimmerKt {
public static final fun getLocalShimmerPlugin ()Landroidx/compose/runtime/ProvidableCompositionLocal;
}

public final class com/skydoves/landscapist/placeholder/shimmer/ShimmerKt {
public static final fun Shimmer-eopBjH0 (Landroidx/compose/ui/Modifier;JJLcom/skydoves/landscapist/placeholder/shimmer/ShimmerType;Landroidx/compose/runtime/Composer;II)V
}

public final class com/skydoves/landscapist/placeholder/shimmer/ShimmerPlugin : com/skydoves/landscapist/plugins/ImagePlugin$LoadingStatePlugin {
public static final field $stable I
public synthetic fun <init> (JJLcom/skydoves/landscapist/placeholder/shimmer/ShimmerType;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (JJLcom/skydoves/landscapist/placeholder/shimmer/ShimmerType;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1-0d7_KjU ()J
public final fun component2-0d7_KjU ()J
public final fun component3 ()Lcom/skydoves/landscapist/placeholder/shimmer/ShimmerType;
public fun compose (Landroidx/compose/ui/Modifier;Lcom/skydoves/landscapist/ImageOptions;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;I)Lcom/skydoves/landscapist/plugins/ImagePlugin;
public final fun copy-jxsXWHM (JJLcom/skydoves/landscapist/placeholder/shimmer/ShimmerType;)Lcom/skydoves/landscapist/placeholder/shimmer/ShimmerPlugin;
public static synthetic fun copy-jxsXWHM$default (Lcom/skydoves/landscapist/placeholder/shimmer/ShimmerPlugin;JJLcom/skydoves/landscapist/placeholder/shimmer/ShimmerType;ILjava/lang/Object;)Lcom/skydoves/landscapist/placeholder/shimmer/ShimmerPlugin;
public fun equals (Ljava/lang/Object;)Z
public final fun getBaseColor-0d7_KjU ()J
public final fun getHighlightColor-0d7_KjU ()J
public final fun getShimmerType ()Lcom/skydoves/landscapist/placeholder/shimmer/ShimmerType;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class com/skydoves/landscapist/placeholder/shimmer/ShimmerType : java/lang/Enum {
public static final field FADE Lcom/skydoves/landscapist/placeholder/shimmer/ShimmerType;
public static final field RESONATE Lcom/skydoves/landscapist/placeholder/shimmer/ShimmerType;
public static fun getEntries ()Lkotlin/enums/EnumEntries;
public static fun valueOf (Ljava/lang/String;)Lcom/skydoves/landscapist/placeholder/shimmer/ShimmerType;
public static fun values ()[Lcom/skydoves/landscapist/placeholder/shimmer/ShimmerType;
}

public final class com/skydoves/landscapist/placeholder/thumbnail/ThumbnailPlugin : com/skydoves/landscapist/plugins/ImagePlugin$LoadingStatePlugin {
public static final field $stable I
public synthetic fun <init> (JILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (JLkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun compose (Landroidx/compose/ui/Modifier;Lcom/skydoves/landscapist/ImageOptions;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;I)Lcom/skydoves/landscapist/plugins/ImagePlugin;
}

52 changes: 37 additions & 15 deletions landscapist-placeholder/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import com.github.skydoves.landscapist.Configuration

plugins {
id("landscapist.library.compose")
id("landscapist.library.compose.multiplatform")
id("landscapist.spotless")
}

Expand All @@ -35,6 +35,31 @@ mavenPublishing {
}
}

kotlin {
sourceSets {
all {
languageSettings.optIn("kotlin.RequiresOptIn")
languageSettings.optIn("kotlinx.coroutines.ExperimentalCoroutinesApi")
languageSettings.optIn("com.skydoves.landscapist.InternalLandscapistApi")
}
val commonMain by getting {
dependencies {
api(project(":landscapist"))

implementation(compose.ui)
implementation(compose.runtime)
implementation(compose.foundation)
}
}

val androidMain by getting {
dependencies {
implementation(libs.androidx.core.ktx)
}
}
}
}

android {
namespace = "com.skydoves.landscapist.placeholder"
compileSdk = Configuration.compileSdk
Expand All @@ -52,17 +77,14 @@ baselineProfile {
}
}

dependencies {
api(project(":landscapist"))

implementation(libs.androidx.core.ktx)
implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.runtime)
implementation(libs.androidx.compose.foundation)

androidTestImplementation(libs.androidx.test.rules)
androidTestImplementation(libs.androidx.test.runner)
androidTestImplementation(libs.androidx.test.junit)
androidTestImplementation(libs.androidx.compose.ui)
androidTestImplementation(libs.androidx.compose.ui.test)
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs += listOf(
"-Xexplicit-api=strict",
"-opt-in=kotlin.RequiresOptIn",
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-opt-in=com.skydoves.landscapist.InternalLandscapistApi",
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@file:JvmName("LocalShimmerParams")
@file:JvmMultifileClass
@file:Suppress("unused")

package com.skydoves.landscapist.placeholder.shimmer
Expand Down
Loading