milis92 / Krang

Kotlin Compiler Plugin that gives you the ability to be notified every time annotated function is called
Apache License 2.0
35 stars 1 forks source link

Krang for all methods #26

Closed grrigore closed 1 year ago

grrigore commented 1 year ago

Is there a way to use Krang as a default for all methods?

milis92 commented 1 year ago

Not supported out of the box. Il build something for the following release

milis92 commented 1 year ago

This is now supported in the latest snapshot. You can now annotate a class, and Krang will intercept all function calls for that particular class.

One extra addition that I took the chance to do is godMode. God mode will allow you to intercept every function in the codebase, without explicitly annotating a class or a function. Enabling god mode:

krang {
    enabled.set(true)
    godMode.set(true) // false by default
}

@grrigore Please test the latest snapshot and report any findings ;)