diff --git a/annotation/ksp/src/main/kotlin/com/bumptech/glide/annotation/ksp/GlideSymbolProcessor.kt b/annotation/ksp/src/main/kotlin/com/bumptech/glide/annotation/ksp/GlideSymbolProcessor.kt index 0dbf5dc220..d8954bbbd8 100644 --- a/annotation/ksp/src/main/kotlin/com/bumptech/glide/annotation/ksp/GlideSymbolProcessor.kt +++ b/annotation/ksp/src/main/kotlin/com/bumptech/glide/annotation/ksp/GlideSymbolProcessor.kt @@ -21,11 +21,9 @@ import com.squareup.kotlinpoet.FileSpec * `AppGlideModule` is found, we then generate Glide's configuration so that it calls the * `AppGlideModule` and any included `LibraryGlideModules`. Using indexes allows us to process * `LibraryGlideModules` in multiple rounds and/or libraries. - * - * TODO(b/239086146): Finish implementing the behavior described here. */ class GlideSymbolProcessor(private val environment: SymbolProcessorEnvironment) : SymbolProcessor { - var isAppGlideModuleGenerated = false + private var isAppGlideModuleGenerated = false override fun process(resolver: Resolver): List { val symbols = resolver.getSymbolsWithAnnotation("com.bumptech.glide.annotation.GlideModule") diff --git a/annotation/ksp/src/main/kotlin/com/bumptech/glide/annotation/ksp/LibraryGlideModules.kt b/annotation/ksp/src/main/kotlin/com/bumptech/glide/annotation/ksp/LibraryGlideModules.kt index fdd3445e97..17894f7a7f 100644 --- a/annotation/ksp/src/main/kotlin/com/bumptech/glide/annotation/ksp/LibraryGlideModules.kt +++ b/annotation/ksp/src/main/kotlin/com/bumptech/glide/annotation/ksp/LibraryGlideModules.kt @@ -37,7 +37,7 @@ internal class LibraryGlideModulesParser( } .toList() val uniqueLibraryGlideModules = allLibraryGlideModules.associateBy { it.name }.values.toList() - if (uniqueLibraryGlideModules != libraryGlideModules) { + if (uniqueLibraryGlideModules.size != libraryGlideModules.size) { // Find the set of modules that have been included more than once by mapping the qualified // name of the module to a count of the number of times it's been seen. Duplicates are then // any keys that have a value > 1. diff --git a/annotation/ksp/test/src/test/kotlin/com/bumptech/glide/annotation/ksp/test/LibraryGlideModuleTests.kt b/annotation/ksp/test/src/test/kotlin/com/bumptech/glide/annotation/ksp/test/LibraryGlideModuleTests.kt index 200f6b7e84..a261b07bc0 100644 --- a/annotation/ksp/test/src/test/kotlin/com/bumptech/glide/annotation/ksp/test/LibraryGlideModuleTests.kt +++ b/annotation/ksp/test/src/test/kotlin/com/bumptech/glide/annotation/ksp/test/LibraryGlideModuleTests.kt @@ -44,6 +44,7 @@ class LibraryGlideModuleTests(override val sourceType: SourceType) : PerSourceTy ) compileCurrentSourceType(kotlinModule, javaModule) { + assertThat(it.messages).doesNotContainMatch("[we]: \\[ksp] .*") assertThat(it.exitCode).isEqualTo(ExitCode.OK) assertFailsWith { it.generatedAppGlideModuleContents() } } @@ -100,6 +101,7 @@ class LibraryGlideModuleTests(override val sourceType: SourceType) : PerSourceTy javaAppModule, javaLibraryModule ) { + assertThat(it.messages).doesNotContainMatch("[we]: \\[ksp] .*") assertThat(it.exitCode).isEqualTo(ExitCode.OK) assertThat(it.generatedAppGlideModuleContents()) .hasSourceEqualTo(appGlideModuleWithLibraryModule) diff --git a/gradle.properties b/gradle.properties index 3444b14b82..83230c26d4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -36,4 +36,4 @@ TEST_JVM_MEMORY_SIZE=4096M VERSION_MAJOR=5 VERSION_MINOR=0 VERSION_PATCH=0 -VERSION_NAME=5.0.0-SNAPSHOT \ No newline at end of file +VERSION_NAME=5.0.0-SNAPSHOT diff --git a/integration/compose/gradle.properties b/integration/compose/gradle.properties index 01c4b2bc2c..a114f9e4ce 100644 --- a/integration/compose/gradle.properties +++ b/integration/compose/gradle.properties @@ -6,4 +6,4 @@ POM_DESCRIPTION=An integration library to integrate with Jetpack Compose VERSION_MAJOR=1 VERSION_MINOR=0 VERSION_PATCH=0 -VERSION_NAME=1.0.0-beta1-SNAPSHOT +VERSION_NAME=1.0.0-beta02-SNAPSHOT diff --git a/integration/compose/src/main/java/com/bumptech/glide/integration/compose/GlideModifier.kt b/integration/compose/src/main/java/com/bumptech/glide/integration/compose/GlideModifier.kt index a193f844b8..1d43a7496d 100644 --- a/integration/compose/src/main/java/com/bumptech/glide/integration/compose/GlideModifier.kt +++ b/integration/compose/src/main/java/com/bumptech/glide/integration/compose/GlideModifier.kt @@ -332,10 +332,15 @@ internal class GlideNode : DrawModifierNode, LayoutModifierNode, SemanticsModifi override fun ContentDrawScope.draw() { if (draw) { val drawPlaceholder = transition.drawPlaceholder ?: DoNotTransition.drawPlaceholder - placeholder?.let { painter -> - drawContext.canvas.withSave { - placeholderPositionAndSize = drawOne(painter, placeholderPositionAndSize) { size -> - drawPlaceholder.invoke(this, painter, size, alpha, colorFilter) + // If we're only showing the placeholder, it should just be drawn as the primary image. + // If we've loaded a full image and we have a placeholder, then we should try to draw both so + // that the transition can decide what to do. + if (placeholder != primary && transition != DoNotTransition) { + placeholder?.let { painter -> + drawContext.canvas.withSave { + placeholderPositionAndSize = drawOne(painter, placeholderPositionAndSize) { size -> + drawPlaceholder.invoke(this, painter, size, alpha, colorFilter) + } } } } diff --git a/integration/ktx/gradle.properties b/integration/ktx/gradle.properties index d486de19cb..a0ed6fd785 100644 --- a/integration/ktx/gradle.properties +++ b/integration/ktx/gradle.properties @@ -6,4 +6,4 @@ POM_DESCRIPTION=An integration library to improve Kotlin interop with Glide VERSION_MAJOR=1 VERSION_MINOR=0 VERSION_PATCH=0 -VERSION_NAME=1.0.0-beta1-SNAPSHOT +VERSION_NAME=1.0.0-beta02-SNAPSHOT diff --git a/library/src/main/java/com/bumptech/glide/load/engine/bitmap_recycle/BitmapPoolAdapter.java b/library/src/main/java/com/bumptech/glide/load/engine/bitmap_recycle/BitmapPoolAdapter.java index b0dfc41edc..cedbba2728 100644 --- a/library/src/main/java/com/bumptech/glide/load/engine/bitmap_recycle/BitmapPoolAdapter.java +++ b/library/src/main/java/com/bumptech/glide/load/engine/bitmap_recycle/BitmapPoolAdapter.java @@ -5,8 +5,8 @@ /** * An {@link com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool BitmapPool} implementation - * that rejects all {@link android.graphics.Bitmap Bitmap}s added to it and always returns {@code - * null} from get. + * that rejects all {@link android.graphics.Bitmap Bitmap}s added to it and always returns a new + * {@link android.graphics.Bitmap Bitmap} from {@link #get}. */ public class BitmapPoolAdapter implements BitmapPool { @Override