Closed zhangkevd closed 9 months ago
Hi, the shaded APIs are generated for compatibility, and should not be used. We are working on hiding those classes now. We don't want to expose XProcessing types, those are implementation details of Dagger ksp, and may be removed in future. Please directly use javac() or ksp() element exposed from Dagger model types instead.
@wanyingd1996 sorry,I don't understand
Please directly use javac() or ksp() element exposed from Dagger model types instead.
where is it?
You mean not to reference anything in dagger-spi, but I need to extend the content of the compiler, such as customizing something like ViewModel. I tried to imitate the implementation of hilt\android\processor\internale\viewmodel, but encountered this difficulty. I hope that in subsequent hilt updates, I can successfully synchronize related logic. Are there any aspects that I need to know, or are there any similar examples?
I thought you were just trying to use dagger spi API, but seems you are trying to contribute to dagger code, https://github.com/google/dagger/blob/master/java/dagger/spi/model/DaggerElement.java#L31.
such as customizing something like ViewModel. I tried to imitate the implementation of hilt\android\processor\internale\viewmodel
If you are trying to contribute to dagger code, you should reference androidx.room.compiler.processing.XElement
directly instead of dagger.spi.shaded.androidx.room.compiler.processing.XElement
, the later one is generating for shading purpose, https://medium.com/@akhaku/java-class-shadowing-and-shading-9439b0eacb13
toJavaPoet() function cannot be referenced
the extension methods:
demo:
CustomDagger.zip