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
75d75bfa
Unverified
Commit
75d75bfa
authored
May 26, 2019
by
Jonah Williams
Committed by
GitHub
May 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix relative paths and snapshot logic in tool (#33283)
parent
582c5587
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
8 deletions
+31
-8
pubspec.yaml
dev/integration_tests/codegen/pubspec.yaml
+1
-2
build_runner.dart
...ages/flutter_tools/lib/src/build_runner/build_runner.dart
+30
-6
No files found.
dev/integration_tests/codegen/pubspec.yaml
View file @
75d75bfa
...
...
@@ -68,9 +68,8 @@ dev_dependencies:
yaml
:
2.1.15
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
builders
:
# Note: path is relative from generated directory
simple_codegen
:
path
:
../
../../
simple_codegen
path
:
../simple_codegen
flutter
:
uses-material-design
:
true
...
...
packages/flutter_tools/lib/src/build_runner/build_runner.dart
View file @
75d75bfa
...
...
@@ -83,7 +83,20 @@ class BuildRunner extends CodeGenerator {
if
(
builders
!=
null
)
{
for
(
String
name
in
builders
.
keys
)
{
final
Object
node
=
builders
[
name
];
stringBuffer
.
writeln
(
'
$name
:
$node
'
);
// For relative paths, make sure it is accounted for
// parent directories.
if
(
node
is
YamlMap
&&
node
[
'path'
]
!=
null
)
{
final
String
path
=
node
[
'path'
];
if
(
fs
.
path
.
isRelative
(
path
))
{
final
String
convertedPath
=
fs
.
path
.
join
(
'..'
,
'..'
,
node
[
'path'
]);
stringBuffer
.
writeln
(
'
$name
:'
);
stringBuffer
.
writeln
(
' path:
$convertedPath
'
);
}
else
{
stringBuffer
.
writeln
(
'
$name
:
$node
'
);
}
}
else
{
stringBuffer
.
writeln
(
'
$name
:
$node
'
);
}
}
}
stringBuffer
.
writeln
(
' build_runner: ^
$kMinimumBuildRunnerVersion
'
);
...
...
@@ -149,7 +162,13 @@ class BuildRunner extends CodeGenerator {
'--skip-build-script-check'
,
'--delete-conflicting-outputs'
];
buildDaemonClient
=
await
BuildDaemonClient
.
connect
(
flutterProject
.
directory
.
path
,
command
,
logHandler:
(
ServerLog
log
)
=>
printTrace
(
log
.
toString
()));
buildDaemonClient
=
await
BuildDaemonClient
.
connect
(
flutterProject
.
directory
.
path
,
command
,
logHandler:
(
ServerLog
log
)
{
printTrace
(
log
.
toString
());
}
);
}
finally
{
status
.
stop
();
}
...
...
@@ -198,10 +217,15 @@ List<int> _produceScriptId(YamlMap builders) {
if
(
builders
==
null
||
builders
.
isEmpty
)
{
return
md5
.
convert
(
platform
.
version
.
codeUnits
).
bytes
;
}
final
List
<
String
>
orderedBuilders
=
builders
.
keys
final
List
<
String
>
orderedBuilder
Name
s
=
builders
.
keys
.
cast
<
String
>()
.
toList
()..
sort
();
return
md5
.
convert
(
orderedBuilders
.
followedBy
(<
String
>[
platform
.
version
])
.
join
(
''
).
codeUnits
).
bytes
;
final
List
<
String
>
orderedBuilderValues
=
builders
.
values
.
map
((
dynamic
value
)
=>
value
.
toString
())
.
toList
()..
sort
();
return
md5
.
convert
(<
String
>[
...
orderedBuilderNames
,
...
orderedBuilderValues
,
platform
.
version
,
].
join
(
''
).
codeUnits
).
bytes
;
}
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