插件的作用:
1.每个Module之间实现真正的解耦。
最初Module之间的依赖是在build.gradle中*dependencies{}*进行配置,这样Module之间的类就可以相互调用,虽然在要求上是不允许的,但是没有在编译阶段解决这个问题,没有实现真正的解耦,留下了误操作的隐患。
在开发阶段使用这个插件可以实现Module之间的真正解耦,在编译的时候Module之间是没有任何依赖的,在Run Module时期自动添加依赖,这样就可以保证在写代码时期Module之间没有依赖,所以就不能相互调用类。
2.在开发阶段每个Module都可以在不经过任何配置的情况下独立运行。
组件化的另一个意义就是在开发阶段可以单独运行每个Module,这样可以提高调试运行速度,不需要的Module没有编译,省去编译时间。
但是网上很多文章都是需要更改配置,这样在开发阶段太复杂了,使用当前插件可以使每个Module在不更改配置的情况下直接运行。
-
Notifications
You must be signed in to change notification settings - Fork 1
jiahongfei/ComponentGradlePlugin
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
每个Module之间实现真正的解耦。在开发阶段每个Module都可以在不经过任何配置的情况下独立运行。
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published