Skip to content

Commit

Permalink
Merge pull request #413 from qdsfdhvh/version_1.7.2
Browse files Browse the repository at this point in the history
Version 1.7.2
  • Loading branch information
qdsfdhvh authored Jan 6, 2024
2 parents 18fbf76 + bc8721f commit 1897a6e
Show file tree
Hide file tree
Showing 109 changed files with 639 additions and 542 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CompareScreenshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
java-version: 17

- name: Setup Gradle
uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a # v2.9.0
uses: gradle/gradle-build-action@982da8e78c05368c70dac0351bb82647a9e9a5d2 # v2.11.1
with:
gradle-version: wrapper

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/CompareScreenshotComment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0
- uses: dawidd6/action-download-artifact@f29d1b6a8930683e80acedfbe6baa2930cd646b4 # v2.28.1
with:
name: pr
run_id: ${{ github.event.workflow_run.id }}
Expand All @@ -47,7 +47,7 @@ jobs:
git branch -D "$BRANCH_NAME" || true
git checkout --orphan "$BRANCH_NAME"
git rm -rf .
- uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0
- uses: dawidd6/action-download-artifact@f29d1b6a8930683e80acedfbe6baa2930cd646b4 # v2.28.1
with:
run_id: ${{ github.event.workflow_run.id }}
name: screenshot-diff
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/StoreScreenshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

# Better than caching and/or extensions of actions/setup-java
- name: Setup Gradle
uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a # v2.9.0
uses: gradle/gradle-build-action@982da8e78c05368c70dac0351bb82647a9e9a5d2 # v2.11.1
with:
gradle-version: wrapper

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ kotlin {
sourceSets {
val commonMain by getting {
dependencies {
+ api("io.github.qdsfdhvh:image-loader:1.7.1")
+ api("io.github.qdsfdhvh:image-loader:1.7.2")
// optional - Moko Resources Decoder
+ api("io.github.qdsfdhvh:image-loader-extension-moko-resources:1.7.1")
+ api("io.github.qdsfdhvh:image-loader-extension-moko-resources:1.7.2")
// optional - Blur Interceptor (only support bitmap)
+ api("io.github.qdsfdhvh:image-loader-extension-blur:1.7.1")
+ api("io.github.qdsfdhvh:image-loader-extension-blur:1.7.2")
}
}
val jvmMain by getting {
dependencies {
// optional - ImageIO Decoder
+ api("io.github.qdsfdhvh:image-loader-extension-imageio:1.7.1")
+ api("io.github.qdsfdhvh:image-loader-extension-imageio:1.7.2")
}
}
}
Expand Down
35 changes: 13 additions & 22 deletions app/common/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget

plugins {
id("app.android.library")
id("app.kotlin.multiplatform")
id("app.compose.multiplatform")
alias(libs.plugins.kotlin.plugin.serialization)
alias(libs.plugins.moko.resources)
}

kotlin {
Expand All @@ -14,21 +15,21 @@ kotlin {
api(compose.foundation)
api(compose.ui)
api(compose.material)
@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
implementation(compose.components.resources)

api(projects.imageLoader)
api(projects.imageLoaderSingleton)
implementation(projects.extension.blur)
implementation(projects.extension.mokoResources)
implementation(projects.extension.composeResources)
// implementation(projects.extension.mokoResources)
implementation(projects.extension.ninePatch)

implementation(libs.moko.resources)
implementation(libs.kotlinx.serialization.json)
implementation(libs.ktor.client.logging)
implementation(libs.kermit)
}
}
androidMain {
// https://github.com/icerockdev/moko-resources/issues/531
dependsOn(commonMain.get())
dependencies {
implementation(libs.ktor.client.cio)
}
Expand All @@ -49,24 +50,14 @@ kotlin {
}
}
}
targets.withType<KotlinNativeTarget>().configureEach {
binaries.framework {
baseName = "common"
isStatic = true
}
}
}

android {
namespace = "io.github.qdsfdhvh.imageloader.demo.common"
}

multiplatformResources {
multiplatformResourcesPackage = "com.seiko.imageloader.demo"
}

// workaround
listOf(
"iosSimulatorArm64ProcessResources",
"iosX64ProcessResources",
"macosArm64ProcessResources",
"macosX64ProcessResources",
).forEach { name ->
tasks.matching { it.name == name }.configureEach {
dependsOn(tasks.matching { it.name == "generateMRcommonMain" })
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.seiko.imageloader.demo

import io.github.qdsfdhvh.generated.resources.Res

internal object MR {
val images get() = Res.images
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ fun LocalResourceScene(
item {
Row {
ImageItem(
MR.files.chat_from_bg_normal_9,
MR.images.chat_from_bg_normal_9,
modifier = Modifier.weight(1f).height(100.dp),
contentScale = ContentScale.Fit,
block = remember {
Expand All @@ -54,27 +54,27 @@ fun LocalResourceScene(
)
Spacer(Modifier.width(8.dp))
ImageItem(
MR.files.chat_from_bg_normal_9,
MR.images.chat_from_bg_normal_9,
modifier = Modifier.weight(1f).height(100.dp),
contentScale = ContentScale.Fit,
)
}
}
item {
ImageItem(MR.files.cat)
ImageItem(MR.images.cat)
}
item {
ImageItem(MR.files.collection_logo)
ImageItem(MR.images.collection_logo)
}
item {
ImageItem(MR.images.car_black)
}
item {
ImageItem(MR.colors.valueColor)
}
item {
ImageItem(MR.colors.valueColor2)
}
// item {
// ImageItem(composeRes.colors.valueColor)
// }
// item {
// ImageItem(composeRes.colors.valueColor2)
// }
}
}
}
Loading

0 comments on commit 1897a6e

Please sign in to comment.