I don't think you can only do this with proguard, and I really doubt that there is a direct solution (a plugin that you can use) with mvn \ gradle \ sbt \ for this.
, , , , , , .
:
(1) jdeps ( jdk) ( ) .class , .
some.class ( root_package) :
jdeps -v -R -e "root_package.*" some.class
(2) jdeps proguard ( -keep).
(3) proguard include, (2).
(2) -.
, , jdeps .
Maven, , , groovy .
, :