Если я хочу сохранить внутренний класс, я использую -keep public class com.example.MyClass$MyInnerClass { *; }
(или -keep public class com.example.MyClass$* { *; }
, чтобы сохранить несколько внутренних классов).
Вопрос: есть ли возможность сохранить все внутренние классы класса, который соответствует сигнатуре путем расширения или реализации?
interface MyInterface { fun foo() }
class Foo : MyInterface {
override fun foo() {}
class Inner // <- keep these with one rule for all `MyInterface` implementations
class Another // <- keep these with one rule for all `MyInterface` implementations
}
class Bar : MyInterface {
override fun foo() {}
class Third // <- keep these with one rule for all `MyInterface` implementations
class Fourth // <- keep these with one rule for all `MyInterface` implementations
}
Что-то вроде -keep public class (com.example.** implements io.foo.bar.MyInterface)$*