请问ARouter框架是不是没有汇总这个步骤
来源:6-9 实战:规划目标类的结构【生成汇总映射表】

彩色的沙漠
2021-03-23
翻了几次源码,它初始化的时候把生成的类都创建出来就相当于加载到内存,没有找到把相关映射表汇总的代码,还需要继续学习理顺ARouter的思路。ARouter前面的标记注解和收集注解生产java类和我们课程的思路一样,学习这个课程就能把ARouter编译器相关的源码看明白。
1回答
-
关于映射表汇总,可以参考 arouter-register。
Using the custom gradle plugin to autoload the routing table
apply plugin: 'com.alibaba.arouter'
buildscript {
repositories {
jcenter()
}
dependencies {
// Replace with the latest version
classpath "com.alibaba:arouter-register:?"
}
}
Optional, use the registration plugin provided by the ARouter to automatically load the routing table(power by AutoRegister). By default, the ARouter will scanned the dex files . Performing an auto-registration via the gradle plugin can shorten the initialization time , it should be noted that the plugin must be used with api above 1.3.0!112021-03-23
相似问题