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
7765dd4c
Commit
7765dd4c
authored
Feb 06, 2019
by
KyleWong
Committed by
xster
Feb 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor logic to get plugins path for android studio in mac (#26964)
parent
704814c6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
6 deletions
+19
-6
android_studio.dart
packages/flutter_tools/lib/src/android/android_studio.dart
+12
-3
plist_utils.dart
packages/flutter_tools/lib/src/ios/plist_utils.dart
+7
-3
No files found.
packages/flutter_tools/lib/src/android/android_studio.dart
View file @
7765dd4c
...
...
@@ -26,12 +26,14 @@ AndroidStudio get androidStudio => context[AndroidStudio];
final
RegExp
_dotHomeStudioVersionMatcher
=
RegExp
(
r'^\.(AndroidStudio[^\d]*)([\d.]+)'
);
final
RegExp
_pathsSelectorMatcher
=
RegExp
(
r'"idea.paths.selector" = "AndroidStudio[^;]+"'
);
String
get
javaPath
=>
androidStudio
?.
javaPath
;
class
AndroidStudio
implements
Comparable
<
AndroidStudio
>
{
AndroidStudio
(
this
.
directory
,
{
Version
version
,
this
.
configured
,
this
.
studioAppName
=
'AndroidStudio'
})
{
Version
version
,
this
.
configured
,
this
.
studioAppName
=
'AndroidStudio'
,
this
.
pathsSelectorPath
})
:
version
=
version
??
Version
.
unknown
{
_init
();
}
...
...
@@ -47,7 +49,13 @@ class AndroidStudio implements Comparable<AndroidStudio> {
Version
version
;
if
(
versionString
!=
null
)
version
=
Version
.
parse
(
versionString
);
return
AndroidStudio
(
studioPath
,
version:
version
);
final
String
plistValue
=
iosWorkflow
.
getPlistValueFromFile
(
plistFile
,
null
,
);
final
String
pathsSelectorValue
=
_pathsSelectorMatcher
.
stringMatch
(
plistValue
).
split
(
'='
).
last
.
trim
().
replaceAll
(
'"'
,
''
);
return
AndroidStudio
(
studioPath
,
version:
version
,
pathsSelectorPath:
pathsSelectorValue
);
}
factory
AndroidStudio
.
fromHomeDot
(
Directory
homeDotDir
)
{
...
...
@@ -83,6 +91,7 @@ class AndroidStudio implements Comparable<AndroidStudio> {
final
String
studioAppName
;
final
Version
version
;
final
String
configured
;
final
String
pathsSelectorPath
;
String
_pluginsPath
;
String
_javaPath
;
...
...
@@ -102,7 +111,7 @@ class AndroidStudio implements Comparable<AndroidStudio> {
homeDirPath
,
'Library'
,
'Application Support'
,
'
AndroidStudio
$major
.
$minor
'
);
'
$pathsSelectorPath
'
);
}
else
{
_pluginsPath
=
fs
.
path
.
join
(
homeDirPath
,
'.
$studioAppName$major
.
$minor
'
,
...
...
packages/flutter_tools/lib/src/ios/plist_utils.dart
View file @
7765dd4c
...
...
@@ -26,9 +26,13 @@ String getValueFromFile(String plistFilePath, String key) {
final
String
normalizedPlistPath
=
fs
.
path
.
withoutExtension
(
fs
.
path
.
absolute
(
plistFilePath
));
try
{
final
String
value
=
runCheckedSync
(<
String
>[
executable
,
'read'
,
normalizedPlistPath
,
key
]);
final
List
<
String
>
args
=
<
String
>[
executable
,
'read'
,
normalizedPlistPath
];
if
(
key
!=
null
&&
key
.
isNotEmpty
){
args
.
add
(
key
);
}
final
String
value
=
runCheckedSync
(
args
);
return
value
.
isEmpty
?
null
:
value
;
}
catch
(
error
)
{
return
null
;
...
...
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