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
bcef4edf
Unverified
Commit
bcef4edf
authored
Feb 11, 2020
by
Amir Hardon
Committed by
GitHub
Feb 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the template plugin example depend on the plugin as a real dependency (#50485)
parent
bf551a31
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
5 deletions
+25
-5
pubspec.yaml.tmpl
packages/flutter_tools/templates/app/pubspec.yaml.tmpl
+5
-5
create_test.dart
...tter_tools/test/commands.shard/permeable/create_test.dart
+20
-0
No files found.
packages/flutter_tools/templates/app/pubspec.yaml.tmpl
View file @
bcef4edf
...
...
@@ -25,6 +25,11 @@ dependencies:
flutter:
sdk: flutter
{{#withPluginHook}}
{{pluginProjectName}}:
path: ../
{{/withPluginHook}}
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
...
...
@@ -38,11 +43,6 @@ dev_dependencies:
test: 1.9.4
{{/withDriverTest}}
{{#withPluginHook}}
{{pluginProjectName}}:
path: ../
{{/withPluginHook}}
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
...
...
packages/flutter_tools/test/commands.shard/permeable/create_test.dart
View file @
bcef4edf
...
...
@@ -23,6 +23,7 @@ import 'package:flutter_tools/src/globals.dart' as globals;
import
'package:mockito/mockito.dart'
;
import
'package:process/process.dart'
;
import
'package:pubspec_parse/pubspec_parse.dart'
;
import
'../../src/common.dart'
;
import
'../../src/context.dart'
;
...
...
@@ -325,6 +326,25 @@ void main() {
Pub:
()
=>
const
Pub
(),
});
testUsingContext
(
'plugin example app depends on plugin'
,
()
async
{
await
_createProject
(
projectDir
,
<
String
>[
'--template=plugin'
,
'-i'
,
'objc'
,
'-a'
,
'java'
],
<
String
>[
'example/pubspec.yaml'
,
],
);
final
String
rawPubspec
=
await
projectDir
.
childDirectory
(
'example'
).
childFile
(
'pubspec.yaml'
).
readAsString
();
final
Pubspec
pubspec
=
Pubspec
.
parse
(
rawPubspec
);
final
String
pluginName
=
projectDir
.
basename
;
expect
(
pubspec
.
dependencies
,
contains
(
pluginName
));
expect
(
pubspec
.
dependencies
[
pluginName
]
is
PathDependency
,
isTrue
);
final
PathDependency
pathDependency
=
pubspec
.
dependencies
[
pluginName
]
as
PathDependency
;
expect
(
pathDependency
.
path
,
'../'
);
},
overrides:
<
Type
,
Generator
>{
Pub:
()
=>
const
Pub
(),
});
testUsingContext
(
'kotlin/swift plugin project'
,
()
async
{
return
_createProject
(
projectDir
,
...
...
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