Skip to content

Commit c86a012

Browse files
falhassenglide-copybara-robot
authored andcommitted
No public description
PiperOrigin-RevId: 745212535
1 parent 7ed6cb3 commit c86a012

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

annotation/ksp/src/main/kotlin/com/bumptech/glide/annotation/ksp/GlideSymbolProcessor.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,9 @@ import com.squareup.kotlinpoet.FileSpec
2121
* `AppGlideModule` is found, we then generate Glide's configuration so that it calls the
2222
* `AppGlideModule` and any included `LibraryGlideModules`. Using indexes allows us to process
2323
* `LibraryGlideModules` in multiple rounds and/or libraries.
24-
*
25-
* TODO(b/239086146): Finish implementing the behavior described here.
2624
*/
2725
class GlideSymbolProcessor(private val environment: SymbolProcessorEnvironment) : SymbolProcessor {
28-
var isAppGlideModuleGenerated = false
26+
private var isAppGlideModuleGenerated = false
2927

3028
override fun process(resolver: Resolver): List<KSAnnotated> {
3129
val symbols = resolver.getSymbolsWithAnnotation("com.bumptech.glide.annotation.GlideModule")

annotation/ksp/src/main/kotlin/com/bumptech/glide/annotation/ksp/LibraryGlideModules.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ internal class LibraryGlideModulesParser(
3737
}
3838
.toList()
3939
val uniqueLibraryGlideModules = allLibraryGlideModules.associateBy { it.name }.values.toList()
40-
if (uniqueLibraryGlideModules != libraryGlideModules) {
40+
if (uniqueLibraryGlideModules.size != libraryGlideModules.size) {
4141
// Find the set of modules that have been included more than once by mapping the qualified
4242
// name of the module to a count of the number of times it's been seen. Duplicates are then
4343
// any keys that have a value > 1.

annotation/ksp/test/src/test/kotlin/com/bumptech/glide/annotation/ksp/test/LibraryGlideModuleTests.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class LibraryGlideModuleTests(override val sourceType: SourceType) : PerSourceTy
4444
)
4545

4646
compileCurrentSourceType(kotlinModule, javaModule) {
47+
assertThat(it.messages).doesNotContainMatch("[we]: \\[ksp] .*")
4748
assertThat(it.exitCode).isEqualTo(ExitCode.OK)
4849
assertFailsWith<FileNotFoundException> { it.generatedAppGlideModuleContents() }
4950
}
@@ -100,6 +101,7 @@ class LibraryGlideModuleTests(override val sourceType: SourceType) : PerSourceTy
100101
javaAppModule,
101102
javaLibraryModule
102103
) {
104+
assertThat(it.messages).doesNotContainMatch("[we]: \\[ksp] .*")
103105
assertThat(it.exitCode).isEqualTo(ExitCode.OK)
104106
assertThat(it.generatedAppGlideModuleContents())
105107
.hasSourceEqualTo(appGlideModuleWithLibraryModule)

0 commit comments

Comments
 (0)