-
Notifications
You must be signed in to change notification settings - Fork 29.7k
pass the value of the android sdk #11268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pass the value of the android sdk #11268
Conversation
{
"android-studio-dir": "/Applications/Android Studio 3.0 Preview.app/Contents",
"android-sdk": "/Users/devoncarew/tools/android-sdk-macosx"
} |
tvolkert
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to allow the user to use flutter config to specify the Android SDK directory, for cases where ANDROID_HOME doesn't work (like a dock-launched IDE).
Can the IDE trigger ConfigCommand to write preferences?
| @override | ||
| final List<String> aliases = <String>['configure']; | ||
|
|
||
| @override |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parent class already defaults to true - is this just to be explicit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Urk - no. This was a copy-paste error - this should be disabling shouldUpdateCache for flutter config.
pq
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Makes sense - I can add a
Not sure what you mean here. The IDE could pass in |
| } | ||
|
|
||
| printStatus(JSON.encode(results)); | ||
| printStatus(const JsonEncoder.withIndent(' ').convert(results)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IntelliJ can handle formatted JSON?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup!
tvolkert
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Yeah, that's what I meant. My thought is that if IntelliJ knows that there's no Android SDK configured as far as flutter tools sees it (which it should be able to know after this PR), then it could allow the user to specify the SDK location in IntelliJ, and that data would get written to the flutter config store. |
Makes sense. We could implement something like that - the user already has a way in IntelliJ to specify where the android sdk is from the POV of the intellij android tooling. I updated this PR to allow the user to pass in |
tvolkert
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
flutter config --machineflutter configas one of the commands that doesn't need the cache populated (otherwise, querying for the android sdk location could be a very expensive operation)@tvolkert, @pq