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

Update to coil 3.0.0-alpha01. #1756

Merged
merged 1 commit into from
Jan 2, 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
9 changes: 6 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ androidx-compose-ui = "1.5.4"
jbCompose = "1.5.11"
lint = "31.2.0"
zipline = "1.7.0"
coil = "2.5.0"
coil = "3.0.0-alpha01"
okio = "3.7.0"
ktor = "2.3.7"

[libraries]
kotlin-compiler = { module = "org.jetbrains.kotlin:kotlin-compiler", version.ref = "kotlin" }
Expand Down Expand Up @@ -75,8 +76,10 @@ zipline-gradlePlugin = { module = "app.cash.zipline:zipline-gradle-plugin", vers
zipline-loader = { module = "app.cash.zipline:zipline-loader", version.ref = "zipline" }
paparazzi-gradlePlugin = { module = "app.cash.paparazzi:paparazzi-gradle-plugin", version = "1.3.1" }
jimfs = "com.google.jimfs:jimfs:1.3.0"
coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" }
coil-core = { module = "io.coil-kt:coil", version.ref = "coil" }
coil-compose = { module = "io.coil-kt.coil3:coil-compose", version.ref = "coil" }
coil-core = { module = "io.coil-kt.coil3:coil", version.ref = "coil" }
coil-network = { module = "io.coil-kt.coil3:coil-network", version.ref = "coil" }
ktor-engine-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" }
turbine = "app.cash.turbine:turbine:1.0.0"
ktlint = "com.pinterest.ktlint:ktlint-cli:1.1.0"
googleJavaFormat = "com.google.googlejavaformat:google-java-format:1.19.1"
Expand Down
2 changes: 2 additions & 0 deletions samples/emoji-search/android-composeui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ android {

dependencies {
implementation libs.coil.compose
implementation libs.coil.network
implementation libs.ktor.engine.okhttp
implementation libs.google.material
implementation libs.kotlinx.coroutines.android
implementation projects.samples.emojiSearch.launcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
android:name=".EmojiSearchApplication"
android:allowBackup="false"
android:exported="true"
android:icon="@mipmap/ic_launcher"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import app.cash.redwood.Modifier as RedwoodModifier
import coil.compose.AsyncImage
import coil3.compose.AsyncImage
import com.example.redwood.emojisearch.widget.Image

internal class ComposeUiImage : Image<@Composable () -> Unit> {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright (C) 2024 Square, Inc.
*
* 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.example.redwood.emojisearch.android.composeui

import android.app.Application
import coil3.ImageLoader
import coil3.PlatformContext
import coil3.SingletonImageLoader
import coil3.fetch.NetworkFetcher

class EmojiSearchApplication : Application(), SingletonImageLoader.Factory {
override fun newImageLoader(context: PlatformContext): ImageLoader {
return ImageLoader.Builder(context)
.components {
add(NetworkFetcher.Factory())
}
.build()
}
}
2 changes: 2 additions & 0 deletions samples/emoji-search/android-views/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ android {

dependencies {
implementation libs.coil.core
implementation libs.coil.network
implementation libs.ktor.engine.okhttp
implementation libs.google.material
implementation libs.kotlinx.coroutines.android
implementation projects.samples.emojiSearch.launcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
android:name=".EmojiSearchApplication"
android:allowBackup="false"
android:exported="true"
android:icon="@mipmap/ic_launcher"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright (C) 2024 Square, Inc.
*
* 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.example.redwood.emojisearch.android.views

import android.app.Application
import coil3.ImageLoader
import coil3.PlatformContext
import coil3.SingletonImageLoader
import coil3.fetch.NetworkFetcher

class EmojiSearchApplication : Application(), SingletonImageLoader.Factory {
override fun newImageLoader(context: PlatformContext): ImageLoader {
return ImageLoader.Builder(context)
.components {
add(NetworkFetcher.Factory())
}
.build()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import app.cash.redwood.Modifier
import coil.load
import coil3.load
import com.example.redwood.emojisearch.widget.Image

internal class ViewImage(
Expand Down