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
0de87bab
Commit
0de87bab
authored
Aug 24, 2017
by
Mikkel Nygaard Ravn
Committed by
GitHub
Aug 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test bugfix: specify JAVA_HOME env (#11773)
parent
79747f49
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
gradle_plugin_test.dart
dev/devicelab/bin/tasks/gradle_plugin_test.dart
+9
-4
No files found.
dev/devicelab/bin/tasks/gradle_plugin_test.dart
View file @
0de87bab
...
...
@@ -85,16 +85,20 @@ bool _hasMultipleOccurrences(String text, Pattern pattern) {
}
class
FlutterProject
{
FlutterProject
(
this
.
parent
,
this
.
name
);
FlutterProject
(
this
.
parent
,
this
.
name
,
this
.
javaPath
);
Directory
parent
;
String
name
;
final
Directory
parent
;
final
String
name
;
final
String
javaPath
;
static
Future
<
FlutterProject
>
create
(
Directory
directory
,
String
name
)
async
{
await
inDirectory
(
directory
,
()
async
{
await
flutter
(
'create'
,
options:
<
String
>[
name
]);
});
return
new
FlutterProject
(
directory
,
name
);
final
String
flutterDoctor
=
await
evalFlutter
(
'doctor'
);
final
RegExp
javaPathExtractor
=
new
RegExp
(
r'Android Studio at (.*)'
);
final
String
javaPath
=
javaPathExtractor
.
firstMatch
(
flutterDoctor
).
group
(
1
)
+
'/jre'
;
return
new
FlutterProject
(
directory
,
name
,
javaPath
);
}
String
get
rootPath
=>
path
.
join
(
parent
.
path
,
name
);
...
...
@@ -157,6 +161,7 @@ android {
'./gradlew'
,
<
String
>[
'app:
$task
'
],
workingDirectory:
androidPath
,
environment:
<
String
,
String
>{
'JAVA_HOME'
:
javaPath
}
);
}
...
...
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