From e2fbabfc26e3321d91f8d668c948d8216ade9b99 Mon Sep 17 00:00:00 2001 From: Oguz Kocer Date: Wed, 6 Jul 2022 13:31:09 -0400 Subject: [PATCH 1/4] Update our dependencies to AGP 7.2.1 PRs --- build.gradle | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index f95deae0134..4a50519aab8 100644 --- a/build.gradle +++ b/build.gradle @@ -82,7 +82,7 @@ tasks.register("installGitHooks", Copy) { } ext { - fluxCVersion = '1.45.1' + fluxCVersion = '2454-3457772fa66619f4e33ac7bb318c49fc4540500a' glideVersion = '4.13.2' coilVersion = '2.1.0' constraintLayoutVersion = '1.2.0' @@ -98,10 +98,10 @@ ext { appCompatVersion = '1.4.1' materialVersion = '1.6.1' hiltJetpackVersion = '1.0.0' - wordPressUtilsVersion = "2.3.0" - mediapickerVersion = 'trunk-d0db2634cf27511bec3ef9b837f9cfe27c5ab601' - wordPressLoginVersion = '0.13.0' - aboutAutomatticVersion = '0.0.4' + wordPressUtilsVersion = '107-a37619ac2b7703becf2554d31c09c6487c04b56f' + mediapickerVersion = '57-30f4f719646c29893f58f75a96dfb28d3e25bb68' + wordPressLoginVersion = '86-9966060c0483344c699636ee53def4bcd3603c65' + aboutAutomatticVersion = '36-e6c8e93e564a857b3c1dd3d2588a0114c36fad40' // Compose and its module versions need to be consistent with each other (for example 'compose-theme-adapter') composeVersion = "1.1.1" From 3a184cc889e6651dc3aae04a91e747372351842d Mon Sep 17 00:00:00 2001 From: Oguz Kocer Date: Thu, 7 Jul 2022 12:13:03 -0400 Subject: [PATCH 2/4] Update our dependencies to AGP 7.2.1 tagged version --- build.gradle | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 4a50519aab8..e72a924e009 100644 --- a/build.gradle +++ b/build.gradle @@ -82,7 +82,7 @@ tasks.register("installGitHooks", Copy) { } ext { - fluxCVersion = '2454-3457772fa66619f4e33ac7bb318c49fc4540500a' + fluxCVersion = 'trunk-f44a381615f6d850e9c95071469424fbde6daff8' glideVersion = '4.13.2' coilVersion = '2.1.0' constraintLayoutVersion = '1.2.0' @@ -98,10 +98,10 @@ ext { appCompatVersion = '1.4.1' materialVersion = '1.6.1' hiltJetpackVersion = '1.0.0' - wordPressUtilsVersion = '107-a37619ac2b7703becf2554d31c09c6487c04b56f' - mediapickerVersion = '57-30f4f719646c29893f58f75a96dfb28d3e25bb68' - wordPressLoginVersion = '86-9966060c0483344c699636ee53def4bcd3603c65' - aboutAutomatticVersion = '36-e6c8e93e564a857b3c1dd3d2588a0114c36fad40' + wordPressUtilsVersion = '2.6.0' + mediapickerVersion = '0.1.0' + wordPressLoginVersion = '0.15.0' + aboutAutomatticVersion = '0.0.6' // Compose and its module versions need to be consistent with each other (for example 'compose-theme-adapter') composeVersion = "1.1.1" From 339adad246527e45b0213c162d2111e30277fe54 Mon Sep 17 00:00:00 2001 From: Oguz Kocer Date: Thu, 7 Jul 2022 14:06:23 -0400 Subject: [PATCH 3/4] Exclude FluxC from tracks:experimentation dependency --- WooCommerce/build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/WooCommerce/build.gradle b/WooCommerce/build.gradle index 8b386a2bce2..925b218f20e 100644 --- a/WooCommerce/build.gradle +++ b/WooCommerce/build.gradle @@ -204,7 +204,9 @@ dependencies { exclude group: "com.android.support" } - implementation "com.automattic.tracks:experimentation:trunk-f25f5b5e77df8313f19d47d07e7411256d18df79" + implementation("com.automattic.tracks:experimentation:trunk-f25f5b5e77df8313f19d47d07e7411256d18df79") { + exclude group: "org.wordpress", module: "fluxc" + } implementation 'com.automattic:Automattic-Tracks-Android:2.2.0' implementation("${gradle.ext.fluxCBinaryPath}:$fluxCVersion") { From 281c79d437cfe8bb955fda07432b4927549957c0 Mon Sep 17 00:00:00 2001 From: Oguz Kocer Date: Thu, 7 Jul 2022 14:32:45 -0400 Subject: [PATCH 4/4] Adds missing couponsEnabled argument to unit tests --- .../ui/coupons/details/CouponDetailsViewModelTest.kt | 2 +- .../android/util/DefaultCurrencyFormatterTest.kt | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/WooCommerce/src/test/kotlin/com/woocommerce/android/ui/coupons/details/CouponDetailsViewModelTest.kt b/WooCommerce/src/test/kotlin/com/woocommerce/android/ui/coupons/details/CouponDetailsViewModelTest.kt index e7dd3957362..3b9fc3d29d4 100644 --- a/WooCommerce/src/test/kotlin/com/woocommerce/android/ui/coupons/details/CouponDetailsViewModelTest.kt +++ b/WooCommerce/src/test/kotlin/com/woocommerce/android/ui/coupons/details/CouponDetailsViewModelTest.kt @@ -54,7 +54,7 @@ class CouponDetailsViewModelTest : BaseUnitTest() { Result.success(Unit) } private val wooCommerceStore: WooCommerceStore = mock { - on { getSiteSettings(any()) } doReturn WCSettingsModel(0, "USD", LEFT, "", "", 2) + on { getSiteSettings(any()) } doReturn WCSettingsModel(0, "USD", LEFT, "", "", 2, couponsEnabled = false) } private val currencyFormatter: CurrencyFormatter = mock { on { formatCurrency(any(), any(), any()) } doAnswer { it.arguments[0].toString() } diff --git a/WooCommerce/src/test/kotlin/com/woocommerce/android/util/DefaultCurrencyFormatterTest.kt b/WooCommerce/src/test/kotlin/com/woocommerce/android/util/DefaultCurrencyFormatterTest.kt index 25b6f160f00..0b0f4b4993f 100644 --- a/WooCommerce/src/test/kotlin/com/woocommerce/android/util/DefaultCurrencyFormatterTest.kt +++ b/WooCommerce/src/test/kotlin/com/woocommerce/android/util/DefaultCurrencyFormatterTest.kt @@ -83,7 +83,8 @@ class DefaultCurrencyFormatterTest : BaseUnitTest() { currencyPosition = WCSettingsModel.CurrencyPosition.RIGHT_SPACE, currencyThousandSeparator = ",", currencyDecimalSeparator = ".", - currencyDecimalNumber = 2 + currencyDecimalNumber = 2, + couponsEnabled = false ) val secondSettings = firstSettings.copy(currencyCode = "USD") whenever(selectedSite.observe()).thenReturn(sitesFlow) @@ -108,7 +109,8 @@ class DefaultCurrencyFormatterTest : BaseUnitTest() { currencyPosition = WCSettingsModel.CurrencyPosition.RIGHT_SPACE, currencyThousandSeparator = ",", currencyDecimalSeparator = ".", - currencyDecimalNumber = 2 + currencyDecimalNumber = 2, + couponsEnabled = false ) whenever(selectedSite.observe()).thenReturn(sitesFlow) // First time return an error