Skip to content
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

[Feature] Add support for Flutter and PATH on Android Studio #29

Open
pillarcoin opened this issue Sep 15, 2024 · 8 comments
Open

[Feature] Add support for Flutter and PATH on Android Studio #29

pillarcoin opened this issue Sep 15, 2024 · 8 comments
Assignees

Comments

@pillarcoin
Copy link

pillarcoin commented Sep 15, 2024

Thank you very much for providing such a useful plugin. It would be even better if it could support Android Studio.

Unfortunately, I don't want to use mise with shims. It seems that the current Android Studio cannot read the PATH provided by mise at runtime, even after installing the plugin.

Is it possible to make the IDE read the PATH provided by eval "$(~/.local/bin/mise activate zsh)" in ~/.zshrc before running the target?

If you need any additional information or have any other questions, please let me know.

@134130
Copy link
Owner

134130 commented Sep 16, 2024

Hi, @liangyi9812

Thank you for your interest.

I'll check as soon as possible.

Thanks!

@134130
Copy link
Owner

134130 commented Sep 17, 2024

Please let me know what features do you want to use.

As far as I discoverd is:

  • Tools automation(JDK auto detect) cannot be applied.
    • Android Studio uses its own SDK
      image
    • If you are meaning this page, let me know your mise configuration content and the screenshot of the page.
  • EnvVar cannot be applied.
    • There is no point to inject envvars.
      image
    • IMHO, That is the reason why there are no other plugins, that supports envvar.

@pillarcoin
Copy link
Author

Thank you for your concern about this issue.
Actually, I use Android Studio for developing Flutter applications.
I think the following features would be appropriate for the Flutter development workflow:

  • Flutter version switch
    When switching Flutter versions in the current project, Android Studio should automatically configure itself to the version provided by mise ls --current.
    SCR-20240918-kvig

  • About PATH
    I’m using a trick to ensure that the IDE can correctly read the PATH provided by mise. When launching Android Studio from the command line (e.g., studio .), Android Studio is able to correctly read the PATH set by mise. This is crucial because when compiling Flutter projects, it requires Ruby (installed via mise) to run pod (installed via Ruby) to manage certain dependencies.

    Is it possible for a plugin to achieve this functionality?

    You can view the PATH that the IDE reads by navigating to Settings > Tools > Terminal > Environment variables and clicking the icon at the end of the input field.
    SCR-20240918-ljdl

@134130
Copy link
Owner

134130 commented Sep 18, 2024

Because of the Flutter is another plugin, not the Android Studio builtin, so I think it maybe impossible to extend it.

But I'll check deeper soon.

@134130 134130 changed the title [Feature] Add support for Android Studio [Feature] Add support for Flutter and PATH on Android Studio Sep 20, 2024
@134130
Copy link
Owner

134130 commented Sep 20, 2024

Hi @liangyi9812

Flutter version switch

  • Since all the flutter features are provided by Flutter JetBrains Plugin, so there is no way to apply mise's SDK configuration.

About PATH

  • The PATH which you captured is the JVM's Environment variables, backing Android Studio.
  • The only way to change JVM's Environment variable is just fork the Android Studio process with new EnvVars.

For the above reasons, I've failed to support Flutter and PATH support. Sorry for it. 😭

@134130 134130 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 20, 2024
@134130 134130 self-assigned this Nov 9, 2024
@134130 134130 reopened this Nov 9, 2024
@134130
Copy link
Owner

134130 commented Nov 9, 2024

@liangyi9812 Hi! I found the way, and I'm now getting a shot!

@134130
Copy link
Owner

134130 commented Nov 10, 2024

I'm trying, but there is many huddles. 😭

  1. There is many difference between Android Studio and IntelliJ Platform.
  2. Flutter and Dart plugins are very strictly coupled with IDE's version.
    • If the IDE's version does not match with plugin's version, the IDE is crashing. 😭

@pillarcoin
Copy link
Author

I'm trying, but there is many huddles. 😭

  1. There is many difference between Android Studio and IntelliJ Platform.

  2. Flutter and Dart plugins are very strictly coupled with IDE's version.

    • If the IDE's version does not match with plugin's version, the IDE is crashing. 😭

Sorry to hear that, but at the same time, I really appreciate your efforts. 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants