Created
September 1, 2014 17:12
-
-
Save kevinmichaelchen/4f28ea21a32b2684bbdc to your computer and use it in GitHub Desktop.
Outputs command to install AAR of Facebook Android SDK
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/env python | |
# python install_facebook_aar.py 3.17 | |
# if you want to install version 3.17 of the Facebook Android SDK | |
if __name__ == "__main__": | |
import sys | |
if len(sys.argv) is not 2: | |
print "Example run command:" | |
print "python install_facebook_aar.py 3.17" | |
else: | |
version = sys.argv[1] | |
print "git clone git@github.com:facebook/facebook-android-sdk.git && " + \ | |
"\n" + \ | |
"cd facebook-android-sdk && " + \ | |
"\n" + \ | |
"echo \"version '{0}'\" >> facebook/build.gradle && ".format(version) + \ | |
"\n" + \ | |
"echo \"sdk.dir=/Applications/Android Studio.app/sdk\" > local.properties && " + \ | |
"\n" + \ | |
"printf \"buildscript { \\n repositories { \\n mavenCentral() \\n } \\n dependencies { \\n classpath 'com.android.tools.build:gradle:0.12.+' \\n } \\n}\" > build.gradle && " + \ | |
"\n" + \ | |
"./gradlew facebook:assembleDebug && " + \ | |
"\n" + \ | |
"cd facebook/build/outputs/aar && " + \ | |
"\n" + \ | |
"mvn install:install-file -Dfile=facebook-{0}.aar -DgroupId=com.facebook -DartifactId=facebook-android-sdk -Dversion={0} -Dpackaging=aar".format(version) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment