Skip to content

Commit 674ff15

Browse files
authored
[macOS] Add platform_channel sample/test (#123141)
Adds a macOS implementation of the platform_channel example, demonstrating method channels and event channels with a battery power plugin. Adds platform_channel_sample_test_macos macOS host test to verify the sample works. Issue: flutter/flutter#79204
1 parent 28d40a4 commit 674ff15

24 files changed

+1477
-0
lines changed

.ci.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2972,6 +2972,20 @@ targets:
29722972
]
29732973
task_name: platform_view_macos__start_up
29742974

2975+
- name: Mac platform_channel_sample_test_macos
2976+
bringup: true
2977+
recipe: devicelab/devicelab_drone
2978+
presubmit: false
2979+
timeout: 60
2980+
properties:
2981+
dependencies: >-
2982+
[
2983+
{"dependency": "xcode", "version": "14a5294e"}
2984+
]
2985+
tags: >
2986+
["devicelab", "hostonly", "mac"]
2987+
task_name: platform_channel_sample_test_macos
2988+
29752989
- name: Mac plugin_dependencies_test
29762990
recipe: devicelab/devicelab_drone
29772991
timeout: 60

TESTOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@
250250
/dev/devicelab/bin/tasks/module_test.dart @zanderso @flutter/tool
251251
/dev/devicelab/bin/tasks/module_test_ios.dart @jmagman @flutter/tool
252252
/dev/devicelab/bin/tasks/native_ui_tests_macos.dart @cbracken @flutter/desktop
253+
/dev/devicelab/bin/tasks/platform_channel_sample_test_macos.dart @cbracken @flutter/desktop
253254
/dev/devicelab/bin/tasks/platform_channel_sample_test_windows.dart @cbracken @flutter/desktop
254255
/dev/devicelab/bin/tasks/platform_view_macos__start_up.dart @a-wallen @flutter/desktop
255256
/dev/devicelab/bin/tasks/platform_view_win_desktop__start_up.dart @yaakovschectman @flutter/desktop
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright 2014 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
import 'package:flutter_devicelab/framework/framework.dart';
6+
import 'package:flutter_devicelab/tasks/integration_tests.dart';
7+
8+
Future<void> main() async {
9+
await task(createPlatformChannelSampleTest(deviceIdOverride: 'macos'));
10+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Flutter-related
2+
**/Flutter/ephemeral/
3+
**/Pods/
4+
5+
# Xcode-related
6+
**/dgph
7+
**/xcuserdata/
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "ephemeral/Flutter-Generated.xcconfig"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "ephemeral/Flutter-Generated.xcconfig"

0 commit comments

Comments
 (0)