Closed tomjegan closed 2 years ago
Resolved. Needed to use correct name of ShowkaseRootModule implementing class. Therefore:
-keep class **.ShowkaseModuleCodegen { }
Was not correct.
Should have been.
-keep class **.ShowkaseRootCodegen { }
@tomjegan Thank you for the tip 🥇
@tomjegan Is the single -keep class **.ShowkaseRootCodegen { }
all that is required? I have tried that line in combination alone and in combination in my app & module level proguard rules but I am still getting the no components error.
Just to summarize what's exactly needed for future reference -
You essentially need to add a proguard keep rule to make it with in release/alternate builds. The exact keep rule depends on your setup. For example, if your ShowkaseRootModule
implementation looks like this -
package my.lovely.package
@ShowkaseRoot
class MyRootModule: ShowkaseRootModule
Then your proguard rule will need to be
-keep class **.MyRootModuleCodegen { }
We are essentially trying to retain the final XCodegen
class that Showkase generates. The name of this generated class is of the format (_name_of_ShowkaseRootModule_implementation_)Codegen
.
Hope this makes sense!
@tomjegan Thank you for your insights! Works great! 🚀
With direct reference to this issue we are also experience this problem with builds where we have pro guard enabled.
As per VincentJouanne's comments we also would like to enable showkase for our internal QA builds such that design/product can inspect the components in app.
We also want to shift the annotation processing away from our dev/debug build as the build times are too high for this tool to be valuable as is unfortunately (even with ksp enabled).
Is it possible to provide a set of rules which will stop all the functions required from from converted?
Have tried StylianosGakis's suggestion but does not appear to work for us. Have also tried:
But still seeing the error that there are no components.
Are we able to add in some default rules (or at least advise further in this instance) please?