Skip to content

Commit af78d7b

Browse files
committed
publish v2.4.5
添加go()无参方法
1 parent 5dc2f74 commit af78d7b

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
88
## 简介
99

10-
之前一直在用阿里开源的[ARouter](https://github.com/alibaba/ARouter)项目,因为ARouter多年未更新,ARouter开始有些不太适合了,所以重新开发了这款Android路由框架,同样的API,更多的功能,迁移请参见文末8-10
10+
之前一直在用阿里开源的[ARouter](https://github.com/alibaba/ARouter)项目,因为ARouter多年未更新,ARouter开始有些不太适合了,所以重新开发了这款Android路由框架,同样的API,更多的功能,迁移请参见文末8-11
1111

1212
## GoRouter和ARouter功能差异对比
1313

@@ -39,7 +39,7 @@
3939
9. 页面、拦截器、服务等组件均自动注册到框架
4040
10. 支持多种方式配置转场动画
4141
11. 支持获取Fragment
42-
12. 完全支持Kotlin以及混编(参见8-1)
42+
12. 完全支持Kotlin以及混编
4343
13. 支持第三方 App 加固
4444
14. 支持一键生成路由文档
4545
15. 支持增量编译
@@ -69,7 +69,7 @@ dependencyResolutionManagement {
6969
}
7070
7171
dependencies {
72-
api 'com.github.wyjsonGo.GoRouter:GoRouter-Api:2.4.4'
72+
api 'com.github.wyjsonGo.GoRouter:GoRouter-Api:2.4.5'
7373
}
7474
// Kotlin配置参见8-1
7575
```
@@ -89,7 +89,7 @@ android {
8989
}
9090
9191
dependencies {
92-
annotationProcessor 'com.github.wyjsonGo.GoRouter:GoRouter-Compiler:2.4.4'
92+
annotationProcessor 'com.github.wyjsonGo.GoRouter:GoRouter-Compiler:2.4.5'
9393
}
9494
```
9595

@@ -157,7 +157,7 @@ pluginManagement {
157157
// 项目根目录下的build.gradle
158158
buildscript {
159159
dependencies {
160-
classpath 'com.github.wyjsonGo.GoRouter:GoRouter-Gradle-Plugin:2.4.4'
160+
classpath 'com.github.wyjsonGo.GoRouter:GoRouter-Gradle-Plugin:2.4.5'
161161
}
162162
}
163163
```
@@ -892,7 +892,7 @@ kapt {
892892
}
893893

894894
dependencies {
895-
kapt 'com.github.wyjsonGo.GoRouter:GoRouter-Compiler:2.4.4'
895+
kapt 'com.github.wyjsonGo.GoRouter:GoRouter-Compiler:2.4.5'
896896
}
897897
```
898898

@@ -932,7 +932,11 @@ module_kotlin模块Demo示例[module_kotlin/build.gradle](https://github.com/wyj
932932
* 2.3.2版本之前,`GoRouter.getInstance().inject(this)`方法会先通过`this`参数拿到`bundle`对象,再去获取当前页面的`path`,通过`path`拿到`CardMeta`数据,利用java反射进行数据的绑定。
933933
* 2.3.2版本起,自动生成了参数注入类,内部代码是原生写法,性能更好。
934934
935-
##### 9. 开启调试,查看日志可以检查使用java方式注册的路由是否有重复提交的情况
935+
##### 9. `go()`无参方法
936+
937+
如果你没有使用自动加载路由表方法`GoRouter.autoLoadRouteModule(this)`,也没有使用多模块application`GoRouter.callAMOnCreate(this)`方法,这时你去使用`go()`无参方法需要在application里调用`GoRouter.setApplication(...)`设置一个上下文.
938+
939+
##### 10. 开启调试,查看日志可以检查使用java方式注册的路由是否有重复提交的情况
936940
937941
```log
938942
route path[/xx/xx] duplicate commit!!!
@@ -943,7 +947,7 @@ route pathClass[class xx.xx] duplicate commit!!!
943947
```
944948
GoRouter日志tag为`GoRouter`,GoRouter-Compiler日志tag为`GoRouter::Compiler`,GoRouter-Gradle-Plugin日志tag为`GoRouter::Gradle-Plugin`。
945949
946-
##### 10. ARouter迁移指南
950+
##### 11. ARouter迁移指南
947951
948952
| ARouter | GoRouter |
949953
| -------------------- | ------------------------ |

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22
buildscript {
33
dependencies {
4-
classpath "com.github.wyjsonGo.GoRouter:GoRouter-Gradle-Plugin:${VERSION}"
4+
// classpath "com.github.wyjsonGo.GoRouter:GoRouter-Gradle-Plugin:${VERSION}"
55
}
66
}
77

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ android.nonTransitiveRClass=true
2525
# org.gradle.jvmargs=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
2626

2727
GROUP_ID=com.github.wyjsonGo.GoRouter
28-
VERSION=2.4.4
28+
VERSION=2.4.5

settings.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ dependencyResolutionManagement {
1818

1919
rootProject.name = "GoRouter"
2020

21-
include ':app'
22-
include ':module_main'
23-
include ':module_user'
24-
include ':module_kotlin'
25-
include ':module_common'
21+
//include ':app'
22+
//include ':module_main'
23+
//include ':module_user'
24+
//include ':module_kotlin'
25+
//include ':module_common'
2626

2727
include ':GoRouter-Api'
2828
include ':GoRouter-Annotation'

0 commit comments

Comments
 (0)