From cc8a9a4fe053bf5cdee1a0e6b15860c8b5876a2d Mon Sep 17 00:00:00 2001 From: skydoves Date: Sun, 31 Dec 2023 11:25:40 +0900 Subject: [PATCH 1/9] Configure kmp and compose multiplatform dependencies and properties --- gradle.properties | 13 +++++++++++++ gradle/libs.versions.toml | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index c15ddc57..16a2cf00 100644 --- a/gradle.properties +++ b/gradle.properties @@ -41,6 +41,19 @@ android.nonTransitiveRClass=true enableComposeCompilerMetrics=true enableComposeCompilerReports=true +# MPP +kotlin.mpp.enableCInteropCommonization=true +kotlin.mpp.stability.nowarn=true +kotlin.mpp.androidSourceSetLayoutVersion=2 +kotlin.native.binary.memoryModel=experimental +kotlin.native.cacheKind=none + +# Compose +org.jetbrains.compose.experimental.uikit.enabled=true +org.jetbrains.compose.experimental.macos.enabled=true +org.jetbrains.compose.experimental.jscanvas.enabled=true +compose.kotlin.native.manageCacheKind=false + # Required to publish to Nexus (see https://github.com/gradle/gradle/issues/11308) systemProp.org.gradle.internal.publish.checksums.insecure=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index bbed7da1..ebe76dbf 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -18,6 +18,7 @@ androidxJunit = "1.1.5" androidxMacroBenchmark = "1.2.2" androidxProfileinstaller = "1.3.1" androidxUiAutomator = "2.3.0-beta01" +jetbrains-compose = "1.5.11" glide = "4.16.0" fresco = "3.1.3" coil = "2.5.0" @@ -73,7 +74,8 @@ android-application = { id = "com.android.application", version.ref = "androidGr android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" } android-test = { id = "com.android.test", version.ref = "androidGradlePlugin" } kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } -kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" } +kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } +jetbrains-compose = { id = "org.jetbrains.compose", version.ref = "jetbrains-compose" } dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" } nexus-plugin = { id = "com.vanniktech.maven.publish", version.ref = "nexusPlugin" } kotlin-binary-compatibility = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlinBinaryCompatibility" } From 8b60f2c0c3242c721887b8ecec53ead9503b04ba Mon Sep 17 00:00:00 2001 From: skydoves Date: Sun, 31 Dec 2023 12:00:45 +0900 Subject: [PATCH 2/9] Implement compose multiplatform convention plugin --- build-logic/convention/build.gradle.kts | 42 +++--- ...oseMultiplatformLibraryConventionPlugin.kt | 63 +++++++++ .../landscapist/ComposeMultiplatform.kt | 122 ++++++++++++++++++ build.gradle.kts | 2 + 4 files changed, 210 insertions(+), 19 deletions(-) create mode 100644 build-logic/convention/src/main/kotlin/ComposeMultiplatformLibraryConventionPlugin.kt create mode 100644 build-logic/convention/src/main/kotlin/com/skydoves/landscapist/ComposeMultiplatform.kt diff --git a/build-logic/convention/build.gradle.kts b/build-logic/convention/build.gradle.kts index f90e6170..a9ca7f4f 100644 --- a/build-logic/convention/build.gradle.kts +++ b/build-logic/convention/build.gradle.kts @@ -1,33 +1,37 @@ plugins { - `kotlin-dsl` + `kotlin-dsl` } group = "com.skydoves.landscapist.buildlogic" java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } dependencies { - compileOnly(libs.android.gradlePlugin) - compileOnly(libs.kotlin.gradlePlugin) - compileOnly(libs.spotless.gradlePlugin) + compileOnly(libs.android.gradlePlugin) + compileOnly(libs.kotlin.gradlePlugin) + compileOnly(libs.spotless.gradlePlugin) } gradlePlugin { - plugins { - register("androidApplicationCompose") { - id = "landscapist.application.compose" - implementationClass = "AndroidApplicationComposeConventionPlugin" - } - register("androidLibraryCompose") { - id = "landscapist.library.compose" - implementationClass = "AndroidLibraryComposeConventionPlugin" - } - register("spotless") { - id = "landscapist.spotless" - implementationClass = "SpotlessConventionPlugin" - } + plugins { + register("androidApplicationCompose") { + id = "landscapist.application.compose" + implementationClass = "AndroidApplicationComposeConventionPlugin" } + register("androidLibraryCompose") { + id = "landscapist.library.compose" + implementationClass = "AndroidLibraryComposeConventionPlugin" + } + register("composeMultiplatformLibrary") { + id = "landscapist.library.compose.multiplatform" + implementationClass = "ComposeMultiplatformLibraryConventionPlugin" + } + register("spotless") { + id = "landscapist.spotless" + implementationClass = "SpotlessConventionPlugin" + } + } } diff --git a/build-logic/convention/src/main/kotlin/ComposeMultiplatformLibraryConventionPlugin.kt b/build-logic/convention/src/main/kotlin/ComposeMultiplatformLibraryConventionPlugin.kt new file mode 100644 index 00000000..27faa826 --- /dev/null +++ b/build-logic/convention/src/main/kotlin/ComposeMultiplatformLibraryConventionPlugin.kt @@ -0,0 +1,63 @@ +/* + * Designed and developed by 2020-2022 skydoves (Jaewoong Eum) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import com.android.build.gradle.LibraryExtension +import com.skydoves.landscapist.configureAndroidCompose +import com.skydoves.landscapist.configureComposeMultiplatform +import com.skydoves.landscapist.configureKotlinAndroid +import com.skydoves.landscapist.kotlinOptions +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.api.artifacts.VersionCatalogsExtension +import org.gradle.api.tasks.compile.JavaCompile +import org.gradle.kotlin.dsl.configure +import org.gradle.kotlin.dsl.dependencies +import org.gradle.kotlin.dsl.getByType +import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension + +class ComposeMultiplatformLibraryConventionPlugin : Plugin { + override fun apply(target: Project) { + with(target) { + pluginManager.apply("com.android.library") + pluginManager.apply("org.jetbrains.kotlin.multiplatform") + pluginManager.apply("org.jetbrains.compose") + pluginManager.apply("com.vanniktech.maven.publish") + pluginManager.apply("binary-compatibility-validator") + pluginManager.apply("androidx.baselineprofile") + + extensions.configure libraryExtension@{ + configureKotlinAndroid(this) + extensions.configure kmpExtension@{ + configureComposeMultiplatform(this@libraryExtension, this@kmpExtension) + } + + kotlinOptions { + freeCompilerArgs = freeCompilerArgs + listOf("-Xexplicit-api=strict") + } + } + + val libs = extensions.getByType().named("libs") + tasks.withType(JavaCompile::class.java).configureEach { + this.targetCompatibility = libs.findVersion("jvmTarget").get().toString() + this.sourceCompatibility = libs.findVersion("jvmTarget").get().toString() + } + + dependencies { + add("baselineProfile", project(":benchmark-landscapist")) + } + } + } +} diff --git a/build-logic/convention/src/main/kotlin/com/skydoves/landscapist/ComposeMultiplatform.kt b/build-logic/convention/src/main/kotlin/com/skydoves/landscapist/ComposeMultiplatform.kt new file mode 100644 index 00000000..babeb531 --- /dev/null +++ b/build-logic/convention/src/main/kotlin/com/skydoves/landscapist/ComposeMultiplatform.kt @@ -0,0 +1,122 @@ +/* + * Designed and developed by 2020-2022 skydoves (Jaewoong Eum) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@file:Suppress("UnstableApiUsage") + +package com.skydoves.landscapist + +import com.android.build.api.dsl.CommonExtension +import java.io.File +import org.gradle.api.Project +import org.gradle.api.artifacts.VersionCatalogsExtension +import org.gradle.kotlin.dsl.dependencies +import org.gradle.kotlin.dsl.getByType +import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension + +/** + * Configure Compose-Multiplatform-specific options + */ +internal fun Project.configureComposeMultiplatform( + commonExtension: CommonExtension<*, *, *, *, *>, + kotlinMultiplatformExtension: KotlinMultiplatformExtension, +) { + val libs = extensions.getByType().named("libs") + + kotlinMultiplatformExtension.apply { + androidTarget { publishLibraryVariants("release") } + jvm("desktop") + iosX64() + iosArm64() + iosSimulatorArm64() + macosX64() + macosArm64() + js(IR) { + browser() + nodejs() + } + @Suppress("OPT_IN_USAGE") + applyHierarchyTemplate { + common { + group("jvm") { + withAndroidTarget() + withJvm() + } + group("skia") { + withJvm() + group("darwin") { + group("apple") { + group("ios") { + withIosX64() + withIosArm64() + withIosSimulatorArm64() + } + group("macos") { + withMacosX64() + withMacosArm64() + } + } + withJs() + } + } + } + } + } + + commonExtension.apply { + buildFeatures { + compose = true + } + + composeOptions { + kotlinCompilerExtensionVersion = + libs.findVersion("androidxComposeCompiler").get().toString() + } + + kotlinOptions { + freeCompilerArgs = freeCompilerArgs + buildComposeMetricsParameters() + } + + packaging { + resources { + excludes.add("/META-INF/{AL2.0,LGPL2.1}") + } + } + } +} + +private fun Project.buildComposeMetricsParameters(): List { + val metricParameters = mutableListOf() + val enableMetricsProvider = project.providers.gradleProperty("enableComposeCompilerMetrics") + val enableMetrics = (enableMetricsProvider.orNull == "true") + if (enableMetrics) { + val metricsFolder = File(project.buildDir, "compose-metrics") + metricParameters.add("-P") + metricParameters.add( + "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=${metricsFolder.absolutePath}/compose_metrics" + ) + } + + val enableReportsProvider = project.providers.gradleProperty("enableComposeCompilerReports") + val enableReports = (enableReportsProvider.orNull == "true") + if (enableReports) { + val reportsFolder = File(project.buildDir, "compose-reports") + metricParameters.add("-P") + metricParameters.add( + "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=${reportsFolder.absolutePath}/compose_metrics" + ) + } + return metricParameters.toList() +} diff --git a/build.gradle.kts b/build.gradle.kts index 5990fbdb..5d87d68f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,6 +3,8 @@ plugins { alias(libs.plugins.android.application) apply false alias(libs.plugins.android.library) apply false alias(libs.plugins.kotlin.android) apply false + alias(libs.plugins.kotlin.multiplatform) apply false + alias(libs.plugins.jetbrains.compose) apply false alias(libs.plugins.kotlin.binary.compatibility) apply false alias(libs.plugins.baseline.profile) apply false alias(libs.plugins.hilt) apply false From f936f954d22ca1fa82d54ee1e932726c5ec5db60 Mon Sep 17 00:00:00 2001 From: skydoves Date: Sun, 31 Dec 2023 12:28:04 +0900 Subject: [PATCH 3/9] Support landscapist module for kmp --- ...oseMultiplatformLibraryConventionPlugin.kt | 5 - .../landscapist/ComposeMultiplatform.kt | 6 +- landscapist/api/android/landscapist.api | 191 ++++++++++++++++++ landscapist/api/desktop/landscapist.api | 183 +++++++++++++++++ landscapist/build.gradle.kts | 42 +++- .../{main => androidMain}/AndroidManifest.xml | 0 .../{main => androidMain}/baseline-prof.txt | 0 .../skydoves/landscapist/DrawablePainter.kt | 1 + .../landscapist/RememberDrawablePainter.kt} | 16 -- .../com/skydoves/landscapist/DataSource.kt | 0 .../com/skydoves/landscapist/ImageBySource.kt | 0 .../com/skydoves/landscapist/ImageLoad.kt | 0 .../skydoves/landscapist/ImageLoadState.kt | 0 .../com/skydoves/landscapist/ImageOptions.kt | 0 .../skydoves/landscapist/ImageSemantics.kt | 0 .../com/skydoves/landscapist/ImageState.kt | 0 .../landscapist/InternalLandscapistApi.kt | 0 .../skydoves/landscapist/LandscapistImage.kt | 0 .../landscapist/RememberPainterPlugins.kt | 39 ++++ .../com/skydoves/landscapist/StableHolder.kt | 0 .../landscapist/components/ImageComponent.kt | 0 .../components/ImageComponentExtensions.kt | 0 .../components/ImagePluginComponent.kt | 0 .../components/LocalImageComponent.kt | 0 .../components/RememberImageComponent.kt | 0 .../landscapist/constraints/Constrainable.kt | 0 .../constraints/ConstraintsExtensions.kt | 0 .../landscapist/plugins/ImagePlugin.kt | 0 28 files changed, 451 insertions(+), 32 deletions(-) create mode 100644 landscapist/api/android/landscapist.api create mode 100644 landscapist/api/desktop/landscapist.api rename landscapist/src/{main => androidMain}/AndroidManifest.xml (100%) rename landscapist/src/{main => androidMain}/baseline-prof.txt (100%) rename landscapist/src/{main => androidMain}/kotlin/com/skydoves/landscapist/DrawablePainter.kt (99%) rename landscapist/src/{main/kotlin/com/skydoves/landscapist/RememberPainterPlugins.kt => androidMain/kotlin/com/skydoves/landscapist/RememberDrawablePainter.kt} (80%) rename landscapist/src/{main => commonMain}/kotlin/com/skydoves/landscapist/DataSource.kt (100%) rename landscapist/src/{main => commonMain}/kotlin/com/skydoves/landscapist/ImageBySource.kt (100%) rename landscapist/src/{main => commonMain}/kotlin/com/skydoves/landscapist/ImageLoad.kt (100%) rename landscapist/src/{main => commonMain}/kotlin/com/skydoves/landscapist/ImageLoadState.kt (100%) rename landscapist/src/{main => commonMain}/kotlin/com/skydoves/landscapist/ImageOptions.kt (100%) rename landscapist/src/{main => commonMain}/kotlin/com/skydoves/landscapist/ImageSemantics.kt (100%) rename landscapist/src/{main => commonMain}/kotlin/com/skydoves/landscapist/ImageState.kt (100%) rename landscapist/src/{main => commonMain}/kotlin/com/skydoves/landscapist/InternalLandscapistApi.kt (100%) rename landscapist/src/{main => commonMain}/kotlin/com/skydoves/landscapist/LandscapistImage.kt (100%) create mode 100644 landscapist/src/commonMain/kotlin/com/skydoves/landscapist/RememberPainterPlugins.kt rename landscapist/src/{main => commonMain}/kotlin/com/skydoves/landscapist/StableHolder.kt (100%) rename landscapist/src/{main => commonMain}/kotlin/com/skydoves/landscapist/components/ImageComponent.kt (100%) rename landscapist/src/{main => commonMain}/kotlin/com/skydoves/landscapist/components/ImageComponentExtensions.kt (100%) rename landscapist/src/{main => commonMain}/kotlin/com/skydoves/landscapist/components/ImagePluginComponent.kt (100%) rename landscapist/src/{main => commonMain}/kotlin/com/skydoves/landscapist/components/LocalImageComponent.kt (100%) rename landscapist/src/{main => commonMain}/kotlin/com/skydoves/landscapist/components/RememberImageComponent.kt (100%) rename landscapist/src/{main => commonMain}/kotlin/com/skydoves/landscapist/constraints/Constrainable.kt (100%) rename landscapist/src/{main => commonMain}/kotlin/com/skydoves/landscapist/constraints/ConstraintsExtensions.kt (100%) rename landscapist/src/{main => commonMain}/kotlin/com/skydoves/landscapist/plugins/ImagePlugin.kt (100%) diff --git a/build-logic/convention/src/main/kotlin/ComposeMultiplatformLibraryConventionPlugin.kt b/build-logic/convention/src/main/kotlin/ComposeMultiplatformLibraryConventionPlugin.kt index 27faa826..ff70fdb1 100644 --- a/build-logic/convention/src/main/kotlin/ComposeMultiplatformLibraryConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/ComposeMultiplatformLibraryConventionPlugin.kt @@ -39,14 +39,9 @@ class ComposeMultiplatformLibraryConventionPlugin : Plugin { pluginManager.apply("androidx.baselineprofile") extensions.configure libraryExtension@{ - configureKotlinAndroid(this) extensions.configure kmpExtension@{ configureComposeMultiplatform(this@libraryExtension, this@kmpExtension) } - - kotlinOptions { - freeCompilerArgs = freeCompilerArgs + listOf("-Xexplicit-api=strict") - } } val libs = extensions.getByType().named("libs") diff --git a/build-logic/convention/src/main/kotlin/com/skydoves/landscapist/ComposeMultiplatform.kt b/build-logic/convention/src/main/kotlin/com/skydoves/landscapist/ComposeMultiplatform.kt index babeb531..9400cb7b 100644 --- a/build-logic/convention/src/main/kotlin/com/skydoves/landscapist/ComposeMultiplatform.kt +++ b/build-logic/convention/src/main/kotlin/com/skydoves/landscapist/ComposeMultiplatform.kt @@ -73,6 +73,8 @@ internal fun Project.configureComposeMultiplatform( } } } + + explicitApi() } commonExtension.apply { @@ -85,10 +87,6 @@ internal fun Project.configureComposeMultiplatform( libs.findVersion("androidxComposeCompiler").get().toString() } - kotlinOptions { - freeCompilerArgs = freeCompilerArgs + buildComposeMetricsParameters() - } - packaging { resources { excludes.add("/META-INF/{AL2.0,LGPL2.1}") diff --git a/landscapist/api/android/landscapist.api b/landscapist/api/android/landscapist.api new file mode 100644 index 00000000..f6c4fd27 --- /dev/null +++ b/landscapist/api/android/landscapist.api @@ -0,0 +1,191 @@ +public final class com/skydoves/landscapist/DataSource : java/lang/Enum { + public static final field DISK Lcom/skydoves/landscapist/DataSource; + public static final field MEMORY Lcom/skydoves/landscapist/DataSource; + public static final field NETWORK Lcom/skydoves/landscapist/DataSource; + public static final field UNKNOWN Lcom/skydoves/landscapist/DataSource; + public static fun getEntries ()Lkotlin/enums/EnumEntries; + public static fun valueOf (Ljava/lang/String;)Lcom/skydoves/landscapist/DataSource; + public static fun values ()[Lcom/skydoves/landscapist/DataSource; +} + +public final class com/skydoves/landscapist/DrawablePainterKt { + public static final fun rememberDrawablePainter (Landroid/graphics/drawable/Drawable;Landroidx/compose/runtime/Composer;I)Landroidx/compose/ui/graphics/painter/Painter; +} + +public final class com/skydoves/landscapist/ImageLoad { + public static final fun ImageLoad (Ljava/lang/Object;Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Modifier;Lcom/skydoves/landscapist/ImageOptions;Lcom/skydoves/landscapist/constraints/Constrainable;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V + public static final fun getZeroConstraints ()J +} + +public abstract class com/skydoves/landscapist/ImageLoadState { + public static final field $stable I +} + +public final class com/skydoves/landscapist/ImageLoadState$Failure : com/skydoves/landscapist/ImageLoadState { + public static final field $stable I + public fun (Ljava/lang/Object;Ljava/lang/Throwable;)V + public final fun component1 ()Ljava/lang/Object; + public final fun component2 ()Ljava/lang/Throwable; + public final fun copy (Ljava/lang/Object;Ljava/lang/Throwable;)Lcom/skydoves/landscapist/ImageLoadState$Failure; + public static synthetic fun copy$default (Lcom/skydoves/landscapist/ImageLoadState$Failure;Ljava/lang/Object;Ljava/lang/Throwable;ILjava/lang/Object;)Lcom/skydoves/landscapist/ImageLoadState$Failure; + public fun equals (Ljava/lang/Object;)Z + public final fun getData ()Ljava/lang/Object; + public final fun getReason ()Ljava/lang/Throwable; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class com/skydoves/landscapist/ImageLoadState$Loading : com/skydoves/landscapist/ImageLoadState { + public static final field $stable I + public static final field INSTANCE Lcom/skydoves/landscapist/ImageLoadState$Loading; + public fun equals (Ljava/lang/Object;)Z + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class com/skydoves/landscapist/ImageLoadState$None : com/skydoves/landscapist/ImageLoadState { + public static final field $stable I + public static final field INSTANCE Lcom/skydoves/landscapist/ImageLoadState$None; + public fun equals (Ljava/lang/Object;)Z + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class com/skydoves/landscapist/ImageLoadState$Success : com/skydoves/landscapist/ImageLoadState { + public static final field $stable I + public fun (Ljava/lang/Object;Lcom/skydoves/landscapist/DataSource;)V + public final fun component1 ()Ljava/lang/Object; + public final fun component2 ()Lcom/skydoves/landscapist/DataSource; + public final fun copy (Ljava/lang/Object;Lcom/skydoves/landscapist/DataSource;)Lcom/skydoves/landscapist/ImageLoadState$Success; + public static synthetic fun copy$default (Lcom/skydoves/landscapist/ImageLoadState$Success;Ljava/lang/Object;Lcom/skydoves/landscapist/DataSource;ILjava/lang/Object;)Lcom/skydoves/landscapist/ImageLoadState$Success; + public fun equals (Ljava/lang/Object;)Z + public final fun getData ()Ljava/lang/Object; + public final fun getDataSource ()Lcom/skydoves/landscapist/DataSource; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class com/skydoves/landscapist/ImageOptions { + public static final field $stable I + public static final field DEFAULT_IMAGE_SIZE I + public synthetic fun (Landroidx/compose/ui/Alignment;Ljava/lang/String;Landroidx/compose/ui/layout/ContentScale;Landroidx/compose/ui/graphics/ColorFilter;FJLjava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Landroidx/compose/ui/Alignment;Ljava/lang/String;Landroidx/compose/ui/layout/ContentScale;Landroidx/compose/ui/graphics/ColorFilter;FJLjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Landroidx/compose/ui/Alignment; + public final fun component2 ()Ljava/lang/String; + public final fun component3 ()Landroidx/compose/ui/layout/ContentScale; + public final fun component4 ()Landroidx/compose/ui/graphics/ColorFilter; + public final fun component5 ()F + public final fun component6-YbymL2g ()J + public final fun component7 ()Ljava/lang/String; + public final fun copy-WCgVKUs (Landroidx/compose/ui/Alignment;Ljava/lang/String;Landroidx/compose/ui/layout/ContentScale;Landroidx/compose/ui/graphics/ColorFilter;FJLjava/lang/String;)Lcom/skydoves/landscapist/ImageOptions; + public static synthetic fun copy-WCgVKUs$default (Lcom/skydoves/landscapist/ImageOptions;Landroidx/compose/ui/Alignment;Ljava/lang/String;Landroidx/compose/ui/layout/ContentScale;Landroidx/compose/ui/graphics/ColorFilter;FJLjava/lang/String;ILjava/lang/Object;)Lcom/skydoves/landscapist/ImageOptions; + public fun equals (Ljava/lang/Object;)Z + public final fun getAlignment ()Landroidx/compose/ui/Alignment; + public final fun getAlpha ()F + public final fun getColorFilter ()Landroidx/compose/ui/graphics/ColorFilter; + public final fun getContentDescription ()Ljava/lang/String; + public final fun getContentScale ()Landroidx/compose/ui/layout/ContentScale; + public final fun getRequestSize-YbymL2g ()J + public final fun getTestTag ()Ljava/lang/String; + public fun hashCode ()I + public final fun isValidSize ()Z + public fun toString ()Ljava/lang/String; +} + +public abstract interface class com/skydoves/landscapist/ImageState { +} + +public final class com/skydoves/landscapist/ImageWithSource { + public static final fun ImageBySource (Ljava/lang/Object;Landroidx/compose/ui/Modifier;Landroidx/compose/ui/Alignment;Landroidx/compose/ui/layout/ContentScale;Ljava/lang/String;Landroidx/compose/ui/graphics/ColorFilter;FLandroidx/compose/runtime/Composer;II)V +} + +public abstract interface annotation class com/skydoves/landscapist/InternalLandscapistApi : java/lang/annotation/Annotation { +} + +public final class com/skydoves/landscapist/LandscapistImageKt { + public static final fun LandscapistImage (Lcom/skydoves/landscapist/ImageOptions;Landroidx/compose/ui/Modifier;Landroidx/compose/ui/graphics/painter/Painter;Landroidx/compose/runtime/Composer;I)V +} + +public final class com/skydoves/landscapist/RememberDrawablePainterKt { + public static final fun rememberDrawablePainter (Landroid/graphics/drawable/Drawable;Ljava/util/List;Landroidx/compose/runtime/Composer;I)Landroidx/compose/ui/graphics/painter/Painter; +} + +public final class com/skydoves/landscapist/RememberPainterPluginsKt { + public static final fun rememberBitmapPainter (Ljava/util/List;Landroidx/compose/ui/graphics/ImageBitmap;Landroidx/compose/runtime/Composer;I)Landroidx/compose/ui/graphics/painter/Painter; +} + +public final class com/skydoves/landscapist/StableHolder { + public static final field $stable I + public fun (Ljava/lang/Object;)V + public final fun component1 ()Ljava/lang/Object; + public final fun copy (Ljava/lang/Object;)Lcom/skydoves/landscapist/StableHolder; + public static synthetic fun copy$default (Lcom/skydoves/landscapist/StableHolder;Ljava/lang/Object;ILjava/lang/Object;)Lcom/skydoves/landscapist/StableHolder; + public fun equals (Ljava/lang/Object;)Z + public final fun getValue ()Ljava/lang/Object; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public abstract interface class com/skydoves/landscapist/components/ImageComponent { +} + +public final class com/skydoves/landscapist/components/ImageComponentExtensionsKt { + public static final fun ComposeFailureStatePlugins (Lcom/skydoves/landscapist/components/ImageComponent;Landroidx/compose/ui/Modifier;Lcom/skydoves/landscapist/ImageOptions;Ljava/lang/Throwable;Landroidx/compose/runtime/Composer;I)V + public static final fun ComposeLoadingStatePlugins (Lcom/skydoves/landscapist/components/ImageComponent;Landroidx/compose/ui/Modifier;Lcom/skydoves/landscapist/ImageOptions;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;I)V + public static final fun ComposeSuccessStatePlugins (Lcom/skydoves/landscapist/components/ImageComponent;Landroidx/compose/ui/Modifier;Ljava/lang/Object;Lcom/skydoves/landscapist/ImageOptions;Landroidx/compose/ui/graphics/ImageBitmap;Landroidx/compose/runtime/Composer;I)V + public static final fun getImagePlugins (Lcom/skydoves/landscapist/components/ImageComponent;)Ljava/util/List; +} + +public final class com/skydoves/landscapist/components/ImagePluginComponent : com/skydoves/landscapist/components/ImageComponent { + public static final field $stable I + public fun ()V + public fun (Ljava/util/List;)V + public synthetic fun (Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun add (Lcom/skydoves/landscapist/plugins/ImagePlugin;)Lcom/skydoves/landscapist/components/ImagePluginComponent; + public final fun addPlugins (Ljava/util/List;)Lcom/skydoves/landscapist/components/ImagePluginComponent; + public final fun compose (Lkotlin/jvm/functions/Function1;)Lcom/skydoves/landscapist/components/ImagePluginComponent; + public final fun getMutablePlugins ()Ljava/util/List; + public final fun getPlugins ()Ljava/util/List; + public final fun remove (Lcom/skydoves/landscapist/plugins/ImagePlugin;)Lcom/skydoves/landscapist/components/ImagePluginComponent; + public final fun unaryPlus (Lcom/skydoves/landscapist/plugins/ImagePlugin;)Lcom/skydoves/landscapist/components/ImagePluginComponent; +} + +public final class com/skydoves/landscapist/components/ImagePluginComponentKt { + public static final fun imageComponent (Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;I)Lcom/skydoves/landscapist/components/ImagePluginComponent; +} + +public final class com/skydoves/landscapist/components/LocalImageComponentKt { + public static final fun getLocalImageComponent ()Landroidx/compose/runtime/ProvidableCompositionLocal; +} + +public final class com/skydoves/landscapist/components/RememberImageComponentKt { + public static final fun rememberImageComponent (Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;I)Lcom/skydoves/landscapist/components/ImagePluginComponent; +} + +public abstract interface class com/skydoves/landscapist/constraints/Constrainable { + public abstract fun setConstraints-BRTryo0 (J)V +} + +public final class com/skydoves/landscapist/constraints/ConstraintsExtensionsKt { + public static final fun constraint (Landroidx/compose/ui/Modifier;Landroidx/compose/foundation/layout/BoxWithConstraintsScope;)Landroidx/compose/ui/Modifier; +} + +public abstract interface class com/skydoves/landscapist/plugins/ImagePlugin { +} + +public abstract interface class com/skydoves/landscapist/plugins/ImagePlugin$FailureStatePlugin : com/skydoves/landscapist/plugins/ImagePlugin { + public abstract fun compose (Landroidx/compose/ui/Modifier;Lcom/skydoves/landscapist/ImageOptions;Ljava/lang/Throwable;Landroidx/compose/runtime/Composer;I)Lcom/skydoves/landscapist/plugins/ImagePlugin; +} + +public abstract interface class com/skydoves/landscapist/plugins/ImagePlugin$LoadingStatePlugin : com/skydoves/landscapist/plugins/ImagePlugin { + public abstract 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 abstract interface class com/skydoves/landscapist/plugins/ImagePlugin$PainterPlugin : com/skydoves/landscapist/plugins/ImagePlugin { + public abstract fun compose (Landroidx/compose/ui/graphics/ImageBitmap;Landroidx/compose/ui/graphics/painter/Painter;Landroidx/compose/runtime/Composer;I)Landroidx/compose/ui/graphics/painter/Painter; +} + +public abstract interface class com/skydoves/landscapist/plugins/ImagePlugin$SuccessStatePlugin : com/skydoves/landscapist/plugins/ImagePlugin { + public abstract fun compose (Landroidx/compose/ui/Modifier;Ljava/lang/Object;Lcom/skydoves/landscapist/ImageOptions;Landroidx/compose/ui/graphics/ImageBitmap;Landroidx/compose/runtime/Composer;I)Lcom/skydoves/landscapist/plugins/ImagePlugin; +} + diff --git a/landscapist/api/desktop/landscapist.api b/landscapist/api/desktop/landscapist.api new file mode 100644 index 00000000..4642cb78 --- /dev/null +++ b/landscapist/api/desktop/landscapist.api @@ -0,0 +1,183 @@ +public final class com/skydoves/landscapist/DataSource : java/lang/Enum { + public static final field DISK Lcom/skydoves/landscapist/DataSource; + public static final field MEMORY Lcom/skydoves/landscapist/DataSource; + public static final field NETWORK Lcom/skydoves/landscapist/DataSource; + public static final field UNKNOWN Lcom/skydoves/landscapist/DataSource; + public static fun getEntries ()Lkotlin/enums/EnumEntries; + public static fun valueOf (Ljava/lang/String;)Lcom/skydoves/landscapist/DataSource; + public static fun values ()[Lcom/skydoves/landscapist/DataSource; +} + +public final class com/skydoves/landscapist/ImageLoad { + public static final fun ImageLoad (Ljava/lang/Object;Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Modifier;Lcom/skydoves/landscapist/ImageOptions;Lcom/skydoves/landscapist/constraints/Constrainable;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V + public static final fun getZeroConstraints ()J +} + +public abstract class com/skydoves/landscapist/ImageLoadState { + public static final field $stable I +} + +public final class com/skydoves/landscapist/ImageLoadState$Failure : com/skydoves/landscapist/ImageLoadState { + public static final field $stable I + public fun (Ljava/lang/Object;Ljava/lang/Throwable;)V + public final fun component1 ()Ljava/lang/Object; + public final fun component2 ()Ljava/lang/Throwable; + public final fun copy (Ljava/lang/Object;Ljava/lang/Throwable;)Lcom/skydoves/landscapist/ImageLoadState$Failure; + public static synthetic fun copy$default (Lcom/skydoves/landscapist/ImageLoadState$Failure;Ljava/lang/Object;Ljava/lang/Throwable;ILjava/lang/Object;)Lcom/skydoves/landscapist/ImageLoadState$Failure; + public fun equals (Ljava/lang/Object;)Z + public final fun getData ()Ljava/lang/Object; + public final fun getReason ()Ljava/lang/Throwable; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class com/skydoves/landscapist/ImageLoadState$Loading : com/skydoves/landscapist/ImageLoadState { + public static final field $stable I + public static final field INSTANCE Lcom/skydoves/landscapist/ImageLoadState$Loading; + public fun equals (Ljava/lang/Object;)Z + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class com/skydoves/landscapist/ImageLoadState$None : com/skydoves/landscapist/ImageLoadState { + public static final field $stable I + public static final field INSTANCE Lcom/skydoves/landscapist/ImageLoadState$None; + public fun equals (Ljava/lang/Object;)Z + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class com/skydoves/landscapist/ImageLoadState$Success : com/skydoves/landscapist/ImageLoadState { + public static final field $stable I + public fun (Ljava/lang/Object;Lcom/skydoves/landscapist/DataSource;)V + public final fun component1 ()Ljava/lang/Object; + public final fun component2 ()Lcom/skydoves/landscapist/DataSource; + public final fun copy (Ljava/lang/Object;Lcom/skydoves/landscapist/DataSource;)Lcom/skydoves/landscapist/ImageLoadState$Success; + public static synthetic fun copy$default (Lcom/skydoves/landscapist/ImageLoadState$Success;Ljava/lang/Object;Lcom/skydoves/landscapist/DataSource;ILjava/lang/Object;)Lcom/skydoves/landscapist/ImageLoadState$Success; + public fun equals (Ljava/lang/Object;)Z + public final fun getData ()Ljava/lang/Object; + public final fun getDataSource ()Lcom/skydoves/landscapist/DataSource; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public final class com/skydoves/landscapist/ImageOptions { + public static final field $stable I + public static final field DEFAULT_IMAGE_SIZE I + public synthetic fun (Landroidx/compose/ui/Alignment;Ljava/lang/String;Landroidx/compose/ui/layout/ContentScale;Landroidx/compose/ui/graphics/ColorFilter;FJLjava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Landroidx/compose/ui/Alignment;Ljava/lang/String;Landroidx/compose/ui/layout/ContentScale;Landroidx/compose/ui/graphics/ColorFilter;FJLjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Landroidx/compose/ui/Alignment; + public final fun component2 ()Ljava/lang/String; + public final fun component3 ()Landroidx/compose/ui/layout/ContentScale; + public final fun component4 ()Landroidx/compose/ui/graphics/ColorFilter; + public final fun component5 ()F + public final fun component6-YbymL2g ()J + public final fun component7 ()Ljava/lang/String; + public final fun copy-WCgVKUs (Landroidx/compose/ui/Alignment;Ljava/lang/String;Landroidx/compose/ui/layout/ContentScale;Landroidx/compose/ui/graphics/ColorFilter;FJLjava/lang/String;)Lcom/skydoves/landscapist/ImageOptions; + public static synthetic fun copy-WCgVKUs$default (Lcom/skydoves/landscapist/ImageOptions;Landroidx/compose/ui/Alignment;Ljava/lang/String;Landroidx/compose/ui/layout/ContentScale;Landroidx/compose/ui/graphics/ColorFilter;FJLjava/lang/String;ILjava/lang/Object;)Lcom/skydoves/landscapist/ImageOptions; + public fun equals (Ljava/lang/Object;)Z + public final fun getAlignment ()Landroidx/compose/ui/Alignment; + public final fun getAlpha ()F + public final fun getColorFilter ()Landroidx/compose/ui/graphics/ColorFilter; + public final fun getContentDescription ()Ljava/lang/String; + public final fun getContentScale ()Landroidx/compose/ui/layout/ContentScale; + public final fun getRequestSize-YbymL2g ()J + public final fun getTestTag ()Ljava/lang/String; + public fun hashCode ()I + public final fun isValidSize ()Z + public fun toString ()Ljava/lang/String; +} + +public abstract interface class com/skydoves/landscapist/ImageState { +} + +public final class com/skydoves/landscapist/ImageWithSource { + public static final fun ImageBySource (Ljava/lang/Object;Landroidx/compose/ui/Modifier;Landroidx/compose/ui/Alignment;Landroidx/compose/ui/layout/ContentScale;Ljava/lang/String;Landroidx/compose/ui/graphics/ColorFilter;FLandroidx/compose/runtime/Composer;II)V +} + +public abstract interface annotation class com/skydoves/landscapist/InternalLandscapistApi : java/lang/annotation/Annotation { +} + +public final class com/skydoves/landscapist/LandscapistImageKt { + public static final fun LandscapistImage (Lcom/skydoves/landscapist/ImageOptions;Landroidx/compose/ui/Modifier;Landroidx/compose/ui/graphics/painter/Painter;Landroidx/compose/runtime/Composer;I)V +} + +public final class com/skydoves/landscapist/RememberPainterPluginsKt { + public static final fun rememberBitmapPainter (Ljava/util/List;Landroidx/compose/ui/graphics/ImageBitmap;Landroidx/compose/runtime/Composer;I)Landroidx/compose/ui/graphics/painter/Painter; +} + +public final class com/skydoves/landscapist/StableHolder { + public static final field $stable I + public fun (Ljava/lang/Object;)V + public final fun component1 ()Ljava/lang/Object; + public final fun copy (Ljava/lang/Object;)Lcom/skydoves/landscapist/StableHolder; + public static synthetic fun copy$default (Lcom/skydoves/landscapist/StableHolder;Ljava/lang/Object;ILjava/lang/Object;)Lcom/skydoves/landscapist/StableHolder; + public fun equals (Ljava/lang/Object;)Z + public final fun getValue ()Ljava/lang/Object; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public abstract interface class com/skydoves/landscapist/components/ImageComponent { +} + +public final class com/skydoves/landscapist/components/ImageComponentExtensionsKt { + public static final fun ComposeFailureStatePlugins (Lcom/skydoves/landscapist/components/ImageComponent;Landroidx/compose/ui/Modifier;Lcom/skydoves/landscapist/ImageOptions;Ljava/lang/Throwable;Landroidx/compose/runtime/Composer;I)V + public static final fun ComposeLoadingStatePlugins (Lcom/skydoves/landscapist/components/ImageComponent;Landroidx/compose/ui/Modifier;Lcom/skydoves/landscapist/ImageOptions;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;I)V + public static final fun ComposeSuccessStatePlugins (Lcom/skydoves/landscapist/components/ImageComponent;Landroidx/compose/ui/Modifier;Ljava/lang/Object;Lcom/skydoves/landscapist/ImageOptions;Landroidx/compose/ui/graphics/ImageBitmap;Landroidx/compose/runtime/Composer;I)V + public static final fun getImagePlugins (Lcom/skydoves/landscapist/components/ImageComponent;)Ljava/util/List; +} + +public final class com/skydoves/landscapist/components/ImagePluginComponent : com/skydoves/landscapist/components/ImageComponent { + public static final field $stable I + public fun ()V + public fun (Ljava/util/List;)V + public synthetic fun (Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun add (Lcom/skydoves/landscapist/plugins/ImagePlugin;)Lcom/skydoves/landscapist/components/ImagePluginComponent; + public final fun addPlugins (Ljava/util/List;)Lcom/skydoves/landscapist/components/ImagePluginComponent; + public final fun compose (Lkotlin/jvm/functions/Function1;)Lcom/skydoves/landscapist/components/ImagePluginComponent; + public final fun getMutablePlugins ()Ljava/util/List; + public final fun getPlugins ()Ljava/util/List; + public final fun remove (Lcom/skydoves/landscapist/plugins/ImagePlugin;)Lcom/skydoves/landscapist/components/ImagePluginComponent; + public final fun unaryPlus (Lcom/skydoves/landscapist/plugins/ImagePlugin;)Lcom/skydoves/landscapist/components/ImagePluginComponent; +} + +public final class com/skydoves/landscapist/components/ImagePluginComponentKt { + public static final fun imageComponent (Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;I)Lcom/skydoves/landscapist/components/ImagePluginComponent; +} + +public final class com/skydoves/landscapist/components/LocalImageComponentKt { + public static final fun getLocalImageComponent ()Landroidx/compose/runtime/ProvidableCompositionLocal; +} + +public final class com/skydoves/landscapist/components/RememberImageComponentKt { + public static final fun rememberImageComponent (Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;I)Lcom/skydoves/landscapist/components/ImagePluginComponent; +} + +public abstract interface class com/skydoves/landscapist/constraints/Constrainable { + public abstract fun setConstraints-BRTryo0 (J)V +} + +public final class com/skydoves/landscapist/constraints/ConstraintsExtensionsKt { + public static final fun constraint (Landroidx/compose/ui/Modifier;Landroidx/compose/foundation/layout/BoxWithConstraintsScope;)Landroidx/compose/ui/Modifier; +} + +public abstract interface class com/skydoves/landscapist/plugins/ImagePlugin { +} + +public abstract interface class com/skydoves/landscapist/plugins/ImagePlugin$FailureStatePlugin : com/skydoves/landscapist/plugins/ImagePlugin { + public abstract fun compose (Landroidx/compose/ui/Modifier;Lcom/skydoves/landscapist/ImageOptions;Ljava/lang/Throwable;Landroidx/compose/runtime/Composer;I)Lcom/skydoves/landscapist/plugins/ImagePlugin; +} + +public abstract interface class com/skydoves/landscapist/plugins/ImagePlugin$LoadingStatePlugin : com/skydoves/landscapist/plugins/ImagePlugin { + public abstract 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 abstract interface class com/skydoves/landscapist/plugins/ImagePlugin$PainterPlugin : com/skydoves/landscapist/plugins/ImagePlugin { + public abstract fun compose (Landroidx/compose/ui/graphics/ImageBitmap;Landroidx/compose/ui/graphics/painter/Painter;Landroidx/compose/runtime/Composer;I)Landroidx/compose/ui/graphics/painter/Painter; +} + +public abstract interface class com/skydoves/landscapist/plugins/ImagePlugin$SuccessStatePlugin : com/skydoves/landscapist/plugins/ImagePlugin { + public abstract fun compose (Landroidx/compose/ui/Modifier;Ljava/lang/Object;Lcom/skydoves/landscapist/ImageOptions;Landroidx/compose/ui/graphics/ImageBitmap;Landroidx/compose/runtime/Composer;I)Lcom/skydoves/landscapist/plugins/ImagePlugin; +} + diff --git a/landscapist/build.gradle.kts b/landscapist/build.gradle.kts index a266f65d..6cadcf04 100644 --- a/landscapist/build.gradle.kts +++ b/landscapist/build.gradle.kts @@ -17,7 +17,7 @@ import com.github.skydoves.landscapist.Configuration plugins { - id("landscapist.library.compose") + id("landscapist.library.compose.multiplatform") id("landscapist.spotless") } @@ -36,6 +36,30 @@ mavenPublishing { } } +kotlin { + sourceSets { + all { + languageSettings.optIn("kotlin.RequiresOptIn") + languageSettings.optIn("kotlinx.coroutines.ExperimentalCoroutinesApi") + languageSettings.optIn("com.skydoves.landscapist.InternalLandscapistApi") + } + val commonMain by getting { + dependencies { + implementation(compose.ui) + implementation(compose.runtime) + implementation(compose.foundation) + implementation(libs.kotlinx.coroutines.core) + } + } + + val androidMain by getting { + dependencies { + implementation(libs.androidx.core.ktx) + } + } + } +} + android { namespace = "com.skydoves.landscapist" compileSdk = Configuration.compileSdk @@ -59,10 +83,14 @@ baselineProfile { } } -dependencies { - implementation(libs.androidx.core.ktx) - implementation(libs.androidx.compose.ui) - implementation(libs.androidx.compose.runtime) - implementation(libs.androidx.compose.foundation) - implementation(libs.kotlinx.coroutines.core) +tasks.withType { + kotlinOptions { + jvmTarget = "1.8" + freeCompilerArgs += listOf( + "-Xexplicit-api=strict", + "-opt-in=kotlin.RequiresOptIn", + "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi", + "-opt-in=com.skydoves.landscapist.InternalLandscapistApi", + ) + } } diff --git a/landscapist/src/main/AndroidManifest.xml b/landscapist/src/androidMain/AndroidManifest.xml similarity index 100% rename from landscapist/src/main/AndroidManifest.xml rename to landscapist/src/androidMain/AndroidManifest.xml diff --git a/landscapist/src/main/baseline-prof.txt b/landscapist/src/androidMain/baseline-prof.txt similarity index 100% rename from landscapist/src/main/baseline-prof.txt rename to landscapist/src/androidMain/baseline-prof.txt diff --git a/landscapist/src/main/kotlin/com/skydoves/landscapist/DrawablePainter.kt b/landscapist/src/androidMain/kotlin/com/skydoves/landscapist/DrawablePainter.kt similarity index 99% rename from landscapist/src/main/kotlin/com/skydoves/landscapist/DrawablePainter.kt rename to landscapist/src/androidMain/kotlin/com/skydoves/landscapist/DrawablePainter.kt index cc8b1c97..abc63a3a 100644 --- a/landscapist/src/main/kotlin/com/skydoves/landscapist/DrawablePainter.kt +++ b/landscapist/src/androidMain/kotlin/com/skydoves/landscapist/DrawablePainter.kt @@ -151,6 +151,7 @@ private val Drawable.intrinsicSize: Size intrinsicWidth >= 0 && intrinsicHeight >= 0 -> { Size(width = intrinsicWidth.toFloat(), height = intrinsicHeight.toFloat()) } + else -> Size.Unspecified } diff --git a/landscapist/src/main/kotlin/com/skydoves/landscapist/RememberPainterPlugins.kt b/landscapist/src/androidMain/kotlin/com/skydoves/landscapist/RememberDrawablePainter.kt similarity index 80% rename from landscapist/src/main/kotlin/com/skydoves/landscapist/RememberPainterPlugins.kt rename to landscapist/src/androidMain/kotlin/com/skydoves/landscapist/RememberDrawablePainter.kt index ee518804..c6b8ef0f 100644 --- a/landscapist/src/main/kotlin/com/skydoves/landscapist/RememberPainterPlugins.kt +++ b/landscapist/src/androidMain/kotlin/com/skydoves/landscapist/RememberDrawablePainter.kt @@ -21,7 +21,6 @@ import android.graphics.drawable.Drawable import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.ImageBitmap import androidx.compose.ui.graphics.asImageBitmap import androidx.compose.ui.graphics.painter.BitmapPainter import androidx.compose.ui.graphics.painter.ColorPainter @@ -60,18 +59,3 @@ public fun rememberDrawablePainter( imagePlugins = imagePlugins, imageBitmap = drawable.toBitmap().asImageBitmap(), ) - -/** - * Remembers [ImageBitmap] wrapped up as a [Painter] with a given the list of [ImagePlugin]. - * - * @param imageBitmap An [ImageBitmap] to be drawn. - * @param imagePlugins A list of [ImagePlugin] that will be applied to the drawable painter. - */ -@Composable -@InternalLandscapistApi -public fun rememberBitmapPainter( - imagePlugins: List, - imageBitmap: ImageBitmap, -): Painter = remember(imageBitmap, imagePlugins) { - BitmapPainter(imageBitmap) -}.composePainterPlugins(imagePlugins = imagePlugins, imageBitmap = imageBitmap) diff --git a/landscapist/src/main/kotlin/com/skydoves/landscapist/DataSource.kt b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/DataSource.kt similarity index 100% rename from landscapist/src/main/kotlin/com/skydoves/landscapist/DataSource.kt rename to landscapist/src/commonMain/kotlin/com/skydoves/landscapist/DataSource.kt diff --git a/landscapist/src/main/kotlin/com/skydoves/landscapist/ImageBySource.kt b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/ImageBySource.kt similarity index 100% rename from landscapist/src/main/kotlin/com/skydoves/landscapist/ImageBySource.kt rename to landscapist/src/commonMain/kotlin/com/skydoves/landscapist/ImageBySource.kt diff --git a/landscapist/src/main/kotlin/com/skydoves/landscapist/ImageLoad.kt b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/ImageLoad.kt similarity index 100% rename from landscapist/src/main/kotlin/com/skydoves/landscapist/ImageLoad.kt rename to landscapist/src/commonMain/kotlin/com/skydoves/landscapist/ImageLoad.kt diff --git a/landscapist/src/main/kotlin/com/skydoves/landscapist/ImageLoadState.kt b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/ImageLoadState.kt similarity index 100% rename from landscapist/src/main/kotlin/com/skydoves/landscapist/ImageLoadState.kt rename to landscapist/src/commonMain/kotlin/com/skydoves/landscapist/ImageLoadState.kt diff --git a/landscapist/src/main/kotlin/com/skydoves/landscapist/ImageOptions.kt b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/ImageOptions.kt similarity index 100% rename from landscapist/src/main/kotlin/com/skydoves/landscapist/ImageOptions.kt rename to landscapist/src/commonMain/kotlin/com/skydoves/landscapist/ImageOptions.kt diff --git a/landscapist/src/main/kotlin/com/skydoves/landscapist/ImageSemantics.kt b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/ImageSemantics.kt similarity index 100% rename from landscapist/src/main/kotlin/com/skydoves/landscapist/ImageSemantics.kt rename to landscapist/src/commonMain/kotlin/com/skydoves/landscapist/ImageSemantics.kt diff --git a/landscapist/src/main/kotlin/com/skydoves/landscapist/ImageState.kt b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/ImageState.kt similarity index 100% rename from landscapist/src/main/kotlin/com/skydoves/landscapist/ImageState.kt rename to landscapist/src/commonMain/kotlin/com/skydoves/landscapist/ImageState.kt diff --git a/landscapist/src/main/kotlin/com/skydoves/landscapist/InternalLandscapistApi.kt b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/InternalLandscapistApi.kt similarity index 100% rename from landscapist/src/main/kotlin/com/skydoves/landscapist/InternalLandscapistApi.kt rename to landscapist/src/commonMain/kotlin/com/skydoves/landscapist/InternalLandscapistApi.kt diff --git a/landscapist/src/main/kotlin/com/skydoves/landscapist/LandscapistImage.kt b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/LandscapistImage.kt similarity index 100% rename from landscapist/src/main/kotlin/com/skydoves/landscapist/LandscapistImage.kt rename to landscapist/src/commonMain/kotlin/com/skydoves/landscapist/LandscapistImage.kt diff --git a/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/RememberPainterPlugins.kt b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/RememberPainterPlugins.kt new file mode 100644 index 00000000..d5ddeed4 --- /dev/null +++ b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/RememberPainterPlugins.kt @@ -0,0 +1,39 @@ +/* + * Designed and developed by 2020-2023 skydoves (Jaewoong Eum) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.skydoves.landscapist + +import androidx.compose.runtime.Composable +import androidx.compose.runtime.remember +import androidx.compose.ui.graphics.ImageBitmap +import androidx.compose.ui.graphics.painter.BitmapPainter +import androidx.compose.ui.graphics.painter.Painter +import com.skydoves.landscapist.plugins.ImagePlugin +import com.skydoves.landscapist.plugins.composePainterPlugins + +/** + * Remembers [ImageBitmap] wrapped up as a [Painter] with a given the list of [ImagePlugin]. + * + * @param imageBitmap An [ImageBitmap] to be drawn. + * @param imagePlugins A list of [ImagePlugin] that will be applied to the drawable painter. + */ +@Composable +@InternalLandscapistApi +public fun rememberBitmapPainter( + imagePlugins: List, + imageBitmap: ImageBitmap, +): Painter = remember(imageBitmap, imagePlugins) { + BitmapPainter(imageBitmap) +}.composePainterPlugins(imagePlugins = imagePlugins, imageBitmap = imageBitmap) diff --git a/landscapist/src/main/kotlin/com/skydoves/landscapist/StableHolder.kt b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/StableHolder.kt similarity index 100% rename from landscapist/src/main/kotlin/com/skydoves/landscapist/StableHolder.kt rename to landscapist/src/commonMain/kotlin/com/skydoves/landscapist/StableHolder.kt diff --git a/landscapist/src/main/kotlin/com/skydoves/landscapist/components/ImageComponent.kt b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/components/ImageComponent.kt similarity index 100% rename from landscapist/src/main/kotlin/com/skydoves/landscapist/components/ImageComponent.kt rename to landscapist/src/commonMain/kotlin/com/skydoves/landscapist/components/ImageComponent.kt diff --git a/landscapist/src/main/kotlin/com/skydoves/landscapist/components/ImageComponentExtensions.kt b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/components/ImageComponentExtensions.kt similarity index 100% rename from landscapist/src/main/kotlin/com/skydoves/landscapist/components/ImageComponentExtensions.kt rename to landscapist/src/commonMain/kotlin/com/skydoves/landscapist/components/ImageComponentExtensions.kt diff --git a/landscapist/src/main/kotlin/com/skydoves/landscapist/components/ImagePluginComponent.kt b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/components/ImagePluginComponent.kt similarity index 100% rename from landscapist/src/main/kotlin/com/skydoves/landscapist/components/ImagePluginComponent.kt rename to landscapist/src/commonMain/kotlin/com/skydoves/landscapist/components/ImagePluginComponent.kt diff --git a/landscapist/src/main/kotlin/com/skydoves/landscapist/components/LocalImageComponent.kt b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/components/LocalImageComponent.kt similarity index 100% rename from landscapist/src/main/kotlin/com/skydoves/landscapist/components/LocalImageComponent.kt rename to landscapist/src/commonMain/kotlin/com/skydoves/landscapist/components/LocalImageComponent.kt diff --git a/landscapist/src/main/kotlin/com/skydoves/landscapist/components/RememberImageComponent.kt b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/components/RememberImageComponent.kt similarity index 100% rename from landscapist/src/main/kotlin/com/skydoves/landscapist/components/RememberImageComponent.kt rename to landscapist/src/commonMain/kotlin/com/skydoves/landscapist/components/RememberImageComponent.kt diff --git a/landscapist/src/main/kotlin/com/skydoves/landscapist/constraints/Constrainable.kt b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/constraints/Constrainable.kt similarity index 100% rename from landscapist/src/main/kotlin/com/skydoves/landscapist/constraints/Constrainable.kt rename to landscapist/src/commonMain/kotlin/com/skydoves/landscapist/constraints/Constrainable.kt diff --git a/landscapist/src/main/kotlin/com/skydoves/landscapist/constraints/ConstraintsExtensions.kt b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/constraints/ConstraintsExtensions.kt similarity index 100% rename from landscapist/src/main/kotlin/com/skydoves/landscapist/constraints/ConstraintsExtensions.kt rename to landscapist/src/commonMain/kotlin/com/skydoves/landscapist/constraints/ConstraintsExtensions.kt diff --git a/landscapist/src/main/kotlin/com/skydoves/landscapist/plugins/ImagePlugin.kt b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/plugins/ImagePlugin.kt similarity index 100% rename from landscapist/src/main/kotlin/com/skydoves/landscapist/plugins/ImagePlugin.kt rename to landscapist/src/commonMain/kotlin/com/skydoves/landscapist/plugins/ImagePlugin.kt From 9d99c7e8a5d4ad1d45857d1d2b758403699d8c01 Mon Sep 17 00:00:00 2001 From: skydoves Date: Sun, 31 Dec 2023 12:32:26 +0900 Subject: [PATCH 4/9] Use macos instead of the ubuntu for running workflows --- .github/workflows/android.yml | 6 +++--- .github/workflows/publish-docs.yml | 2 +- .github/workflows/publish-snapshot.yml | 2 +- .github/workflows/publish.yml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index ffc1b0d7..56545aaa 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -9,7 +9,7 @@ on: jobs: lint: name: Spotless check - runs-on: ubuntu-latest + runs-on: macos-latest steps: - name: Check out code uses: actions/checkout@v4.1.1 @@ -23,7 +23,7 @@ jobs: api_check: name: API check - runs-on: ubuntu-latest + runs-on: macos-latest steps: - name: Check out code uses: actions/checkout@v4.1.1 @@ -37,7 +37,7 @@ jobs: build: name: Build and Tests - runs-on: ubuntu-latest + runs-on: macos-latest steps: - uses: actions/checkout@v4.1.1 diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index ae794441..550a5ba0 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -9,7 +9,7 @@ permissions: jobs: deploy: - runs-on: ubuntu-latest + runs-on: macos-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml index 8ea64975..de26c894 100644 --- a/.github/workflows/publish-snapshot.yml +++ b/.github/workflows/publish-snapshot.yml @@ -9,7 +9,7 @@ on: jobs: publish: name: Snapshot build and publish - runs-on: ubuntu-latest + runs-on: macos-latest steps: - name: Check out code uses: actions/checkout@v4.1.1 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 41d9c6b5..1d0d2e55 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,7 +8,7 @@ on: jobs: publish: name: Release build and publish - runs-on: ubuntu-latest + runs-on: macos-latest steps: - name: Check out code uses: actions/checkout@v4.1.1 From 5fe48a68d28d81f5ac8b9f29fc3a748ffae0f635 Mon Sep 17 00:00:00 2001 From: skydoves Date: Sun, 31 Dec 2023 12:37:35 +0900 Subject: [PATCH 5/9] Add jetbrains maven central url --- settings.gradle.kts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/settings.gradle.kts b/settings.gradle.kts index d23da95a..f4ff7d4f 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -7,6 +7,7 @@ pluginManagement { gradlePluginPortal() mavenCentral() maven(url = "https://plugins.gradle.org/m2/") + maven(url = "https://maven.pkg.jetbrains.space/public/p/compose/dev") } } dependencyResolutionManagement { @@ -15,6 +16,7 @@ dependencyResolutionManagement { google() mavenCentral() maven(url = "https://plugins.gradle.org/m2/") + maven(url = "https://maven.pkg.jetbrains.space/public/p/compose/dev") } } From 1c11736e7e452355b1f754dc447783dab07e956f Mon Sep 17 00:00:00 2001 From: skydoves Date: Sun, 31 Dec 2023 13:35:42 +0900 Subject: [PATCH 6/9] Update repository mode to PREFER_PROJECT --- settings.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/settings.gradle.kts b/settings.gradle.kts index f4ff7d4f..0915f791 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -11,7 +11,7 @@ pluginManagement { } } dependencyResolutionManagement { - repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositoriesMode.set(RepositoriesMode.PREFER_PROJECT) repositories { google() mavenCentral() From 5f2ecc76221c838b3cf980ec41addc77ef0cf871 Mon Sep 17 00:00:00 2001 From: skydoves Date: Sun, 31 Dec 2023 14:02:56 +0900 Subject: [PATCH 7/9] Remove nodejs --- .../main/kotlin/com/skydoves/landscapist/ComposeMultiplatform.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/build-logic/convention/src/main/kotlin/com/skydoves/landscapist/ComposeMultiplatform.kt b/build-logic/convention/src/main/kotlin/com/skydoves/landscapist/ComposeMultiplatform.kt index 9400cb7b..6716f535 100644 --- a/build-logic/convention/src/main/kotlin/com/skydoves/landscapist/ComposeMultiplatform.kt +++ b/build-logic/convention/src/main/kotlin/com/skydoves/landscapist/ComposeMultiplatform.kt @@ -45,7 +45,6 @@ internal fun Project.configureComposeMultiplatform( macosArm64() js(IR) { browser() - nodejs() } @Suppress("OPT_IN_USAGE") applyHierarchyTemplate { From 0a7f128ad7a2009f21aecbd76555f205261e8d42 Mon Sep 17 00:00:00 2001 From: skydoves Date: Sun, 31 Dec 2023 14:33:47 +0900 Subject: [PATCH 8/9] Remove js and address unresolved issues --- .../kotlin/com/skydoves/landscapist/ComposeMultiplatform.kt | 4 +--- .../kotlin/com/skydoves/landscapist/ImageBySource.kt | 6 +++--- .../commonMain/kotlin/com/skydoves/landscapist/ImageLoad.kt | 4 +--- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/build-logic/convention/src/main/kotlin/com/skydoves/landscapist/ComposeMultiplatform.kt b/build-logic/convention/src/main/kotlin/com/skydoves/landscapist/ComposeMultiplatform.kt index 6716f535..c05f34fe 100644 --- a/build-logic/convention/src/main/kotlin/com/skydoves/landscapist/ComposeMultiplatform.kt +++ b/build-logic/convention/src/main/kotlin/com/skydoves/landscapist/ComposeMultiplatform.kt @@ -43,9 +43,7 @@ internal fun Project.configureComposeMultiplatform( iosSimulatorArm64() macosX64() macosArm64() - js(IR) { - browser() - } + @Suppress("OPT_IN_USAGE") applyHierarchyTemplate { common { diff --git a/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/ImageBySource.kt b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/ImageBySource.kt index 4d101ac5..8202147d 100644 --- a/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/ImageBySource.kt +++ b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/ImageBySource.kt @@ -13,9 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@file:JvmName("ImageWithSource") -@file:JvmMultifileClass - package com.skydoves.landscapist import androidx.compose.foundation.Image @@ -62,6 +59,7 @@ public fun ImageBySource( alpha = alpha, ) } + is ImageVector -> { Image( imageVector = source, @@ -73,6 +71,7 @@ public fun ImageBySource( alpha = alpha, ) } + is Painter -> { Image( painter = source, @@ -84,6 +83,7 @@ public fun ImageBySource( alpha = alpha, ) } + else -> { throw IllegalArgumentException( "Wrong source was used: $source, " + diff --git a/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/ImageLoad.kt b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/ImageLoad.kt index d3bf55e7..6622f57b 100644 --- a/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/ImageLoad.kt +++ b/landscapist/src/commonMain/kotlin/com/skydoves/landscapist/ImageLoad.kt @@ -13,9 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -@file:JvmName("ImageLoad") -@file:JvmMultifileClass - package com.skydoves.landscapist import androidx.compose.foundation.layout.BoxWithConstraints @@ -30,6 +27,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.unit.Constraints import com.skydoves.landscapist.constraints.Constrainable import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.IO import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.catch import kotlinx.coroutines.flow.distinctUntilChanged From e72231edb2b26b618ec018ee06db4c86dbd751c5 Mon Sep 17 00:00:00 2001 From: skydoves Date: Sun, 31 Dec 2023 16:13:49 +0900 Subject: [PATCH 9/9] Update api validations --- landscapist/api/android/landscapist.api | 10 +++++----- landscapist/api/desktop/landscapist.api | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/landscapist/api/android/landscapist.api b/landscapist/api/android/landscapist.api index f6c4fd27..07a2018d 100644 --- a/landscapist/api/android/landscapist.api +++ b/landscapist/api/android/landscapist.api @@ -12,7 +12,11 @@ public final class com/skydoves/landscapist/DrawablePainterKt { public static final fun rememberDrawablePainter (Landroid/graphics/drawable/Drawable;Landroidx/compose/runtime/Composer;I)Landroidx/compose/ui/graphics/painter/Painter; } -public final class com/skydoves/landscapist/ImageLoad { +public final class com/skydoves/landscapist/ImageBySourceKt { + public static final fun ImageBySource (Ljava/lang/Object;Landroidx/compose/ui/Modifier;Landroidx/compose/ui/Alignment;Landroidx/compose/ui/layout/ContentScale;Ljava/lang/String;Landroidx/compose/ui/graphics/ColorFilter;FLandroidx/compose/runtime/Composer;II)V +} + +public final class com/skydoves/landscapist/ImageLoadKt { public static final fun ImageLoad (Ljava/lang/Object;Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Modifier;Lcom/skydoves/landscapist/ImageOptions;Lcom/skydoves/landscapist/constraints/Constrainable;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V public static final fun getZeroConstraints ()J } @@ -95,10 +99,6 @@ public final class com/skydoves/landscapist/ImageOptions { public abstract interface class com/skydoves/landscapist/ImageState { } -public final class com/skydoves/landscapist/ImageWithSource { - public static final fun ImageBySource (Ljava/lang/Object;Landroidx/compose/ui/Modifier;Landroidx/compose/ui/Alignment;Landroidx/compose/ui/layout/ContentScale;Ljava/lang/String;Landroidx/compose/ui/graphics/ColorFilter;FLandroidx/compose/runtime/Composer;II)V -} - public abstract interface annotation class com/skydoves/landscapist/InternalLandscapistApi : java/lang/annotation/Annotation { } diff --git a/landscapist/api/desktop/landscapist.api b/landscapist/api/desktop/landscapist.api index 4642cb78..c5ea6526 100644 --- a/landscapist/api/desktop/landscapist.api +++ b/landscapist/api/desktop/landscapist.api @@ -8,7 +8,11 @@ public final class com/skydoves/landscapist/DataSource : java/lang/Enum { public static fun values ()[Lcom/skydoves/landscapist/DataSource; } -public final class com/skydoves/landscapist/ImageLoad { +public final class com/skydoves/landscapist/ImageBySourceKt { + public static final fun ImageBySource (Ljava/lang/Object;Landroidx/compose/ui/Modifier;Landroidx/compose/ui/Alignment;Landroidx/compose/ui/layout/ContentScale;Ljava/lang/String;Landroidx/compose/ui/graphics/ColorFilter;FLandroidx/compose/runtime/Composer;II)V +} + +public final class com/skydoves/landscapist/ImageLoadKt { public static final fun ImageLoad (Ljava/lang/Object;Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Modifier;Lcom/skydoves/landscapist/ImageOptions;Lcom/skydoves/landscapist/constraints/Constrainable;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V public static final fun getZeroConstraints ()J } @@ -91,10 +95,6 @@ public final class com/skydoves/landscapist/ImageOptions { public abstract interface class com/skydoves/landscapist/ImageState { } -public final class com/skydoves/landscapist/ImageWithSource { - public static final fun ImageBySource (Ljava/lang/Object;Landroidx/compose/ui/Modifier;Landroidx/compose/ui/Alignment;Landroidx/compose/ui/layout/ContentScale;Ljava/lang/String;Landroidx/compose/ui/graphics/ColorFilter;FLandroidx/compose/runtime/Composer;II)V -} - public abstract interface annotation class com/skydoves/landscapist/InternalLandscapistApi : java/lang/annotation/Annotation { }