Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
4331c172
Unverified
Commit
4331c172
authored
Oct 04, 2019
by
Jenn Magder
Committed by
GitHub
Oct 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set DEFINES_MODULE=YES in plugin templates (#41828)
parent
f8c75305
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
7 deletions
+79
-7
test.dart
dev/bots/test.dart
+1
-0
plugin_lint_mac.dart
dev/devicelab/bin/tasks/plugin_lint_mac.dart
+69
-0
projectName.podspec.tmpl
..._tools/templates/plugin/ios.tmpl/projectName.podspec.tmpl
+5
-3
projectName.podspec.tmpl
...ools/templates/plugin/macos.tmpl/projectName.podspec.tmpl
+4
-4
No files found.
dev/bots/test.dart
View file @
4331c172
...
...
@@ -881,6 +881,7 @@ Future<void> _runIntegrationTests() async {
await
_runDevicelabTest
(
'flutter_create_offline_test_windows'
);
}
else
if
(
Platform
.
isMacOS
)
{
await
_runDevicelabTest
(
'flutter_create_offline_test_mac'
);
await
_runDevicelabTest
(
'plugin_lint_mac'
);
// TODO(jmagman): Re-enable once flakiness is resolved.
// await _runDevicelabTest('module_test_ios');
}
...
...
dev/devicelab/bin/tasks/plugin_lint_mac.dart
0 → 100644
View file @
4331c172
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:io'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/utils.dart'
;
import
'package:path/path.dart'
as
path
;
/// Tests that the Flutter plugin template works. Use `pod lib lint`
/// to confirm the plugin module can be imported into an app.
Future
<
void
>
main
()
async
{
await
task
(()
async
{
section
(
'Create Objective-C iOS plugin'
);
final
Directory
tempDir
=
Directory
.
systemTemp
.
createTempSync
(
'flutter_plugin_test.'
);
try
{
const
String
objcPluginName
=
'test_plugin_objc'
;
await
inDirectory
(
tempDir
,
()
async
{
await
flutter
(
'create'
,
options:
<
String
>[
'--org'
,
'io.flutter.devicelab'
,
'--template=plugin'
,
'--ios-language=objc'
,
objcPluginName
,
],
);
});
final
String
objcPodspecPath
=
path
.
join
(
tempDir
.
path
,
objcPluginName
,
'ios'
,
'
$objcPluginName
.podspec'
);
section
(
'Lint Objective-C iOS plugin as framework'
);
await
inDirectory
(
tempDir
,
()
async
{
await
exec
(
'pod'
,
<
String
>[
'lib'
,
'lint'
,
objcPodspecPath
,
'--allow-warnings'
,
],
);
});
section
(
'Lint Objective-C iOS plugin as library'
);
await
inDirectory
(
tempDir
,
()
async
{
await
exec
(
'pod'
,
<
String
>[
'lib'
,
'lint'
,
objcPodspecPath
,
'--allow-warnings'
,
'--use-libraries'
,
],
);
});
return
TaskResult
.
success
(
null
);
}
catch
(
e
)
{
return
TaskResult
.
failure
(
e
.
toString
());
}
finally
{
rmTree
(
tempDir
);
}
});
}
packages/flutter_tools/templates/plugin/ios.tmpl/projectName.podspec.tmpl
View file @
4331c172
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint {{projectName}}.podspec' to validate before publishing.
#
Pod::Spec.new do |s|
s.name = '{{projectName}}'
...
...
@@ -15,7 +16,8 @@ Pod::Spec.new do |s|
s.source_files = 'Classes/**/*'
s.public_header_files = 'Classes/**/*.h'
s.dependency 'Flutter'
s.platform = :ios, '8.0'
s.ios.deployment_target = '8.0'
# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
end
packages/flutter_tools/templates/plugin/macos.tmpl/projectName.podspec.tmpl
View file @
4331c172
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint {{projectName}}.podspec' to validate before publishing.
#
Pod::Spec.new do |s|
s.name = '{{projectName}}'
...
...
@@ -15,7 +16,6 @@ Pod::Spec.new do |s|
s.source_files = 'Classes/**/*'
s.dependency 'FlutterMacOS'
s.platform = :osx
s.
osx.deployment_target = '10.11'
s.platform = :osx
, '10.11'
s.
pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment