Skip to content

Commit b7b4861

Browse files
stuartmorgan-gandroidseb
authored andcommitted
[pigeon] Unify iOS and macOS test plugins (flutter#9100)
Updates the iOS and macOS test plugin harnesses to use shared darwin source support, so that we don't have two copies of everything. This will reduce the complexity of maintaining/updating the test harnesses going forward.
1 parent a2614cd commit b7b4861

33 files changed

+54
-21931
lines changed

packages/pigeon/platform_tests/alternate_language_test_plugin/macos/Classes/.gitignore renamed to packages/pigeon/platform_tests/alternate_language_test_plugin/darwin/Classes/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# TODO(stuartmorgan): Remove this once more of the files that macOS doesn't
1+
# TODO(stuartmorgan): Remove this once more of the files that iOS/macOS don't
22
# use have been eliminated via test consolidation.
33
*.gen.h
44
*.gen.m
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
#if TARGET_OS_OSX
56
#import <FlutterMacOS/FlutterMacOS.h>
7+
#else
8+
#import <Flutter/Flutter.h>
9+
#endif
610

711
#import "CoreTests.gen.h"
812

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ A plugin to test Pigeon generation for secondary languages (e.g., Java, Objectiv
1515
s.source = { :http => 'https://github.com/flutter/packages/tree/main/packages/pigeon' }
1616
s.source_files = 'Classes/**/*'
1717
s.public_header_files = 'Classes/**/*.h'
18-
s.dependency 'Flutter'
19-
s.platform = :ios, '12.0'
18+
s.ios.dependency 'Flutter'
19+
s.osx.dependency 'FlutterMacOS'
20+
s.ios.deployment_target = '12.0'
21+
s.osx.deployment_target = '10.14'
2022
s.xcconfig = {
2123
'LIBRARY_SEARCH_PATHS' => '$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)/ $(SDKROOT)/usr/lib/swift',
2224
'LD_RUNPATH_SEARCH_PATHS' => '/usr/lib/swift',
2325
}
24-
25-
# Flutter.framework does not contain a i386 slice.
26-
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
26+
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
27+
s.swift_version = '5.0'
2728
end

packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Assets/.gitkeep

Whitespace-only changes.

packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/.gitignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/AlternateLanguageTestPlugin.h

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)