How do I create terminal session independent env vars on OS 10.10? I read Mortimer's answer here https://stackoverflow.com/questions/25385934/setting-environment-variables-via-launchd-conf-no-longer-works-in-os-x-yosemite and added this file in /Users/MyName/Library/LaunchAgents called environment.plist:

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"     
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
  &lt;key&gt;Label&lt;/key&gt;
  &lt;string&gt;my.startup&lt;/string&gt;
  &lt;key&gt;ProgramArguments&lt;/key&gt;
  &lt;array&gt;
    &lt;string&gt;sh&lt;/string&gt;
    &lt;string&gt;-c&lt;/string&gt;
    &lt;string&gt;
    launchctl setenv GRADLE_HOME /Applications/gradle-2.0 
    launchctl setenv JAVA_HOME    
/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home
    &lt;/string&gt;

  &lt;/array&gt;
  &lt;key&gt;RunAtLoad&lt;/key&gt;
  &lt;true/&gt;
&lt;/dict&gt;
&lt;/plist&gt;


Restarted my laptop, opened a terminal, and ran echo $GRADLE_HOME but it is still blank.  How do I set an env var that is persistent throughout terminal sessions in Mac OS 10.10?
shut down and start the computer again.  open the terminal and type echo $ENV_VAR and you should see the value you defined.