Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android X migration #825

Merged
merged 25 commits into from
Jul 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4b84387
Able to build with gb-mobile
hypest Jun 6, 2019
794497d
Migrated to AndroidX
hypest Jun 6, 2019
225505e
Migrate demo project to AndroidX
marecar3 Jun 10, 2019
d5a3dfe
Remove space from gradle.properties
marecar3 Jun 10, 2019
580f776
Merge branch 'develop' into experiment/migrate-to-androidx
marecar3 Jun 18, 2019
74d1e51
Declare usage of base, mock libs
hypest Jul 9, 2019
c1c4765
User roboelectric context instead of MockContext
marecar3 Jul 9, 2019
07cba88
Fix wrong hardcoded Espresso path
marecar3 Jul 9, 2019
67b3b63
Fixed failing test
marecar3 Jul 9, 2019
c98945f
Add some sleep
marecar3 Jul 9, 2019
dcffc6c
Use API 28 on CI
marecar3 Jul 9, 2019
d2c5b5a
Add more sleep in tests
marecar3 Jul 9, 2019
9bdc429
Insert sleep into all test cases after text is inserted
marecar3 Jul 9, 2019
c1ce7b8
Added more sleep to testListwithQuoteFormatting
marecar3 Jul 9, 2019
bb0d584
Added sleep to testRetainHeadingFormatting
marecar3 Jul 9, 2019
e65501f
Revert "Fixed failing test"
hypest Jul 10, 2019
18bfeee
Revert "Add some sleep"
hypest Jul 10, 2019
da80336
Revert "Add more sleep in tests"
hypest Jul 10, 2019
de4a19d
Revert "Insert sleep into all test cases after text is inserted"
hypest Jul 10, 2019
573ec29
Revert "Added more sleep to testListwithQuoteFormatting"
hypest Jul 10, 2019
1b49243
Revert "Added sleep to testRetainHeadingFormatting"
hypest Jul 10, 2019
ab6cc3f
Have JitPack use SDK 28 as well
hypest Jul 10, 2019
f80c55a
Increase connected tests timeout to 18mins on Firebase Test Lab
hypest Jul 10, 2019
c8b6362
Update release notes
marecar3 Jul 10, 2019
9d4d2b1
Update README for v1.3.28 release
marecar3 Jul 10, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
Lint:
executor:
name: android/default
api-version: "27"
api-version: "28"
steps:
- checkout
- android/restore-gradle-cache:
Expand All @@ -26,7 +26,7 @@ jobs:
Unit Tests:
executor:
name: android/default
api-version: "27"
api-version: "28"
steps:
- checkout
- android/restore-gradle-cache:
Expand All @@ -40,7 +40,7 @@ jobs:
Connected Tests:
executor:
name: android/default
api-version: "27"
api-version: "28"
steps:
- checkout
- android/restore-gradle-cache:
Expand All @@ -58,7 +58,7 @@ jobs:
test-apk-path: app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
device: model=Nexus5X,version=26,locale=en,orientation=portrait
project: api-project-108380595987
timeout: 10m
timeout: 18m
- android/save-gradle-cache:
cache-prefix: connected-tests

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog
## [1.3.28](https://github.com/wordpress-mobile/AztecEditor-Android/releases/tag/v1.3.28)
### Added
- Added support for AndroidX

## [v1.3.27](https://github.com/wordpress-mobile/AztecEditor-Android/releases/tag/v1.3.27)
### Fixed
- Gutenberg fixes:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ repositories {
```
```gradle
dependencies {
api ('com.github.wordpress-mobile.WordPress-Aztec-Android:aztec:v1.3.27')
api ('com.github.wordpress-mobile.WordPress-Aztec-Android:aztec:v1.3.28')
}
```

Expand Down
12 changes: 6 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 27
compileSdkVersion 28
buildToolsVersion '28.0.3'

defaultConfig {
applicationId "org.wordpress.aztec"
minSdkVersion 16
targetSdkVersion 27
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
}

buildTypes {
Expand Down Expand Up @@ -40,13 +40,13 @@ dependencies {

implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"

implementation "com.android.support:appcompat-v7:$supportLibVersion"
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation "org.wordpress:utils:$wordpressUtilsVersion"

androidTestImplementation "com.android.support.test.espresso:espresso-core:$espressoVersion", {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestImplementation "com.android.support.test.espresso:espresso-intents:$espressoVersion", {
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestImplementation('com.xamarin.testcloud:espresso-support:1.3')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
package org.wordpress.aztec.demo;

import android.support.test.espresso.PerformException;
import android.support.test.espresso.UiController;
import android.support.test.espresso.ViewAction;
import android.support.test.espresso.action.CoordinatesProvider;
import android.support.test.espresso.action.PrecisionDescriber;
import android.support.test.espresso.action.Tap;
import android.support.test.espresso.action.Tapper;
import android.support.test.espresso.util.HumanReadables;
import androidx.test.espresso.PerformException;
import androidx.test.espresso.UiController;
import androidx.test.espresso.ViewAction;
import androidx.test.espresso.action.CoordinatesProvider;
import androidx.test.espresso.action.PrecisionDescriber;
import androidx.test.espresso.action.Tap;
import androidx.test.espresso.action.Tapper;
import androidx.test.espresso.util.HumanReadables;
import android.view.View;
import android.view.ViewConfiguration;
import android.webkit.WebView;

import org.hamcrest.Matcher;

import static android.support.test.espresso.matcher.ViewMatchers.isDisplayingAtLeast;
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayingAtLeast;
import static org.hamcrest.Matchers.allOf;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package org.wordpress.aztec.demo;

import static android.support.test.espresso.matcher.ViewMatchers.isAssignableFrom;
import static android.support.test.espresso.matcher.ViewMatchers.isDescendantOfA;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayingAtLeast;
import static android.support.test.espresso.matcher.ViewMatchers.withEffectiveVisibility;
import static androidx.test.espresso.matcher.ViewMatchers.isAssignableFrom;
import static androidx.test.espresso.matcher.ViewMatchers.isDescendantOfA;
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayingAtLeast;
import static androidx.test.espresso.matcher.ViewMatchers.withEffectiveVisibility;
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.anyOf;

import android.support.test.espresso.PerformException;
import android.support.test.espresso.UiController;
import android.support.test.espresso.ViewAction;
import android.support.test.espresso.matcher.ViewMatchers.Visibility;
import android.support.test.espresso.util.HumanReadables;
import androidx.test.espresso.PerformException;
import androidx.test.espresso.UiController;
import androidx.test.espresso.ViewAction;
import androidx.test.espresso.matcher.ViewMatchers.Visibility;
import androidx.test.espresso.util.HumanReadables;

import android.graphics.Rect;
import android.util.Log;
Expand Down
18 changes: 9 additions & 9 deletions app/src/androidTest/kotlin/org/wordpress/aztec/demo/Actions.kt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package org.wordpress.aztec.demo

import android.graphics.Rect
import android.support.test.espresso.UiController
import android.support.test.espresso.ViewAction
import android.support.test.espresso.action.CoordinatesProvider
import android.support.test.espresso.action.GeneralClickAction
import android.support.test.espresso.action.Press
import android.support.test.espresso.action.Tap
import android.support.test.espresso.matcher.ViewMatchers.isAssignableFrom
import android.support.test.espresso.matcher.ViewMatchers.isClickable
import android.support.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.UiController
import androidx.test.espresso.ViewAction
import androidx.test.espresso.action.CoordinatesProvider
import androidx.test.espresso.action.GeneralClickAction
import androidx.test.espresso.action.Press
import androidx.test.espresso.action.Tap
import androidx.test.espresso.matcher.ViewMatchers.isAssignableFrom
import androidx.test.espresso.matcher.ViewMatchers.isClickable
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import android.view.View
import android.widget.EditText
import org.hamcrest.Matcher
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.wordpress.aztec.demo

import android.support.test.rule.ActivityTestRule
import androidx.test.rule.ActivityTestRule
import org.junit.Before
import org.junit.Rule
import org.wordpress.aztec.AztecText
Expand All @@ -24,4 +24,4 @@ abstract class BaseHistoryTest : BaseTest() {
val aztecText = mActivityTestRule.activity.findViewById<AztecText>(R.id.aztec)
aztecText.history.historyThrottleTime = throttleTime
}
}
}
16 changes: 8 additions & 8 deletions app/src/androidTest/kotlin/org/wordpress/aztec/demo/BasePage.kt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package org.wordpress.aztec.demo

import android.support.test.espresso.ViewAction
import android.support.test.espresso.ViewInteraction
import android.support.test.espresso.action.GeneralLocation
import android.support.test.espresso.action.Press
import android.support.test.espresso.action.Tap
import android.support.test.espresso.action.ViewActions
import android.support.test.espresso.assertion.ViewAssertions.matches
import android.support.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.ViewAction
import androidx.test.espresso.ViewInteraction
import androidx.test.espresso.action.GeneralLocation
import androidx.test.espresso.action.Press
import androidx.test.espresso.action.Tap
import androidx.test.espresso.action.ViewActions
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed

abstract class BasePage {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.wordpress.aztec.demo

import android.support.test.rule.GrantPermissionRule
import android.support.test.runner.AndroidJUnit4
import androidx.test.rule.GrantPermissionRule
import androidx.test.runner.AndroidJUnit4
import com.xamarin.testcloud.espresso.Factory
import com.xamarin.testcloud.espresso.ReportHelper
import org.junit.Before
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package org.wordpress.aztec.demo.pages

import android.support.test.espresso.Espresso.onView
import android.support.test.espresso.ViewInteraction
import android.support.test.espresso.action.ViewActions
import android.support.test.espresso.action.ViewActions.click
import android.support.test.espresso.action.ViewActions.replaceText
import android.support.test.espresso.assertion.ViewAssertions
import android.support.test.espresso.matcher.ViewMatchers.withId
import android.support.test.espresso.matcher.ViewMatchers.withText
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.ViewInteraction
import androidx.test.espresso.action.ViewActions
import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.action.ViewActions.replaceText
import androidx.test.espresso.assertion.ViewAssertions
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.espresso.matcher.ViewMatchers.withText
import org.wordpress.aztec.demo.BasePage
import org.wordpress.aztec.demo.R

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package org.wordpress.aztec.demo.pages

import android.support.test.espresso.DataInteraction
import android.support.test.espresso.Espresso.onData
import android.support.test.espresso.Espresso.onView
import android.support.test.espresso.ViewInteraction
import android.support.test.espresso.action.ViewActions
import android.support.test.espresso.action.ViewActions.click
import android.support.test.espresso.action.ViewActions.pressKey
import android.support.test.espresso.action.ViewActions.typeText
import android.support.test.espresso.action.ViewActions.typeTextIntoFocusedView
import android.support.test.espresso.assertion.ViewAssertions.matches
import android.support.test.espresso.matcher.ViewMatchers.withId
import android.support.test.espresso.matcher.ViewMatchers.withText
import androidx.test.espresso.DataInteraction
import androidx.test.espresso.Espresso.onData
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.ViewInteraction
import androidx.test.espresso.action.ViewActions
import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.action.ViewActions.pressKey
import androidx.test.espresso.action.ViewActions.typeText
import androidx.test.espresso.action.ViewActions.typeTextIntoFocusedView
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.espresso.matcher.ViewMatchers.withText
import android.view.KeyEvent
import android.view.View
import org.hamcrest.Matcher
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.wordpress.aztec.demo.tests

import android.support.test.rule.ActivityTestRule
import androidx.test.rule.ActivityTestRule
import org.junit.Rule
import org.junit.Test
import org.wordpress.aztec.demo.BaseTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.wordpress.aztec.demo.tests

import android.support.test.rule.ActivityTestRule
import androidx.test.rule.ActivityTestRule
import org.junit.Before
import org.junit.Rule
import org.junit.Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import android.content.Intent
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.net.Uri
import android.support.test.espresso.intent.Intents
import android.support.test.espresso.intent.matcher.IntentMatchers
import android.support.test.espresso.intent.rule.IntentsTestRule
import androidx.test.espresso.intent.Intents
import androidx.test.espresso.intent.matcher.IntentMatchers
import androidx.test.espresso.intent.rule.IntentsTestRule
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.wordpress.aztec.demo.tests

import android.support.test.espresso.intent.rule.IntentsTestRule
import androidx.test.espresso.intent.rule.IntentsTestRule
import org.junit.Rule
import org.junit.Test
import org.wordpress.aztec.demo.BaseTest
Expand Down Expand Up @@ -75,4 +75,4 @@ class HtmlAttributeStyleColorTests : BaseTest() {
.toggleHtml()
.verifyHTML(htmlEnd)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import android.content.Intent
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.net.Uri
import android.support.test.espresso.intent.Intents
import android.support.test.espresso.intent.matcher.IntentMatchers
import android.support.test.espresso.intent.rule.IntentsTestRule
import androidx.test.espresso.intent.Intents
import androidx.test.espresso.intent.matcher.IntentMatchers
import androidx.test.espresso.intent.rule.IntentsTestRule
import org.junit.Rule
import org.junit.Test
import org.wordpress.aztec.demo.BaseTest
Expand Down Expand Up @@ -229,4 +229,4 @@ class ImageHistoryTests : BaseTest() {
Intents.intending(IntentMatchers.hasAction(Intent.ACTION_OPEN_DOCUMENT))
.respondWith(Instrumentation.ActivityResult(Activity.RESULT_OK, intent))
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import android.content.Intent
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.net.Uri
import android.support.test.espresso.intent.Intents
import android.support.test.espresso.intent.matcher.IntentMatchers
import android.support.test.espresso.intent.rule.IntentsTestRule
import androidx.test.espresso.intent.Intents
import androidx.test.espresso.intent.matcher.IntentMatchers
import androidx.test.espresso.intent.rule.IntentsTestRule
import org.junit.Rule
import org.junit.Test
import org.wordpress.aztec.demo.BaseTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.wordpress.aztec.demo.tests

import android.support.test.espresso.intent.rule.IntentsTestRule
import androidx.test.espresso.intent.rule.IntentsTestRule
import org.junit.Rule
import org.junit.Test
import org.wordpress.aztec.demo.BaseTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.wordpress.aztec.demo.tests

import android.support.test.rule.ActivityTestRule
import androidx.test.rule.ActivityTestRule
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.wordpress.aztec.demo.tests

import android.support.test.rule.ActivityTestRule
import androidx.test.rule.ActivityTestRule
import org.junit.Before
import org.junit.Rule
import org.junit.Test
Expand Down Expand Up @@ -38,4 +38,4 @@ class ParagraphFormattingTests : BaseTest() {
.toggleHtml()
.verifyHTML(html)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.wordpress.aztec.demo.tests

import android.support.test.rule.ActivityTestRule
import androidx.test.rule.ActivityTestRule
import org.junit.Rule
import org.junit.Test
import org.wordpress.aztec.demo.BaseTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.wordpress.aztec.demo.tests

import android.support.test.espresso.matcher.ViewMatchers.isChecked
import android.support.test.espresso.matcher.ViewMatchers.isNotChecked
import android.support.test.rule.ActivityTestRule
import androidx.test.espresso.matcher.ViewMatchers.isChecked
import androidx.test.espresso.matcher.ViewMatchers.isNotChecked
import androidx.test.rule.ActivityTestRule
import org.junit.Rule
import org.junit.Test
import org.wordpress.aztec.demo.BaseTest
Expand Down
Loading