Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Commit 0ce4d95

Browse files
author
Alejo
committed
Merge remote-tracking branch 'origin/trunk' into issue/11794-fetch-single-order-sync
2 parents 054015f + 94d25d3 commit 0ce4d95

File tree

43 files changed

+421
-105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+421
-105
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/buildkite/pipeline-schema/main/schema.json
2+
---
3+
4+
agents:
5+
queue: "android"
6+
7+
steps:
8+
- label: "dependency analysis"
9+
command: |
10+
echo "--- 📊 Analyzing"
11+
cp gradle.properties-example gradle.properties && cp -a example/properties-example/ example/properties/
12+
./gradlew buildHealth
13+
plugins: [$CI_TOOLKIT]
14+
artifact_paths:
15+
- "build/reports/dependency-analysis/build-health-report.*"
16+
notify:
17+
- slack: "#android-core-notifs"
18+
if: build.state == "failed"

build.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
13
plugins {
24
// Those declarations are just a workaround for a false-positive Kotlin Gradle Plugin warning
35
// https://youtrack.jetbrains.com/issue/KT-46200
@@ -8,6 +10,7 @@ plugins {
810
alias(sharedLibs.plugins.kotlin.detekt).apply(false)
911
alias(sharedLibs.plugins.kotlin.jvm).apply(false)
1012
alias(sharedLibs.plugins.kotlin.kapt).apply(false)
13+
alias(sharedLibs.plugins.dependency.analysis)
1114

1215
alias(sharedLibs.plugins.automattic.configure)
1316
}
@@ -57,6 +60,12 @@ allprojects {
5760
parallel = true
5861
debug = false
5962
}
63+
64+
tasks.withType(KotlinCompile).configureEach {
65+
kotlinOptions {
66+
jvmTarget = JavaVersion.VERSION_1_8
67+
}
68+
}
6069
}
6170

6271
ext {

config/detekt/detekt.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ coroutines:
1515
GlobalCoroutineUsage:
1616
active: true
1717

18-
potential-bugs:
19-
MissingWhenCase:
20-
allowElseExpression: false
21-
2218
style:
2319
DataClassShouldBeImmutable:
2420
active: true

example/src/androidTest/java/org/wordpress/android/fluxc/release/utils/ListStoreConnectedTestHelper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ internal class ListStoreConnectedTestHelper(private val listStore: ListStore) {
2525
*
2626
* It uses a default [Lifecycle] instance which will NOT be destroyed throughout the test.
2727
*/
28-
fun <LIST_DESCRIPTOR : ListDescriptor, ITEM_IDENTIFIER, LIST_ITEM> getList(
28+
fun <LIST_DESCRIPTOR : ListDescriptor, ITEM_IDENTIFIER, LIST_ITEM : Any> getList(
2929
listDescriptor: LIST_DESCRIPTOR,
3030
dataSource: ListItemDataSourceInterface<LIST_DESCRIPTOR, ITEM_IDENTIFIER, LIST_ITEM>,
3131
lifecycle: Lifecycle = SimpleTestLifecycle().lifecycle

example/src/main/java/org/wordpress/android/fluxc/example/MainFragment.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,8 @@ class MainFragment : Fragment() {
305305
AuthenticationErrorType.UNSUPPORTED_RESPONSE_TYPE,
306306
AuthenticationErrorType.EMAIL_LOGIN_NOT_ALLOWED,
307307
AuthenticationErrorType.GENERIC_ERROR,
308+
AuthenticationErrorType.NEEDS_SECURITY_KEY -> Unit // Do nothing
309+
AuthenticationErrorType.WEBAUTHN_FAILED -> Unit // Do nothing
308310
null -> {
309311
// Show Toast "Network Error"?
310312
}

example/src/main/java/org/wordpress/android/fluxc/example/ReactNativeFragment.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ class ReactNativeFragment : Fragment() {
8383
AppLog.i(AppLog.T.API, "Request result: ${response.result}")
8484
}
8585
is Error -> prependToLog("Request to '$path' failed: ${response.error.message}")
86+
null -> Unit // Do nothing
8687
}
8788
}
8889
}

example/src/main/java/org/wordpress/android/fluxc/example/di/AppConfigModule.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
import java.lang.reflect.Field;
1717

18+
import javax.inject.Singleton;
19+
1820
import dagger.Module;
1921
import dagger.Provides;
2022

@@ -41,6 +43,7 @@ public AppSecrets provideAppSecrets() {
4143
}
4244

4345
@Provides
46+
@Singleton
4447
public UserAgent provideUserAgent(Context appContext) {
4548
return new UserAgent(appContext, "fluxc-example-android");
4649
}

example/src/main/java/org/wordpress/android/fluxc/example/ui/stats/WooRevenueStatsFragment.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,9 @@ class WooRevenueStatsFragment : StoreSelectingFragment() {
305305
WCStatsAction.FETCH_REVENUE_STATS_AVAILABILITY -> {
306306
prependToLog("Revenue stats available for site ${site?.name}: ${event.availability}")
307307
}
308+
WCStatsAction.FETCH_NEW_VISITOR_STATS -> Unit // Do nothing
309+
WCStatsAction.FETCHED_REVENUE_STATS_AVAILABILITY -> Unit // Do nothing
310+
null -> Unit // Do nothing
308311
}
309312
}
310313

@@ -343,6 +346,9 @@ class WooRevenueStatsFragment : StoreSelectingFragment() {
343346
}
344347
}
345348
}
349+
WCStatsAction.FETCH_REVENUE_STATS_AVAILABILITY -> Unit // Do nothing
350+
WCStatsAction.FETCHED_REVENUE_STATS_AVAILABILITY -> Unit // Do nothing
351+
null -> Unit // Do nothing
346352
}
347353
}
348354
}

example/src/main/java/org/wordpress/android/fluxc/example/ui/wooadmin/WooAdminFragment.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import android.view.LayoutInflater
55
import android.view.View
66
import android.view.ViewGroup
77
import androidx.lifecycle.lifecycleScope
8-
import com.google.gson.Gson
98
import kotlinx.coroutines.launch
109
import org.wordpress.android.fluxc.example.databinding.FragmentWooAdminBinding
1110
import org.wordpress.android.fluxc.example.prependToLog
@@ -16,7 +15,6 @@ import javax.inject.Inject
1615

1716
class WooAdminFragment : StoreSelectingFragment() {
1817
@Inject internal lateinit var wooAdminStore: WooAdminStore
19-
private val gson = Gson()
2018

2119
override fun onCreateView(
2220
inflater: LayoutInflater,

example/src/main/java/org/wordpress/android/fluxc/example/utils/ViewGroupExt.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@ fun ViewGroup.toggleSiteDependentButtons(enabled: Boolean = true) =
1111

1212
fun ViewGroup.childViewsAsSequence(): Sequence<View> =
1313
mutableListOf<View>().apply {
14-
(0 until childCount).forEach { add(getChildAt(it)) }
14+
for (it in 0 until childCount) {
15+
add(getChildAt(it))
16+
}
1517
}.asSequence()

0 commit comments

Comments
 (0)