Last active
May 28, 2016 23:21
-
-
Save Fi5t/bf1e5fa7c22bab5d52ab4f5436f04a92 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# It brings JDK8 to Android Studio | |
__author__ = 'Fi5t' | |
from plistlib import readPlist, writePlist | |
def set_jdk(plist, version): | |
with open(plist, 'rb') as f: | |
pl = readPlist(f) | |
pl["JVMOptions"]["JVMVersion"] = version | |
with open(plist, 'wb') as f: | |
writePlist(pl, f) | |
default_info_list_path = "/Applications/Android Studio.app/Contents/Info.plist" | |
default_jdk_version = "1.8+" | |
set_jdk(default_info_list_path, default_jdk_version) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment