Skip to content

Commit 356244c

Browse files
authored
Merge pull request #4 from ReKotlin/master
Merge from Rekotlin Fork
2 parents 46162c2 + 9a4a919 commit 356244c

File tree

9 files changed

+42
-47
lines changed

9 files changed

+42
-47
lines changed

README.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11

2-
# ReKotlin-Router [![Build Status](https://travis-ci.org/ReKotlin/rekotlin-router.svg?branch=master)](https://travis-ci.org/ReKotlin/rekotlin-router) [![License MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/ReKotlin/rekotlin-router/blob/master/LICENSE.md)
3-
2+
# ReKotlin-Router [![Build Status](https://travis-ci.org/ReKotlin/rekotlin-router.svg?branch=master)](https://travis-ci.org/ReKotlin/rekotlin-router) [![License MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/ReKotlin/rekotlin-router/blob/master/LICENSE.md) [ ![Download](https://api.bintray.com/packages/kmmraj/rekotlin-router/rekotlin-router/images/download.svg?version=0.1.8) ](https://bintray.com/kmmraj/rekotlin-router/rekotlin-router/0.1.8/link)
43

54
A declarative router for [ReKotlin](https://github.com/GeoThings/ReKotlin). Allows developers to declare routes in a similar manner as URLs are used on the web.
65

@@ -24,19 +23,22 @@ This requires to store the current navigation state within the app state and to
2423
# Installation
2524
Add the following line along with ReKotlin dependencies in gradle file
2625

26+
#### Version compatible with ReKotlin 1.0.0 +
27+
28+
```Groovy
29+
implementation 'org.rekotlinrouter:rekotlin-router:0.1.9'
30+
```
31+
32+
#### Version compatible with ReKotlin version less than 1.0.0
2733
```Groovy
28-
implementation 'org.rekotlinrouter:rekotlin-router:0.1.0'
34+
implementation 'org.rekotlinrouter:rekotlin-router:0.1.8'
2935
```
3036

3137
# Configuration
3238

3339
Extend your app state to include the navigation state:
3440

3541
```Kotlin
36-
import org.rekotlinrouter.HasNavigationState
37-
import org.rekotlinrouter.NavigationState
38-
import tw.geothings.rekotlin.StateType
39-
4042
data class AppState(override var navigationState: NavigationState,
4143
// other application states such as....
4244
var authenticationState: AuthenticationState,

build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ allprojects {
4242
}
4343
jcenter()
4444
mavenCentral()
45-
maven {
46-
url 'https://rekotlin.s3-ap-southeast-1.amazonaws.com/snapshots'
47-
}
45+
// maven {
46+
// url 'https://rekotlin.s3-ap-southeast-1.amazonaws.com/snapshots'
47+
// }
4848

4949
}
5050
}

rekotlin-router/build.gradle

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ apply plugin: 'maven-publish'
99

1010

1111
group 'org.rekotlin-router'
12-
version '0.1.8'
12+
version '0.1.9'
1313

1414

1515
ext {
1616
junitPlugin_version = '1.0.0'
1717
junit_jupiter_version = '5.0.0'
18-
rekotlin_version = '0.1.0-SNAPSHOT'
18+
rekotlin_version = '1.0.0'
1919
junit_version = "4.12"
2020
mockito_core_version = "1.10.19"
2121
assertj_core_version="3.6.2"
@@ -38,7 +38,7 @@ ext {
3838
siteUrl = 'https://github.com/kmmraj/rekotlin-router'
3939
gitUrl = 'https://github.com/kmmraj/rekotlin-router.git'
4040

41-
libraryVersion = '0.1.0'
41+
libraryVersion = '0.1.9'
4242

4343
developerId = 'developerId'
4444
developerName = 'Mohanraj K.M.'
@@ -58,7 +58,7 @@ android {
5858
minSdkVersion 16
5959
targetSdkVersion 25
6060
versionCode 1
61-
versionName "0.1.8"
61+
versionName "0.1.9"
6262
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
6363

6464
}
@@ -92,8 +92,8 @@ dependencies {
9292
implementation "com.android.support:appcompat-v7:$android_support_lib_version"
9393
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
9494

95-
compileOnly "tw.geothings.rekotlin:rekotlin:$rekotlin_version"
96-
testImplementation "tw.geothings.rekotlin:rekotlin:$rekotlin_version"
95+
compileOnly "org.rekotlin:rekotlin:$rekotlin_version"
96+
testImplementation "org.rekotlin:rekotlin:$rekotlin_version"
9797
testImplementation "junit:junit:$junit_version"
9898
testImplementation "org.mockito:mockito-core:$mockito_core_version"
9999
testImplementation "org.assertj:assertj-core:$assertj_core_version"

rekotlin-router/src/main/java/org/rekotlinrouter/NavigationAction.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.rekotlinrouter
22

3-
import tw.geothings.rekotlin.Action
3+
import org.rekotlin.Action
44

55

66
class SetRouteAction(var route: Route,

rekotlin-router/src/main/java/org/rekotlinrouter/NavigationReducer.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.rekotlinrouter
22

3-
import tw.geothings.rekotlin.Action
3+
import org.rekotlin.Action
44

55

66

rekotlin-router/src/main/java/org/rekotlinrouter/Router.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ package org.rekotlinrouter
22

33
import android.os.Handler
44
import android.os.Looper
5-
import tw.geothings.rekotlin.StateType
6-
import tw.geothings.rekotlin.Store
7-
import tw.geothings.rekotlin.StoreSubscriber
8-
import tw.geothings.rekotlin.Subscription
5+
import org.rekotlin.StateType
6+
import org.rekotlin.Store
7+
import org.rekotlin.StoreSubscriber
8+
import org.rekotlin.Subscription
99

1010

1111
// TODO: Check is this need to be a singleton ?

rekotlin-router/src/main/java/org/rekotlinrouter/StandardAction.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.rekotlinrouter
22

3-
import tw.geothings.rekotlin.*
3+
import org.rekotlin.*
44

55
/**
66
This is ReKotlin's built in action type, it is the only built in type that conforms to the

rekotlin-router/src/test/java/org/rekotlinrouter/ReKotlinRouterIntegerationTests.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import org.junit.Test
1313
import org.junit.runner.RunWith
1414
import org.powermock.core.classloader.annotations.PrepareForTest
1515
import org.powermock.modules.junit4.PowerMockRunner
16-
import tw.geothings.rekotlin.Action
17-
import tw.geothings.rekotlin.StateType
18-
import tw.geothings.rekotlin.Store
16+
import org.rekotlin.Action
17+
import org.rekotlin.StateType
18+
import org.rekotlin.Store
1919
import java.util.concurrent.TimeUnit
2020

2121

rekotlin-router/src/test/java/org/rekotlinrouter/ReKotlinRouterUnitTests.kt

+14-21
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,8 @@ package org.rekotlinrouter
33

44
import org.assertj.core.api.Assertions.assertThat
55
import org.junit.Test
6-
import tw.geothings.rekotlin.StateType
76

87

9-
/**
10-
* Created by Mohanraj Karatadipalayam on 27/09/17.
11-
*/
12-
13-
internal class AppState: StateType
14-
158
internal class ReKotlinRouterUnitTests {
169

1710
val mainActivityIdentifier = "MainActivity"
@@ -32,8 +25,8 @@ internal class ReKotlinRouterUnitTests {
3225
val routingActions = Router.routingActionsForTransitionFrom(oldRoute, newRoute)
3326

3427
// Then
35-
var action1Correct: Boolean = false
36-
var action2Correct: Boolean = false
28+
var action1Correct = false
29+
var action2Correct = false
3730

3831
routingActions.forEach { routingAction ->
3932
when(routingAction) {
@@ -66,8 +59,8 @@ internal class ReKotlinRouterUnitTests {
6659

6760
// Then
6861
var controllerIndex: Int = -1
69-
var toBeReplaced: RouteElementIdentifier=""
70-
var new: RouteElementIdentifier=""
62+
var toBeReplaced = ""
63+
var new = ""
7164
routingActions.forEach { routingAction ->
7265

7366
when (routingAction) {
@@ -95,8 +88,8 @@ internal class ReKotlinRouterUnitTests {
9588
val routingActions = Router.routingActionsForTransitionFrom(oldRoute, newRoute)
9689

9790
// Then
98-
var action1Correct: Boolean = false
99-
var action2Correct: Boolean = false
91+
var action1Correct = false
92+
var action2Correct = false
10093

10194
routingActions.forEach { routingAction ->
10295
when(routingAction) {
@@ -135,8 +128,8 @@ internal class ReKotlinRouterUnitTests {
135128

136129
// Then
137130
var controllerIndex: Int = -1
138-
var toBeReplaced: RouteElementIdentifier=""
139-
var new: RouteElementIdentifier=""
131+
var toBeReplaced = ""
132+
var new = ""
140133
routingActions.forEach { routingAction ->
141134

142135
when (routingAction) {
@@ -164,8 +157,8 @@ internal class ReKotlinRouterUnitTests {
164157
val routingActions = Router.routingActionsForTransitionFrom(oldRoute, newRoute)
165158

166159
// Then
167-
var action1Correct: Boolean = false
168-
var action2Correct: Boolean = false
160+
var action1Correct = false
161+
var action2Correct = false
169162

170163
routingActions.forEach { routingAction ->
171164
when(routingAction) {
@@ -234,8 +227,8 @@ internal class ReKotlinRouterUnitTests {
234227
val routingActions = Router.routingActionsForTransitionFrom(oldRoute, newRoute)
235228

236229
// Then
237-
var action1Correct: Boolean = false
238-
var action2Correct: Boolean = false
230+
var action1Correct = false
231+
var action2Correct = false
239232
routingActions.forEach { routingAction ->
240233
when(routingAction) {
241234
is pop -> {
@@ -265,8 +258,8 @@ internal class ReKotlinRouterUnitTests {
265258
val routingActions = Router.routingActionsForTransitionFrom(oldRoute, newRoute)
266259

267260
// Then
268-
var action1Correct: Boolean = false
269-
var action2Correct: Boolean = false
261+
var action1Correct = false
262+
var action2Correct = false
270263
routingActions.forEach { routingAction ->
271264
when(routingAction) {
272265
is push -> {

0 commit comments

Comments
 (0)