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

[Dependency Updates] Main Batch - AndroidX Compose/Kotlin (plus Core) #18364

Merged
merged 94 commits into from
May 22, 2023
Merged
Show file tree
Hide file tree
Changes from 90 commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
31aaa11
Build: Update compose compiler and kotlin to 1.3.2 and 1.7.20
ParaskP7 Apr 21, 2023
ba720ac
Analysis: Resolve explicit label name warning for reader post detail
ParaskP7 Apr 21, 2023
5292bf4
Analysis: Suppress same parameter value warning for reader post detail
ParaskP7 Apr 21, 2023
c5b6967
Analysis: Suppress override deprecation warnings
ParaskP7 Apr 21, 2023
496f0c6
Merge pull request #18303 from wordpress-mobile/deps/update-androidx-…
ovitrif Apr 24, 2023
44a65ed
Merge branch 'trunk' of github.com:wordpress-mobile/WordPress-Android…
ParaskP7 Apr 24, 2023
af3a6b9
Merge branch 'trunk' of github.com:wordpress-mobile/WordPress-Android…
ParaskP7 Apr 25, 2023
e293e02
Deps: Remove duplicate compose lifecycle version
ParaskP7 Apr 24, 2023
b9baa52
Deps: Move and group jetpack compose dependencies on a dedicated section
ParaskP7 Apr 24, 2023
299b284
Deps: Migrate to compose bom and use 2023.01.00 update (aka 1.3.3 ish)
ParaskP7 Apr 24, 2023
ebd5152
Analysis: Suppress unused material scaffold padding parameter lint warns
ParaskP7 Apr 25, 2023
aebc657
Analysis: Suppress freq. changed state read in composition lint warns
ParaskP7 Apr 25, 2023
a4a51f8
Merge pull request #18319 from wordpress-mobile/deps/update-androidx-…
ovitrif Apr 26, 2023
adc93ae
Merge branch 'trunk' of github.com:wordpress-mobile/WordPress-Android…
ParaskP7 Apr 26, 2023
aa987a2
Deps: Update coil to 2.0.0 (major)
ParaskP7 Apr 26, 2023
eecdefc
Fix: Remove unsupported placeholders and errors from coil's async image
ParaskP7 Apr 26, 2023
98c3879
Refactor: Optimize imports on user avatar image
ParaskP7 Apr 26, 2023
93bd640
Deps: Update coil to 2.2.2
ParaskP7 Apr 26, 2023
b2dbac6
Add error placeholders to migration screen async images
ovitrif May 2, 2023
b17a3c9
Merge pull request #18326 from wordpress-mobile/deps/update-coil-to-2…
ovitrif May 2, 2023
020cdc8
Merge branch 'trunk' of github.com:wordpress-mobile/WordPress-Android…
ParaskP7 May 2, 2023
7904c2f
Deps: Update androidx recyclerview to 1.3.0
ParaskP7 Apr 27, 2023
bce8e5a
Fix: Remove manual jetpack compose interop config for recyclerview
ParaskP7 Apr 27, 2023
fac613b
Deps: Update dagger to 2.45
ParaskP7 Apr 28, 2023
01f8560
Build: Update compose compiler and kotlin to 1.4.6 and 1.8.20
ParaskP7 Apr 28, 2023
539564a
Analysis: Resolve companion object of enum class uninitialized warning
ParaskP7 Apr 28, 2023
b30e472
Analysis: Resolve composable naming lint warnings
ParaskP7 Apr 28, 2023
c4a39dc
Analysis: Resolve use support action bar lint warning
ParaskP7 Apr 28, 2023
39baa12
Analysis: Suppress animation set start and recycle related lint warnings
ParaskP7 Apr 28, 2023
2ec7fa0
Merge pull request #18330 from wordpress-mobile/deps/update-androidx-…
ovitrif May 2, 2023
261ffad
Merge pull request #18338 from wordpress-mobile/deps/update-androidx-…
ovitrif May 2, 2023
1237257
Merge branch 'deps/main-batch-androidx-compose-kotlin' into deps/upda…
ovitrif May 2, 2023
3859a8b
Merge pull request #18336 from wordpress-mobile/deps/update-dagger-to…
ovitrif May 2, 2023
f4c8b76
Merge branch 'trunk' of github.com:wordpress-mobile/WordPress-Android…
ParaskP7 May 3, 2023
26b877c
Merge branch 'trunk' of github.com:wordpress-mobile/WordPress-Android…
ParaskP7 May 4, 2023
6832147
Deps: Update androidx arch core to 2.2.0
ParaskP7 May 2, 2023
58fbb5c
Deps: Update androidx lifecycle to 2.6.1
ParaskP7 May 2, 2023
dc5e9d6
Fix: Resolve main unresolved reference transformations errors
ParaskP7 May 3, 2023
3bf46c2
Refactor: Rename live data utils map extension function to map safe
ParaskP7 May 3, 2023
7aaa7ff
Fix: Resolve live data utils unresolved reference transformations error
ParaskP7 May 3, 2023
7c67445
Fix: Resolve main unresolved reference transformations errors
ParaskP7 May 3, 2023
0d9a394
Analysis: Suppress launch when started lifecycle scope warnings
ParaskP7 May 3, 2023
56240f0
Analysis: Resolve unnecessary safe call type warnings
ParaskP7 May 3, 2023
1c1d7b9
Analysis: Resolve type mismatch null vs non-null test type warnings
ParaskP7 May 3, 2023
987afe2
Test: Fix captor capture must not be null test failures
ParaskP7 May 3, 2023
5b4631e
Fix: Resolve lateinit property lifecycle registry not init crashes
ParaskP7 May 3, 2023
3a1a8c1
Analysis: Suppress leaking this in constructor of non-final class warn
ParaskP7 May 3, 2023
d7ef921
Fix: Resolve parameter specified as non-null is null crashes
ParaskP7 May 3, 2023
a452aaf
Analysis: Replace anonymous classes with lambda for wp web view activity
ParaskP7 May 3, 2023
264a523
Analysis: Resolve unnecessary safe call type warning on pages fragment
ParaskP7 May 4, 2023
5d66af8
Deps: Update androidx core to 1.9.0
ParaskP7 May 4, 2023
028cdbd
Analysis: Suppress animation set start and recycle related lint warnings
ParaskP7 May 4, 2023
af7d13f
Deps: Update androidx core to 1.10.0
ParaskP7 May 4, 2023
03e1cbd
Deps: Add androidx core transitively used dependencies on image editor
ParaskP7 May 4, 2023
e6f934d
Refactor: Replace custom intent, bundle and parcel code with official
ParaskP7 May 4, 2023
1696d98
Docs: Add various group sections to compat extensions
ParaskP7 May 4, 2023
49bf955
Deps: Update androidx activity to 1.6.1
ParaskP7 May 4, 2023
f55fdb7
Deps: Update androidx activity to 1.7.1
ParaskP7 May 4, 2023
4139786
Analysis: Resolve fragment back pressed callback lint warnings
ParaskP7 May 4, 2023
0e5e1f9
Deps: Update androidx fragment to 1.5.7
ParaskP7 May 4, 2023
f8fc992
Deps: Update androidx appcompat to 1.5.1
ParaskP7 May 4, 2023
4d9983d
Deps: Update androidx appcompat to 1.6.1
ParaskP7 May 4, 2023
cf3dada
Test: Fix param. observer specified as non-null is null ui test failure
ParaskP7 May 5, 2023
fa9b3ab
Build: Update sentry plugin to 3.5.0
ParaskP7 May 5, 2023
34b326f
Merge pull request #18366 from wordpress-mobile/deps/main-batch-andro…
ParaskP7 May 8, 2023
cadd23c
Merge branch 'trunk' of github.com:wordpress-mobile/WordPress-Android…
ParaskP7 May 8, 2023
39e0dff
Deps: Update compose bom to 2023.05.00 (aka 1.4.3)
ParaskP7 May 5, 2023
25aa21a
Analysis: Resolve composable naming lint warning on loaded state
ParaskP7 May 5, 2023
751baba
Build: Update compose compiler and kotlin to 1.4.7 and 1.8.21
ParaskP7 May 5, 2023
5a06038
Deps: Update dagger to 2.46
ParaskP7 May 5, 2023
eefb94b
Deps: Update coil to 2.3.0
ParaskP7 May 5, 2023
3b015dd
Refactor: Change live data utils map nullable mapper lambda signature
ParaskP7 May 5, 2023
1ffcff7
Merge pull request #18378 from wordpress-mobile/deps/update-androidx-…
ovitrif May 8, 2023
4093a03
Merge branch 'trunk' into deps/main-batch-androidx-compose-kotlin
ovitrif May 8, 2023
42e41cb
Merge remote-tracking branch 'origin/deps/main-batch-androidx-compose…
ovitrif May 8, 2023
da4faa2
Merge pull request #18379 from wordpress-mobile/deps/update-androidx-…
ParaskP7 May 8, 2023
e86ce06
Merge branch 'trunk' of github.com:wordpress-mobile/WordPress-Android…
ParaskP7 May 8, 2023
a6842a3
Removed an unused import.
pachlava May 9, 2023
8e21e8c
Restored the teardowns in Login and Signup tests.
pachlava May 9, 2023
12c0b63
Merge branch 'trunk' of github.com:wordpress-mobile/WordPress-Android…
ParaskP7 May 11, 2023
914671a
Deps: Update compose bom to 2023.05.01 (aka 1.4.3)
ParaskP7 May 11, 2023
8f40d10
Test: Ignore e2e send button enabled when text is entered ui test
ParaskP7 May 11, 2023
bb80c9c
Test: Force strictly androidx test espresso version (aka 3.4.0)
ParaskP7 May 11, 2023
b235758
Revert "Test: Ignore e2e send button enabled when text is entered ui …
ParaskP7 May 11, 2023
f0cd20e
Revert "Restored the teardowns in Login and Signup tests."
pachlava May 11, 2023
774e2cb
Merge branch 'trunk' of github.com:wordpress-mobile/WordPress-Android…
ParaskP7 May 12, 2023
4921c06
Merge branch 'trunk' of github.com:wordpress-mobile/WordPress-Android…
ParaskP7 May 15, 2023
5341e3f
Deps: Update dagger to 2.46.1
ParaskP7 May 15, 2023
718792e
Merge branch 'trunk' of github.com:wordpress-mobile/WordPress-Android…
ParaskP7 May 16, 2023
81163ba
Merge branch 'trunk' of github.com:wordpress-mobile/WordPress-Android…
ParaskP7 May 17, 2023
c0c964a
Merge branch 'trunk' of github.com:wordpress-mobile/WordPress-Android…
ParaskP7 May 19, 2023
e4dee91
Analysis: Resolve composable naming lint warnings
ParaskP7 May 19, 2023
8a18cdf
Merge branch 'trunk' of github.com:wordpress-mobile/WordPress-Android…
ParaskP7 May 22, 2023
63d1e6c
Analysis: Resolve composable naming lint warnings (v2)
ParaskP7 May 22, 2023
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
57 changes: 38 additions & 19 deletions WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -373,10 +373,6 @@ dependencies {
}
implementation "org.wordpress:persistentedittext:$wordPressPersistentEditTextVersion"

// To enable Android Studio specific features for Jetpack Compose.
debugImplementation "androidx.compose.ui:ui-test-manifest:$androidxComposeVersion"
debugImplementation "androidx.compose.ui:ui-tooling:$androidxComposeVersion"
implementation "androidx.compose.ui:ui-tooling-preview:$androidxComposeVersion"
// To enable Stetho, a debug bridge that enables the Chrome Developer Tools for debug purposes.
debugImplementation "com.facebook.stetho:stetho:$stethoVersion"
debugImplementation "com.facebook.stetho:stetho-okhttp3:$stethoVersion"
Expand Down Expand Up @@ -405,7 +401,6 @@ dependencies {
implementation "androidx.work:work-runtime:$androidxWorkManagerVersion"
implementation "androidx.work:work-runtime-ktx:$androidxWorkManagerVersion"
implementation "androidx.constraintlayout:constraintlayout:$androidxConstraintlayoutVersion"
implementation "androidx.constraintlayout:constraintlayout-compose:$androidxConstraintlayoutComposeVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel:$androidxLifecycleVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$androidxLifecycleVersion"
implementation "androidx.lifecycle:lifecycle-livedata-core:$androidxLifecycleVersion"
Expand All @@ -426,7 +421,6 @@ dependencies {
implementation "com.squareup.retrofit2:retrofit:$squareupRetrofitVersion"
implementation "org.apache.commons:commons-text:$apacheCommonsTextVersion"
implementation "com.airbnb.android:lottie:$lottieVersion"
implementation "com.airbnb.android:lottie-compose:$lottieVersion"
implementation "com.facebook.shimmer:shimmer:$facebookShimmerVersion"
implementation ("com.github.yalantis:ucrop:$uCropVersion") {
exclude group: 'androidx.core', module: 'core'
Expand All @@ -436,17 +430,6 @@ dependencies {
implementation "com.github.bumptech.glide:glide:$glideVersion"
kapt "com.github.bumptech.glide:compiler:$glideVersion"
implementation "com.github.bumptech.glide:volley-integration:$glideVolleyVersion"
implementation "androidx.compose.runtime:runtime:$androidxComposeVersion"
implementation "androidx.compose.runtime:runtime-livedata:$androidxComposeVersion"
implementation "androidx.compose.foundation:foundation:$androidxComposeVersion"
implementation "androidx.compose.foundation:foundation-layout:$androidxComposeVersion"
implementation "androidx.compose.ui:ui:$androidxComposeVersion"
implementation "androidx.compose.ui:ui-graphics:$androidxComposeVersion"
implementation "androidx.compose.ui:ui-text:$androidxComposeVersion"
implementation "androidx.compose.ui:ui-unit:$androidxComposeVersion"
implementation "androidx.compose.material:material:$androidxComposeVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$androidxComposeLifecycleVersion"
implementation "io.coil-kt:coil-compose:$coilComposeVersion"
implementation "com.github.indexos.media-for-mobile:domain:$indexosMediaForMobileVersion"
implementation "com.github.indexos.media-for-mobile:android:$indexosMediaForMobileVersion"
implementation "com.zendesk:support:$zendeskVersion"
Expand Down Expand Up @@ -484,14 +467,24 @@ dependencies {
androidTestImplementation "com.squareup.okhttp3:mockwebserver:$squareupMockWebServerVersion"
androidTestImplementation "androidx.test.uiautomator:uiautomator:$androidxTestUiAutomatorVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxTestEspressoVersion", {
version {
strictly androidxTestEspressoVersion
}
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestImplementation("androidx.test.espresso:espresso-contrib:$androidxTestEspressoVersion") {
version {
strictly androidxTestEspressoVersion
}
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude module: 'recyclerview-v7'
}
androidTestImplementation "androidx.test.espresso:espresso-accessibility:$androidxTestEspressoVersion"
androidTestImplementation("androidx.test.espresso:espresso-accessibility:$androidxTestEspressoVersion") {
version {
strictly androidxTestEspressoVersion
}
}
androidTestImplementation("com.github.tomakehurst:wiremock:$wiremockVersion") {
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
exclude group: 'org.apache.commons', module: 'commons-lang3'
Expand All @@ -509,10 +502,36 @@ dependencies {
androidTestImplementation "androidx.work:work-testing:$androidxWorkManagerVersion"
androidTestImplementation "com.google.dagger:hilt-android-testing:$gradle.ext.daggerVersion"
kaptAndroidTest "com.google.dagger:hilt-android-compiler:$gradle.ext.daggerVersion"
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$androidxComposeVersion"
// Enables Java 8+ API desugaring support
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:$androidDesugarVersion"
lintChecks "org.wordpress:lint:$wordPressLintVersion"

// Jetpack Compose
def composeBom = platform("androidx.compose:compose-bom:$androidxComposeBomVersion")
implementation(composeBom)
androidTestImplementation(composeBom)
// - Jetpack Compose - Android Studio
debugImplementation "androidx.compose.ui:ui-test-manifest"
debugImplementation "androidx.compose.ui:ui-tooling"
// - Jetpack Compose - Main
implementation "androidx.compose.runtime:runtime"
implementation "androidx.compose.runtime:runtime-livedata"
implementation "androidx.compose.foundation:foundation"
implementation "androidx.compose.foundation:foundation-layout"
implementation "androidx.compose.ui:ui"
implementation "androidx.compose.ui:ui-graphics"
implementation "androidx.compose.ui:ui-text"
implementation "androidx.compose.ui:ui-unit"
implementation "androidx.compose.ui:ui-tooling-preview"
implementation "androidx.compose.material:material"
// - Jetpack Compose - AndroidX
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$androidxLifecycleVersion"
implementation "androidx.constraintlayout:constraintlayout-compose:$androidxConstraintlayoutComposeVersion"
// - Jetpack Compose - Other
implementation "io.coil-kt:coil-compose:$coilComposeVersion"
implementation "com.airbnb.android:lottie-compose:$lottieVersion"
// - Jetpack Compose - UI Tests
androidTestImplementation "androidx.compose.ui:ui-test-junit4"
}

configurations.all {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,17 @@ public class UserAgentTest {
public InitializationRule initRule = new InitializationRule();

@Test
public void testGetDefaultUserAgent() {
String defaultUserAgent = WordPress.getDefaultUserAgent();
assertNotNull("Default User-Agent must be set", defaultUserAgent);
assertTrue("Default User-Agent must not be an empty string", defaultUserAgent.length() > 0);
assertFalse("Default User-Agent must not contain app name", defaultUserAgent.contains(USER_AGENT_APPNAME));
}

@Test
public void testGetUserAgent() {
public void testGetUserAgentAndGetDefaultUserAgent() {
String userAgent = WordPress.getUserAgent();
assertNotNull("User-Agent must be set", userAgent);
assertTrue("User-Agent must not be an empty string", userAgent.length() > 0);
assertTrue("User-Agent must contain app name substring", userAgent.contains(USER_AGENT_APPNAME));

String defaultUserAgent = WordPress.getDefaultUserAgent();
assertNotNull("Default User-Agent must be set", defaultUserAgent);
assertTrue("Default User-Agent must not be an empty string", defaultUserAgent.length() > 0);
assertFalse("Default User-Agent must not contain app name", defaultUserAgent.contains(USER_AGENT_APPNAME));

assertTrue("User-Agent must be derived from default User-Agent", userAgent.contains(defaultUserAgent));
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.wordpress.android.e2e

import dagger.hilt.android.testing.HiltAndroidTest
import org.junit.After
import org.junit.Before
import org.junit.Test
import org.wordpress.android.BuildConfig
Expand Down
Loading