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
27806528
Unverified
Commit
27806528
authored
Feb 10, 2021
by
gaaclarke
Committed by
GitHub
Feb 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
started stealing the gradle wrapper from the flutter module (#75743)
parent
531870f5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
flutter_engine_group_performance.dart
...devicelab/bin/tasks/flutter_engine_group_performance.dart
+21
-0
No files found.
dev/devicelab/bin/tasks/flutter_engine_group_performance.dart
View file @
27806528
...
...
@@ -28,6 +28,25 @@ Future<void> _withApkInstall(
}
}
/// Since we don't check the gradle wrapper in with the android host project we
/// yank the gradle wrapper from the module (which is added by the Flutter tool).
void
_copyGradleFromModule
(
String
source
,
String
destination
)
{
print
(
'copying gradle from module
$source
to
$destination
'
);
final
String
wrapperPath
=
path
.
join
(
source
,
'.android'
,
'gradlew'
);
final
String
windowsWrapperPath
=
path
.
join
(
source
,
'.android'
,
'gradlew.bat'
);
final
String
wrapperDestinationPath
=
path
.
join
(
destination
,
'gradlew'
);
final
String
windowsWrapperDestinationPath
=
path
.
join
(
destination
,
'gradlew.bat'
);
File
(
wrapperPath
).
copySync
(
wrapperDestinationPath
);
File
(
windowsWrapperPath
).
copySync
(
windowsWrapperDestinationPath
);
final
Directory
gradleDestinationDirectory
=
Directory
(
path
.
join
(
destination
,
'gradle'
,
'wrapper'
));
if
(!
gradleDestinationDirectory
.
existsSync
())
{
gradleDestinationDirectory
.
createSync
(
recursive:
true
);
}
final
String
gradleDestinationPath
=
path
.
join
(
gradleDestinationDirectory
.
path
,
'gradle-wrapper.jar'
);
final
String
gradlePath
=
path
.
join
(
source
,
'.android'
,
'gradle'
,
'wrapper'
,
'gradle-wrapper.jar'
);
File
(
gradlePath
).
copySync
(
gradleDestinationPath
);
}
Future
<
TaskResult
>
_doTest
()
async
{
try
{
final
String
flutterDirectory
=
utils
.
flutterDirectory
.
path
;
...
...
@@ -42,6 +61,8 @@ Future<TaskResult> _doTest() async {
final
String
flutterPath
=
path
.
join
(
flutterDirectory
,
'bin'
,
'flutter'
);
await
utils
.
eval
(
flutterPath
,
<
String
>[
'pub'
,
'get'
],
workingDirectory:
modulePath
);
_copyGradleFromModule
(
modulePath
,
androidPath
);
await
utils
.
eval
(
gradlewExecutable
,
<
String
>[
'assembleRelease'
],
workingDirectory:
androidPath
);
...
...
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