Skip to content
This repository has been archived by the owner on May 26, 2021. It is now read-only.

Commit

Permalink
Merge pull request #131 from Unlimity/migrate_android_x
Browse files Browse the repository at this point in the history
Migrate to AndroidX
  • Loading branch information
Unlimity authored Feb 25, 2019
2 parents 90b4140 + a4efc7e commit 6447eaa
Show file tree
Hide file tree
Showing 118 changed files with 282 additions and 264 deletions.
31 changes: 17 additions & 14 deletions buildsystem/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ ext.versions = [
bintray : '1.7.3',
maven : '1.5',
oss : '4.5.4',
support_library: '28.0.0',
espresso : '3.0.1',
espresso_rules : '1.0.1',
espresso_runner: '1.0.1',
appcompat : '1.0.2',
recyclerview : '1.0.0',
annotation : '1.0.0',
design : '1.0.0',
espresso : '3.1.1',
espresso_rules : '1.1.1',
espresso_runner: '1.1.1',
junit : '4.12'
]

Expand All @@ -20,16 +23,16 @@ ext.libraries = [
bintray : "com.jfrog.bintray.gradle:gradle-bintray-plugin:$versions.bintray",
maven : "com.github.dcendents:android-maven-gradle-plugin:$versions.maven",
oss : "org.jfrog.buildinfo:build-info-extractor-gradle:$versions.oss",
appcompat : "com.android.support:appcompat-v7:$versions.support_library",
recyclerview : "com.android.support:recyclerview-v7:$versions.support_library",
design : "com.android.support:design:$versions.support_library",
annotations : "com.android.support:support-annotations:$versions.support_library",
espresso_runner : "com.android.support.test:runner:$versions.espresso_runner",
espresso_rules : "com.android.support.test:rules:$versions.espresso_rules",
espresso_core : "com.android.support.test.espresso:espresso-core:$versions.espresso",
espresso_web : "com.android.support.test.espresso:espresso-web:$versions.espresso",
espresso_contrib: "com.android.support.test.espresso:espresso-contrib:$versions.espresso",
espresso_intents: "com.android.support.test.espresso:espresso-intents:$versions.espresso",
appcompat : "androidx.appcompat:appcompat:$versions.appcompat",
recyclerview : "androidx.recyclerview:recyclerview:$versions.recyclerview",
annotation : "androidx.annotation:annotation:$versions.annotation",
design : "com.google.android.material:material:$versions.design",
espresso_runner : "androidx.test:runner:$versions.espresso_runner",
espresso_rules : "androidx.test:rules:$versions.espresso_rules",
espresso_core : "androidx.test.espresso:espresso-core:$versions.espresso",
espresso_web : "androidx.test.espresso:espresso-web:$versions.espresso",
espresso_contrib: "androidx.test.espresso:espresso-contrib:$versions.espresso",
espresso_intents: "androidx.test.espresso:espresso-intents:$versions.espresso",
junit : "junit:junit:$versions.junit"
]

Expand Down
1 change: 0 additions & 1 deletion docs/kakao/com.agoda.kakao.screen/-screen-actions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Provides basic actions that can be performed on each and every screen
| Name | Summary |
|---|---|
| [closeSoftKeyboard](close-soft-keyboard.md) | `open fun closeSoftKeyboard(): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)<br>Closes soft keyboard, if opened |
| [idle](idle.md) | `open fun idle(duration: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)` = 1000L): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)<br>Idles for given amount of time |
| [pressBack](press-back.md) | `open fun pressBack(): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)<br>Performs click on device's back button |
| [pressKey](press-key.md) | `open fun pressKey(keyCode: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)<br>Presses a key with corresponding KeyCode`open fun pressKey(key: EspressoKey): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)<br>Presses a key with correspondingKeyCode and modifiers |
| [pressMenuKey](press-menu-key.md) | `open fun pressMenuKey(): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)<br>Presses the hardware menu key |
Expand Down
11 changes: 11 additions & 0 deletions docs/kakao/com.agoda.kakao.screen/-screen/idle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[kakao](../../index.md) / [com.agoda.kakao.screen](../index.md) / [Screen](index.md) / [idle](./idle.md)

# idle

`fun idle(duration: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)` = 1000L): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)

Idles for given amount of time

### Parameters

`duration` - Time to idle in milliseconds (1 second by default)
8 changes: 7 additions & 1 deletion docs/kakao/com.agoda.kakao.screen/-screen/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ such as tapBack() and closeSoftKeyboard()
| Name | Summary |
|---|---|
| [closeSoftKeyboard](../-screen-actions/close-soft-keyboard.md) | `open fun closeSoftKeyboard(): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)<br>Closes soft keyboard, if opened |
| [idle](../-screen-actions/idle.md) | `open fun idle(duration: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)` = 1000L): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)<br>Idles for given amount of time |
| [pressBack](../-screen-actions/press-back.md) | `open fun pressBack(): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)<br>Performs click on device's back button |
| [pressKey](../-screen-actions/press-key.md) | `open fun pressKey(keyCode: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)<br>Presses a key with corresponding KeyCode`open fun pressKey(key: EspressoKey): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)<br>Presses a key with correspondingKeyCode and modifiers |
| [pressMenuKey](../-screen-actions/press-menu-key.md) | `open fun pressMenuKey(): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)<br>Presses the hardware menu key |

### Companion Object Functions

| Name | Summary |
|---|---|
| [idle](idle.md) | `fun idle(duration: `[`Long`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)` = 1000L): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)<br>Idles for given amount of time |
| [onScreen](on-screen.md) | `fun <T : `[`Screen`](./index.md)`<`[`T`](on-screen.md#T)`>> onScreen(function: `[`T`](on-screen.md#T)`.() -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`): `[`T`](on-screen.md#T) |
5 changes: 5 additions & 0 deletions docs/kakao/com.agoda.kakao.screen/-screen/on-screen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[kakao](../../index.md) / [com.agoda.kakao.screen](../index.md) / [Screen](index.md) / [onScreen](./on-screen.md)

# onScreen

`inline fun <reified T : `[`Screen`](index.md)`<`[`T`](on-screen.md#T)`>> onScreen(function: `[`T`](on-screen.md#T)`.() -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`): `[`T`](on-screen.md#T)
4 changes: 1 addition & 3 deletions kakao/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ dependencies {
implementation libraries.espresso_core
implementation libraries.espresso_web
implementation libraries.espresso_intents
implementation (libraries.espresso_contrib) {
exclude group: 'com.android.support'
}
implementation libraries.espresso_contrib
}

apply plugin: 'com.github.dcendents.android-maven'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

package com.agoda.kakao.bottomnav

import android.support.design.widget.BottomNavigationView
import android.support.test.espresso.UiController
import android.support.test.espresso.ViewAction
import android.support.test.espresso.matcher.ViewMatchers
import android.view.View
import androidx.test.espresso.UiController
import androidx.test.espresso.ViewAction
import androidx.test.espresso.matcher.ViewMatchers
import com.agoda.kakao.common.actions.BaseActions
import com.google.android.material.bottomnavigation.BottomNavigationView

/**
* Provides actions for BottomNavigationView
Expand All @@ -31,4 +31,4 @@ interface BottomNavigationViewActions : BaseActions {
}
})
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

package com.agoda.kakao.bottomnav

import android.support.design.widget.BottomNavigationView
import com.agoda.kakao.common.assertions.BaseAssertions
import com.google.android.material.bottomnavigation.BottomNavigationView

/**
* Provides assertion for BottomNavigationview
Expand All @@ -28,4 +28,4 @@ interface BottomNavigationViewAssertions : BaseAssertions {
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

package com.agoda.kakao.bottomnav

import android.support.test.espresso.DataInteraction
import android.view.View
import androidx.test.espresso.DataInteraction
import com.agoda.kakao.common.builders.ViewBuilder
import com.agoda.kakao.common.views.KBaseView
import org.hamcrest.Matcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

package com.agoda.kakao.check

import android.support.test.espresso.UiController
import android.support.test.espresso.ViewAction
import android.support.test.espresso.matcher.ViewMatchers
import android.view.View
import android.widget.Checkable
import androidx.test.espresso.UiController
import androidx.test.espresso.ViewAction
import androidx.test.espresso.matcher.ViewMatchers
import com.agoda.kakao.common.actions.BaseActions
import org.hamcrest.Description
import org.hamcrest.Matchers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

package com.agoda.kakao.check

import android.support.test.espresso.assertion.ViewAssertions
import android.support.test.espresso.matcher.ViewMatchers
import androidx.test.espresso.assertion.ViewAssertions
import androidx.test.espresso.matcher.ViewMatchers
import com.agoda.kakao.common.assertions.BaseAssertions

/**
Expand Down
2 changes: 1 addition & 1 deletion kakao/src/main/kotlin/com/agoda/kakao/check/KCheckBox.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

package com.agoda.kakao.check

import android.support.test.espresso.DataInteraction
import android.view.View
import androidx.test.espresso.DataInteraction
import com.agoda.kakao.common.builders.ViewBuilder
import com.agoda.kakao.common.views.KBaseView
import com.agoda.kakao.text.TextViewAssertions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

package com.agoda.kakao.common.actions

import android.support.test.espresso.ViewAction
import android.support.test.espresso.ViewInteraction
import android.support.test.espresso.action.*
import android.view.InputDevice
import android.view.MotionEvent
import android.view.View
import androidx.test.espresso.ViewAction
import androidx.test.espresso.ViewInteraction
import androidx.test.espresso.action.*
import com.agoda.kakao.common.builders.ViewBuilder
import org.hamcrest.Matcher

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

package com.agoda.kakao.common.actions

import android.support.test.espresso.action.ViewActions
import androidx.test.espresso.action.ViewActions

/**
* Provides swipe actions for views
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

package com.agoda.kakao.common.assertions

import android.support.test.espresso.ViewInteraction
import androidx.test.espresso.ViewInteraction

/**
* Provides assertions for view with adapters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

package com.agoda.kakao.common.assertions

import android.support.annotation.ColorRes
import android.support.test.espresso.Root
import android.support.test.espresso.ViewAssertion
import android.support.test.espresso.ViewInteraction
import android.support.test.espresso.assertion.ViewAssertions
import android.support.test.espresso.matcher.ViewMatchers
import androidx.annotation.ColorRes
import androidx.test.espresso.Root
import androidx.test.espresso.ViewAssertion
import androidx.test.espresso.ViewInteraction
import androidx.test.espresso.assertion.ViewAssertions
import androidx.test.espresso.matcher.ViewMatchers
import com.agoda.kakao.common.builders.RootBuilder
import com.agoda.kakao.common.builders.ViewBuilder
import com.agoda.kakao.common.matchers.BackgroundColorMatcher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

package com.agoda.kakao.common.builders

import android.support.test.espresso.Root
import android.support.test.espresso.matcher.RootMatchers
import androidx.test.espresso.Root
import androidx.test.espresso.matcher.RootMatchers
import com.agoda.kakao.common.KakaoDslMarker
import org.hamcrest.Matcher
import org.hamcrest.Matchers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ package com.agoda.kakao.common.builders

import android.graphics.Bitmap
import android.graphics.drawable.Drawable
import android.support.annotation.ColorRes
import android.support.annotation.DrawableRes
import android.support.annotation.StringRes
import android.support.test.espresso.Espresso
import android.support.test.espresso.ViewInteraction
import android.support.test.espresso.matcher.ViewMatchers
import android.view.View
import androidx.annotation.ColorRes
import androidx.annotation.DrawableRes
import androidx.annotation.StringRes
import androidx.test.espresso.Espresso
import androidx.test.espresso.ViewInteraction
import androidx.test.espresso.matcher.ViewMatchers
import com.agoda.kakao.common.KakaoDslMarker
import com.agoda.kakao.common.matchers.*
import org.hamcrest.CoreMatchers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

package com.agoda.kakao.common.matchers

import android.support.test.espresso.matcher.BoundedMatcher
import android.view.View
import android.widget.TextView
import androidx.test.espresso.matcher.BoundedMatcher
import org.hamcrest.Description

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ package com.agoda.kakao.common.matchers

import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.support.annotation.ColorRes
import android.support.v4.content.ContextCompat
import android.view.View
import androidx.annotation.ColorRes
import androidx.core.content.ContextCompat
import org.hamcrest.Description
import org.hamcrest.TypeSafeMatcher

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import android.graphics.drawable.BitmapDrawable
import android.graphics.drawable.Drawable
import android.graphics.drawable.StateListDrawable
import android.os.Build
import android.support.annotation.DrawableRes
import android.support.v4.content.ContextCompat
import android.support.v4.graphics.drawable.DrawableCompat
import android.view.View
import android.widget.ImageView
import androidx.annotation.DrawableRes
import androidx.core.content.ContextCompat
import androidx.core.graphics.drawable.DrawableCompat
import org.hamcrest.Description
import org.hamcrest.TypeSafeMatcher

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

package com.agoda.kakao.common.matchers

import android.support.test.espresso.matcher.BoundedMatcher
import android.view.View
import androidx.test.espresso.matcher.BoundedMatcher
import org.hamcrest.Description

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

package com.agoda.kakao.common.matchers

import android.support.test.espresso.matcher.BoundedMatcher
import android.support.v7.widget.RecyclerView
import android.view.View
import androidx.recyclerview.widget.RecyclerView
import androidx.test.espresso.matcher.BoundedMatcher
import org.hamcrest.Description
import org.hamcrest.Matcher

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

package com.agoda.kakao.common.matchers

import android.support.test.espresso.matcher.BoundedMatcher
import android.view.View
import android.widget.ListView
import androidx.test.espresso.matcher.BoundedMatcher
import org.hamcrest.Description

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

package com.agoda.kakao.common.matchers

import android.support.design.widget.NavigationView
import android.support.test.espresso.matcher.BoundedMatcher
import android.view.View
import androidx.test.espresso.matcher.BoundedMatcher
import com.google.android.material.navigation.NavigationView
import org.hamcrest.Description

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

package com.agoda.kakao.common.matchers

import android.support.test.espresso.matcher.BoundedMatcher
import android.support.v4.view.ViewPager
import android.view.View
import androidx.test.espresso.matcher.BoundedMatcher
import androidx.viewpager.widget.ViewPager
import org.hamcrest.Description

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

package com.agoda.kakao.common.matchers

import android.support.test.espresso.matcher.BoundedMatcher
import android.support.v7.widget.RecyclerView
import android.view.View
import androidx.recyclerview.widget.RecyclerView
import androidx.test.espresso.matcher.BoundedMatcher
import org.hamcrest.Description
import org.hamcrest.Matcher

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

package com.agoda.kakao.common.matchers

import android.support.test.espresso.matcher.BoundedMatcher
import android.view.View
import android.widget.ProgressBar
import androidx.test.espresso.matcher.BoundedMatcher
import org.hamcrest.Description

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

package com.agoda.kakao.common.matchers

import android.support.test.espresso.matcher.BoundedMatcher
import android.view.View
import android.widget.RatingBar
import androidx.test.espresso.matcher.BoundedMatcher
import org.hamcrest.Description

/**
Expand Down
Loading

0 comments on commit 6447eaa

Please sign in to comment.