We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
arouter使用arouter-gradle-plugin在app的编译期间使用transform方式在class文件中织入各个子模块的路由信息,这样有一些不好的地方: 编译速度被拖慢、配置起来太麻烦。
其实没必要单独写一个插件,因为Android gradle plugin 已经自带了一个transform叫resMergeTransform,arouter只要在使用apt输出路由信息的时候把信息作为资源文件输出到指定目录,例如arouter/config.properties 然后在app项目的build.gradle中添加
packagingOptions { merge "/arouter/config.properties" }
这样所有模块的路由信息都被打包到一个配置文件中,运行时只要像加载类一样读取这个文件就行了
The text was updated successfully, but these errors were encountered:
配置文件会暴露出你所有的路由信息
Sorry, something went wrong.
No branches or pull requests
arouter使用arouter-gradle-plugin在app的编译期间使用transform方式在class文件中织入各个子模块的路由信息,这样有一些不好的地方: 编译速度被拖慢、配置起来太麻烦。
其实没必要单独写一个插件,因为Android gradle plugin 已经自带了一个transform叫resMergeTransform,arouter只要在使用apt输出路由信息的时候把信息作为资源文件输出到指定目录,例如arouter/config.properties
然后在app项目的build.gradle中添加
这样所有模块的路由信息都被打包到一个配置文件中,运行时只要像加载类一样读取这个文件就行了
The text was updated successfully, but these errors were encountered: