diff --git a/compiler/src/main/java/com/squareup/anvil/compiler/codegen/dagger/ProvidesMethodFactoryCodeGen.kt b/compiler/src/main/java/com/squareup/anvil/compiler/codegen/dagger/ProvidesMethodFactoryCodeGen.kt index 496b24a0d..2df65fd55 100644 --- a/compiler/src/main/java/com/squareup/anvil/compiler/codegen/dagger/ProvidesMethodFactoryCodeGen.kt +++ b/compiler/src/main/java/com/squareup/anvil/compiler/codegen/dagger/ProvidesMethodFactoryCodeGen.kt @@ -118,13 +118,13 @@ internal object ProvidesMethodFactoryCodeGen : AnvilApplicabilityChecker { val containingFile = clazz.containingFile!! // TODO we need a public API for this in KSP // https://github.com/google/ksp/issues/1621 - var supportsMangledNames: Boolean = false - var mangledNameSuffix: String = "" + var supportsMangledNames = false + var mangledNameSuffix = "" try { mangledNameSuffix = (resolver as ResolverImpl).module .mangledNameSuffix() supportsMangledNames = true - } catch (_: ClassNotFoundException) { + } catch (_: NoClassDefFoundError) { // TODO in KSP2 this isn't supported at the moment. See above issue. } (functions + properties)