Preconditions:
- Using Dagger 2.52
- Using KSP 2.0.21-1.0.26
- Using the
org.jetbrains.kotlin.android and com.android.library gradle plugins (this works with standard kotlin + org.jetbrains.kotlin.jvm)
Provided an internal type:
internal class InternalType(val value: String)
A class which leverages the internal type:
internal class InjectionReceiver @Inject constructor(val internalType: InternalType)
and a module which defines a provider for it:
@Module
object ReproModule {
@Provides
internal fun provideInternalType(): InternalType = InternalType("Hello, World!")
}
The result of this is a compilation failure due to the generated factory code:
ReproModule_ProvideInternalType$libFactory.java:36: error: cannot find symbol
return Preconditions.checkNotNullFromProvides(ReproModule.INSTANCE.provideInternalType$lib());
^
symbol: method provideInternalType$lib()
location: variable INSTANCE of type ReproModule
The actual generated code at the point where it fails looks like this:
public static InternalType provideInternalType$lib() {
return Preconditions.checkNotNullFromProvides(ReproModule.INSTANCE.provideInternalType$lib());
}
Looking at the generated code, it appears as if the above should read as follows:
public static InternalType provideInternalType$lib() {
return Preconditions.checkNotNullFromProvides(ReproModule.INSTANCE.provideInternalType$lib_debug());
}
Preconditions:
org.jetbrains.kotlin.androidandcom.android.librarygradle plugins (this works with standard kotlin +org.jetbrains.kotlin.jvm)Provided an internal type:
A class which leverages the internal type:
and a module which defines a provider for it:
The result of this is a compilation failure due to the generated factory code:
The actual generated code at the point where it fails looks like this:
Looking at the generated code, it appears as if the above should read as follows: