Haven’t used that, but I’ve written lint rules that look at the imports/class path usage in a class and evaluates if they are valid based on package. e.g.
core:commons
core:network
core:ui
commons -> nothing imported from network or ui
network -> nothing imported from ui
ui -> nothing imported from network
Depends on your use case. In mine, it’s an Android project and include our custom lint with the project, this allows it to be detected at code write rather than code compile, but may not work for all.