Skip to content

Commit

Permalink
Merge pull request #69 from chenenyu/dev
Browse files Browse the repository at this point in the history
1.3.3
  • Loading branch information
Half Stack committed Jan 30, 2018
2 parents dd1da76 + af4ebac commit cfdf670
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 22 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 2018.01.30

`router: 1.3.3`:

1. fix: https://github.com/chenenyu/Router/pull/68

## 2017.11.29

`router: 1.3.2`:
Expand Down
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,8 @@ Router.initialize(new Configuration.Builder()
.build());
```

2. 添加注解

```java
// 这里添加了path和拦截器
@Route(value = "test", interceptors = "SampleInterceptor")
public class TestActivity extends AppCompatActivity {
...
}
```

3. 添加拦截器
2. 添加拦截器(可选)

```java
@Interceptor("SampleInterceptor")
Expand All @@ -68,6 +59,16 @@ public class SampleInterceptor implements RouteInterceptor {
}
```

3. 添加注解

```java
// 这里添加了path和拦截器(可选)
@Route(value = "test", interceptors = "SampleInterceptor")
public class TestActivity extends AppCompatActivity {
...
}
```

4. 跳转

```java
Expand Down
4 changes: 2 additions & 2 deletions VERSION.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# router library version
ROUTER_VERSION=1.3.2
ROUTER_VERSION=1.3.3
# compiler library version
COMPILER_VERSION=1.3.2
COMPILER_VERSION=1.3.3
# annotation library version
ANNOTATION_VERSION=0.3.0
4 changes: 2 additions & 2 deletions annotation/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin: 'java'

sourceCompatibility = "1.7"
targetCompatibility = "1.7"
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7

apply from: 'publish.gradle'
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.1.51'
ext.kotlin_version = '1.2.10'
repositories {
google()
jcenter()
Expand Down Expand Up @@ -27,10 +27,10 @@ ext {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7

compileSdkVersion = 26
buildToolsVersion = "26.0.3"
compileSdkVersion = 27
buildToolsVersion = "27.0.3"
minSdkVersion = 14
targetSdkVersion = 26
targetSdkVersion = 27

supportVersion = "26.1.0"
supportVersion = "27.0.2"
}
2 changes: 1 addition & 1 deletion router/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ android {
buildToolsVersion rootProject.ext.buildToolsVersion

defaultConfig {
minSdkVersion 14
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
Expand Down
5 changes: 3 additions & 2 deletions router/src/main/java/com/chenenyu/router/RealRouter.java
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,11 @@ public Intent getIntent(Context context) {
return finalizeIntent(context, matcher, null);
}
} else {
boolean isiImplicit = matcher instanceof AbsImplicitMatcher;
for (Map.Entry<String, Class<?>> entry : entries) {
if (matcher.match(context, mRouteRequest.getUri(), entry.getKey(), mRouteRequest)) {
if (matcher.match(context, mRouteRequest.getUri(), isiImplicit ? null : entry.getKey(), mRouteRequest)) {
RLog.i("Caught by " + matcher.getClass().getCanonicalName());
return finalizeIntent(context, matcher, entry.getValue());
return finalizeIntent(context, matcher, isiImplicit ? null : entry.getValue());
}
}
}
Expand Down

0 comments on commit cfdf670

Please sign in to comment.