icerockdev / moko-kswift

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

It is possible to exclude all by default? #54

Closed franmontiel closed 1 year ago

franmontiel commented 1 year 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 1 year 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 1 year ago

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