From 454970cd181bb99303d1f04a06dff7f12490439e Mon Sep 17 00:00:00 2001 From: Bartek Pacia Date: Thu, 9 Nov 2023 13:52:59 +0100 Subject: [PATCH] use latest Flutter master on CI ktlint format --- .github/workflows/patrol-prepare.yaml | 3 ++- .github/workflows/patrol_cli-prepare.yaml | 4 +++- .github/workflows/patrol_devtools_extension-prepare.yaml | 4 +++- .github/workflows/patrol_finders-prepare.yaml | 4 +++- .../src/main/kotlin/pl/leancode/patrol/Automator.kt | 2 +- .../src/main/kotlin/pl/leancode/patrol/AutomatorServer.kt | 4 ++-- .../src/main/kotlin/pl/leancode/patrol/UITreeUtils.kt | 8 +++++--- 7 files changed, 19 insertions(+), 10 deletions(-) diff --git a/.github/workflows/patrol-prepare.yaml b/.github/workflows/patrol-prepare.yaml index 6b669996d..c4ee92f95 100644 --- a/.github/workflows/patrol-prepare.yaml +++ b/.github/workflows/patrol-prepare.yaml @@ -27,7 +27,8 @@ jobs: - name: Set up Flutter uses: subosito/flutter-action@v2 with: - flutter-version: '3.13.x' + flutter-version: '3.17.0-5.0.pre.20' + channel: master - name: Set up Java uses: actions/setup-java@v3 diff --git a/.github/workflows/patrol_cli-prepare.yaml b/.github/workflows/patrol_cli-prepare.yaml index e5af71889..1d56dc4d4 100644 --- a/.github/workflows/patrol_cli-prepare.yaml +++ b/.github/workflows/patrol_cli-prepare.yaml @@ -15,7 +15,8 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest] - flutter-version: ['3.3.x', '3.7.x', '3.10.x', '3.13.x'] + flutter-version: ['3.17.0-5.0.pre.20'] + flutter-channel: ['master'] defaults: run: @@ -29,6 +30,7 @@ jobs: uses: subosito/flutter-action@v2 with: flutter-version: ${{ matrix.flutter-version }} + channel: ${{ matrix.flutter-channel }} - name: Run flutter tool (to dismiss the first run experience) run: flutter diff --git a/.github/workflows/patrol_devtools_extension-prepare.yaml b/.github/workflows/patrol_devtools_extension-prepare.yaml index d29b5e7de..abb0ea0bc 100644 --- a/.github/workflows/patrol_devtools_extension-prepare.yaml +++ b/.github/workflows/patrol_devtools_extension-prepare.yaml @@ -14,7 +14,8 @@ jobs: strategy: fail-fast: false matrix: - flutter-version: ['3.3.x', '3.7.x', '3.10.x', '3.13.x'] + flutter-version: ['3.17.0-5.0.pre.20'] + flutter-channel: ['master'] defaults: run: @@ -28,6 +29,7 @@ jobs: uses: subosito/flutter-action@v2 with: flutter-version: ${{ matrix.flutter-version }} + channel: ${{ matrix.flutter-channel }} - name: flutter pub get run: flutter pub get diff --git a/.github/workflows/patrol_finders-prepare.yaml b/.github/workflows/patrol_finders-prepare.yaml index b9513f64b..dfd92fafb 100644 --- a/.github/workflows/patrol_finders-prepare.yaml +++ b/.github/workflows/patrol_finders-prepare.yaml @@ -14,7 +14,8 @@ jobs: strategy: fail-fast: false matrix: - flutter-version: ['3.3.x', '3.7.x', '3.10.x', '3.13.x'] + flutter-version: ['3.17.0-5.0.pre.20'] + flutter-channel: ['master'] defaults: run: @@ -28,6 +29,7 @@ jobs: uses: subosito/flutter-action@v2 with: flutter-version: ${{ matrix.flutter-version }} + channel: ${{ matrix.flutter-channel }} - name: flutter pub get run: flutter pub get diff --git a/packages/patrol/android/src/main/kotlin/pl/leancode/patrol/Automator.kt b/packages/patrol/android/src/main/kotlin/pl/leancode/patrol/Automator.kt index 0e4fb8e3b..544602259 100644 --- a/packages/patrol/android/src/main/kotlin/pl/leancode/patrol/Automator.kt +++ b/packages/patrol/android/src/main/kotlin/pl/leancode/patrol/Automator.kt @@ -58,7 +58,7 @@ class Automator private constructor() { uiDevice = UiDevice.getInstance(instrumentation) } if (!this::uiAutomation.isInitialized) { - uiAutomation = instrumentation.uiAutomation; + uiAutomation = instrumentation.uiAutomation } } diff --git a/packages/patrol/android/src/main/kotlin/pl/leancode/patrol/AutomatorServer.kt b/packages/patrol/android/src/main/kotlin/pl/leancode/patrol/AutomatorServer.kt index e24e1dfee..c2edb6640 100644 --- a/packages/patrol/android/src/main/kotlin/pl/leancode/patrol/AutomatorServer.kt +++ b/packages/patrol/android/src/main/kotlin/pl/leancode/patrol/AutomatorServer.kt @@ -3,13 +3,13 @@ package pl.leancode.patrol import pl.leancode.patrol.contracts.Contracts.ConfigureRequest import pl.leancode.patrol.contracts.Contracts.DarkModeRequest import pl.leancode.patrol.contracts.Contracts.EnterTextRequest +import pl.leancode.patrol.contracts.Contracts.GetNativeUITreeRequest +import pl.leancode.patrol.contracts.Contracts.GetNativeUITreeRespone import pl.leancode.patrol.contracts.Contracts.GetNativeViewsRequest import pl.leancode.patrol.contracts.Contracts.GetNativeViewsResponse import pl.leancode.patrol.contracts.Contracts.GetNotificationsRequest import pl.leancode.patrol.contracts.Contracts.GetNotificationsResponse import pl.leancode.patrol.contracts.Contracts.HandlePermissionRequest -import pl.leancode.patrol.contracts.Contracts.GetNativeUITreeRespone -import pl.leancode.patrol.contracts.Contracts.GetNativeUITreeRequest import pl.leancode.patrol.contracts.Contracts.HandlePermissionRequestCode import pl.leancode.patrol.contracts.Contracts.OpenAppRequest import pl.leancode.patrol.contracts.Contracts.OpenQuickSettingsRequest diff --git a/packages/patrol/android/src/main/kotlin/pl/leancode/patrol/UITreeUtils.kt b/packages/patrol/android/src/main/kotlin/pl/leancode/patrol/UITreeUtils.kt index 928d77d26..f61da87f3 100644 --- a/packages/patrol/android/src/main/kotlin/pl/leancode/patrol/UITreeUtils.kt +++ b/packages/patrol/android/src/main/kotlin/pl/leancode/patrol/UITreeUtils.kt @@ -27,8 +27,10 @@ private fun getWindowRoots(uiDevice: UiDevice, uiAutomation: UiAutomation): Arra } // Support multi-window searches for API level 21 and up. - val apiLevelActual = (Build.VERSION.SDK_INT - + if ("REL" == Build.VERSION.CODENAME) 0 else 1) + val apiLevelActual = ( + Build.VERSION.SDK_INT + + if ("REL" == Build.VERSION.CODENAME) 0 else 1 + ) if (apiLevelActual >= Build.VERSION_CODES.LOLLIPOP) { for (window in uiAutomation.windows) { val root = window.root @@ -61,4 +63,4 @@ private fun fromUiAccessibilityNodeInfo(obj: AccessibilityNodeInfo): NativeView applicationPackage = obj.packageName?.toString(), children = children ) -} \ No newline at end of file +}