Skip to content

Extensions

Quinn edited this page Jan 6, 2019 · 1 revision

Every plugin has its extension.

There are some common properties of all extensions

Common properties

runVariant

There are four available runVariant, DEBUG, RELEASE, ALWAYS, NEVER, its default value is ALWAYS.

  • DEBUG: The logic of waaving bytecode will only work in debug build mode
  • RELEASE: The logic of waaving bytecode will only work in release build mode
  • ALWAYS: The logic of waaving bytecode will only work in both debug and release build mode
  • NEVER : The logic of waaving bytecode is disabled

duplcatedClassSafeMode

Most of time, you don't need to care about it. But if you come across of build crash about duplcated-classes in /build/intermediates/transforms/dexBuilder, you can use this property

Timing-Plugin

timingHunterExt {
    runVariant = 'ALWAYS' 
    whitelist = ['com.quinn.hunter.timing.DataSource', 'com.foo.package2']  //default value is empty
    blacklist = ['com.quinn.hunter.timing.black', 'com.foo.package2']       //default value is empty
}

Most of time, you just need to use whitelist or blacklist, if you set both of them, whitelist will work, and blacklist will be ignored.

OkHttp-Plugin

okHttpHunterExt {
    runVariant = 'ALWAYS' 
    weaveEventListener = false
}

If you don't want to hook EventListener, you can set weaveEventListener = true

Debug-Plugin

debugHunterExt {
    runVariant = 'ALWAYS'  
}

Linelog-Plugin

linelogHunterExt {
    runVariant = 'ALWAYS' 
}
Clone this wiki locally