File tree 3 files changed +4
-4
lines changed
src/main/kotlin/com/bumptech/glide/annotation/ksp
test/src/test/kotlin/com/bumptech/glide/annotation/ksp/test
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -21,11 +21,9 @@ import com.squareup.kotlinpoet.FileSpec
21
21
* `AppGlideModule` is found, we then generate Glide's configuration so that it calls the
22
22
* `AppGlideModule` and any included `LibraryGlideModules`. Using indexes allows us to process
23
23
* `LibraryGlideModules` in multiple rounds and/or libraries.
24
- *
25
- * TODO(b/239086146): Finish implementing the behavior described here.
26
24
*/
27
25
class GlideSymbolProcessor (private val environment : SymbolProcessorEnvironment ) : SymbolProcessor {
28
- var isAppGlideModuleGenerated = false
26
+ private var isAppGlideModuleGenerated = false
29
27
30
28
override fun process (resolver : Resolver ): List <KSAnnotated > {
31
29
val symbols = resolver.getSymbolsWithAnnotation(" com.bumptech.glide.annotation.GlideModule" )
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ internal class LibraryGlideModulesParser(
37
37
}
38
38
.toList()
39
39
val uniqueLibraryGlideModules = allLibraryGlideModules.associateBy { it.name }.values.toList()
40
- if (uniqueLibraryGlideModules != libraryGlideModules) {
40
+ if (uniqueLibraryGlideModules.size != libraryGlideModules.size ) {
41
41
// Find the set of modules that have been included more than once by mapping the qualified
42
42
// name of the module to a count of the number of times it's been seen. Duplicates are then
43
43
// any keys that have a value > 1.
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ class LibraryGlideModuleTests(override val sourceType: SourceType) : PerSourceTy
44
44
)
45
45
46
46
compileCurrentSourceType(kotlinModule, javaModule) {
47
+ assertThat(it.messages).doesNotContainMatch(" [we]: \\ [ksp] .*" )
47
48
assertThat(it.exitCode).isEqualTo(ExitCode .OK )
48
49
assertFailsWith<FileNotFoundException > { it.generatedAppGlideModuleContents() }
49
50
}
@@ -100,6 +101,7 @@ class LibraryGlideModuleTests(override val sourceType: SourceType) : PerSourceTy
100
101
javaAppModule,
101
102
javaLibraryModule
102
103
) {
104
+ assertThat(it.messages).doesNotContainMatch(" [we]: \\ [ksp] .*" )
103
105
assertThat(it.exitCode).isEqualTo(ExitCode .OK )
104
106
assertThat(it.generatedAppGlideModuleContents())
105
107
.hasSourceEqualTo(appGlideModuleWithLibraryModule)
You can’t perform that action at this time.
0 commit comments