Global Environment Variables

Answered

In general is there a way to use access enviornment variables when paths need to be configured, something like $PROJECT_DIR$ ?

For example: In Settings > "Languages & Frameworks" > Dart I'm asked to enter the "Dart SDK path", what I'd like to do is set a "Global environment variabe", for instance in a shell script "export DART_SDK=/opt/dartsdk", and then in "Dart SDK path" enter: $DART_SDK$, or some such. Is this possible?

This type of feature is needed so that when I commit .idea/libraries/Dart_SDK.xml into a git repo and someone else checks it out will very likely have the dart-sdk installed at a different location so this needs to be a "variable" not hard-coded to a specific path.

0
1 comment

It is not possible to access the system environment variables in IntelliJ IDEA this way. Please follow and vote the related YouTrack requests:

You may also try to use the Path Variables feature to manage the file paths more comfortably but there is one important note about this feature. Please check the answer for more details.

0

Please sign in to leave a comment.