Skip to content

Commit

Permalink
Merge pull request #432 from skydoves/palette/3.1.0
Browse files Browse the repository at this point in the history
Migrate kmp palette to 3.1.0
  • Loading branch information
skydoves authored Feb 12, 2024
2 parents 3f002fc + 90cdc8c commit 6d08456
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.palette.graphics.Palette
import com.github.skydoves.landscapistdemo.R
import com.github.skydoves.landscapistdemo.model.MockUtil
import com.github.skydoves.landscapistdemo.model.Poster
import com.github.skydoves.landscapistdemo.theme.DisneyComposeTheme
import com.github.skydoves.landscapistdemo.theme.background
import com.kmpalette.palette.graphics.Palette
import com.skydoves.landscapist.ImageOptions
import com.skydoves.landscapist.animation.circular.CircularRevealPlugin
import com.skydoves.landscapist.animation.crossfade.CrossfadePlugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package com.github.skydoves.landscapistdemo.ui

import androidx.palette.graphics.Palette
import com.kmpalette.palette.graphics.Palette

fun Palette?.paletteColorList(): List<Int> {
return listOf(
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fresco = "3.1.3"
coil = "2.5.0"
coil3 = "3.0.0-alpha04"
ktor = "2.3.8"
palette = "2.2.0"
palette = "3.1.0"
hilt = "2.50"
spotless = "6.21.0"

Expand Down
6 changes: 3 additions & 3 deletions landscapist-palette/api/android/landscapist-palette.api
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
public abstract interface class com/skydoves/landscapist/palette/PaletteBuilderInterceptor {
public abstract fun intercept (Landroidx/palette/graphics/Palette$Builder;)Landroidx/palette/graphics/Palette$Builder;
public abstract fun intercept (Lcom/kmpalette/palette/graphics/Palette$Builder;)Lcom/kmpalette/palette/graphics/Palette$Builder;
}

public abstract interface class com/skydoves/landscapist/palette/PaletteLoadedListener {
public abstract fun onPaletteLoaded (Landroidx/palette/graphics/Palette;)V
public abstract fun onPaletteLoaded (Lcom/kmpalette/palette/graphics/Palette;)V
}

public final class com/skydoves/landscapist/palette/PalettePlugin : com/skydoves/landscapist/plugins/ImagePlugin$SuccessStatePlugin {
Expand All @@ -20,6 +20,6 @@ public final class com/skydoves/landscapist/palette/PalettePlugin : com/skydoves
}

public final class com/skydoves/landscapist/palette/RememberPaletteStateKt {
public static final fun rememberPaletteState (Landroidx/palette/graphics/Palette;Landroidx/compose/runtime/SnapshotMutationPolicy;Landroidx/compose/runtime/Composer;II)Landroidx/compose/runtime/MutableState;
public static final fun rememberPaletteState (Lcom/kmpalette/palette/graphics/Palette;Landroidx/compose/runtime/SnapshotMutationPolicy;Landroidx/compose/runtime/Composer;II)Landroidx/compose/runtime/MutableState;
}

6 changes: 3 additions & 3 deletions landscapist-palette/api/desktop/landscapist-palette.api
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
public abstract interface class com/skydoves/landscapist/palette/PaletteBuilderInterceptor {
public abstract fun intercept (Landroidx/palette/graphics/Palette$Builder;)Landroidx/palette/graphics/Palette$Builder;
public abstract fun intercept (Lcom/kmpalette/palette/graphics/Palette$Builder;)Lcom/kmpalette/palette/graphics/Palette$Builder;
}

public abstract interface class com/skydoves/landscapist/palette/PaletteLoadedListener {
public abstract fun onPaletteLoaded (Landroidx/palette/graphics/Palette;)V
public abstract fun onPaletteLoaded (Lcom/kmpalette/palette/graphics/Palette;)V
}

public final class com/skydoves/landscapist/palette/PalettePlugin : com/skydoves/landscapist/plugins/ImagePlugin$SuccessStatePlugin {
Expand All @@ -20,6 +20,6 @@ public final class com/skydoves/landscapist/palette/PalettePlugin : com/skydoves
}

public final class com/skydoves/landscapist/palette/RememberPaletteStateKt {
public static final fun rememberPaletteState (Landroidx/palette/graphics/Palette;Landroidx/compose/runtime/SnapshotMutationPolicy;Landroidx/compose/runtime/Composer;II)Landroidx/compose/runtime/MutableState;
public static final fun rememberPaletteState (Lcom/kmpalette/palette/graphics/Palette;Landroidx/compose/runtime/SnapshotMutationPolicy;Landroidx/compose/runtime/Composer;II)Landroidx/compose/runtime/MutableState;
}

2 changes: 1 addition & 1 deletion landscapist-palette/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ android {
compileSdk = Configuration.compileSdk

defaultConfig {
minSdk = Configuration.minSdk24
minSdk = Configuration.minSdk
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package com.skydoves.landscapist.palette
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.ui.graphics.ImageBitmap
import androidx.palette.graphics.Palette
import com.kmpalette.rememberPaletteState

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package com.skydoves.landscapist.palette

import androidx.palette.graphics.Palette
import com.kmpalette.palette.graphics.Palette

/** A definition for intercepting [Palette.Builder] before loading. */
public fun interface PaletteBuilderInterceptor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package com.skydoves.landscapist.palette

import androidx.palette.graphics.Palette
import com.kmpalette.palette.graphics.Palette

/** A definition for listening to the palette loaded. */
public fun interface PaletteLoadedListener {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import androidx.compose.runtime.SnapshotMutationPolicy
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.structuralEqualityPolicy
import androidx.palette.graphics.Palette
import com.kmpalette.palette.graphics.Palette

/**
* Create a mutable state and remember the new instance of [Palette] that is wrapped by [MutableState]
Expand Down

0 comments on commit 6d08456

Please sign in to comment.