base-plugin
//快速插入code到指定的类文件,无需先扫描文件在插入code到指定类文件,代码可以参考perf-plugin插件
FastInsertCodePlugin
//对于有些功能需要先扫描类文件,收集各个类的信息,然后在插入code到指定类文件中,代码可以参考lifecycle-plugin插件
ScanClassPlugin
implementation 'io.github.jamesfchen:base-plugin:1.0.2'
or implementation 'io.github.jamesfchen:base-plugin-ktx:1.0.0'
ibc-plugin
implementation 'io.github.jamesfchen:ibc-api:1.+'
//页面路由
@Router(name = "bundle1router")
public class Bundle1Router implements IModuleRouter {
}
-
源代码插桩 Source Code Instrumentation(SCI):kapt or java注解处理器生成java代码
-
二进制插桩(Binary Instrumentation)
- 静态二进制插桩[Static Binary Instrumentation(SBI)]:插入额外的字节码,然后利用重打包技术 或者 asm在编译期间插入字节码
- 动态二进制插桩[Dynamic Binary Instrumentation(DBI)]:hook需要修改的函数,在运行期间将本应该执行的函数指向篡改之后的函数