icerockdev / moko-kswift

Swift-friendly api generator for Kotlin/Native frameworks
https://moko.icerock.dev
Apache License 2.0
352 stars 22 forks source link

It is possible to exclude all by default? #54

Closed franmontiel closed 2 years ago

franmontiel commented 2 years ago

I want to exclude all classes minus the ones included via annotations or via gradle configuration.

I do not find a way to do it. Is it possible with the current implementation?

Thanks a lot.

Alex009 commented 2 years ago

hi @franmontiel ! plugin have two ways for filters:

for your case required second filter. sample:

kswift {
    install(dev.icerock.moko.kswift.plugin.feature.SealedToSwiftEnumFeature) {
        filter = includeFilter("ClassContext/moko-kswift.sample:mpp-library-pods/com/icerockdev/library/UIState")
    }
}

with this gradle config generation will be only for UIState class. all other classes will be skipped

franmontiel commented 2 years ago

Thanks, for some reason I was thinking that was not the behavior. Tested again and everything is working as expected.