Last active
August 29, 2015 14:16
-
-
Save felquis/3781c9b6d285e2de23a8 to your computer and use it in GitHub Desktop.
Facebook Plugin configuration
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
// `grunt-shell` config: | |
shell: { | |
facebookDownload: { | |
command: [ | |
'echo "## Downloading Facebook Plugin"', | |
'git clone git@github.com:Wizcorp/phonegap-facebook-plugin.git .tmp-plugin/phonegap-facebook-plugin/', | |
'cd .tmp-plugin/phonegap-facebook-plugin/', | |
'echo "## Checkout tag 0.10.1"', | |
'git checkout 0.10.1 -q', | |
'cd ./../../' | |
].join('&&') | |
}, | |
facebookSetup: { | |
command: [ | |
'echo "## Install Facebook Plugin"', | |
'cordova plugin add ./.tmp-plugin/phonegap-facebook-plugin --variable APP_ID="{{ app_id }}" --variable APP_NAME="{{ app_display_name }}"', | |
'echo "## Configuring Facebook Plugin"', | |
'android update project --subprojects --path "platforms/android" --target android-19 --library "CordovaLib"', | |
'android update project --subprojects --path "platforms/android" --target android-19 --library "com.phonegap.plugins.facebookconnect/app-FacebookLib"', | |
'cd platforms/android/com.phonegap.plugins.facebookconnect/app-FacebookLib/', | |
'android update project -p .', | |
'cd ../../', | |
'ant clean', | |
'cd ../../', | |
'grunt facebookAndroidManifest', | |
'cd platforms/android/com.phonegap.plugins.facebookconnect/app-FacebookLib/', | |
'ant clean', | |
'cd ../../../../', | |
].join('&&') | |
}, | |
installCordovaPlugins: { | |
command: [ | |
'echo "## Installing plugins"', | |
'cordova plugin add org.apache.cordova.statusbar@0.1.9', | |
'cordova plugin add com.danielcwilson.plugins.googleanalytics@0.6.1' | |
].join('&&') | |
}, | |
init: { | |
command: [ | |
'echo "## Removing all platforms"', | |
'rm -rf platforms/', | |
'rm -rf plugins/', | |
'rm -rf ./.tmp-plugin', | |
'grunt shell:facebookDownload', | |
'echo "## Installing platforms"', | |
'cordova platform add android', | |
'cordova platform add ios', | |
'grunt shell:installCordovaPlugins', | |
'grunt shell:facebookSetup', | |
'echo "#### Tudo pronto! Coloque seu Android via USB e rode \'cordova run android\'"', | |
].join('&&') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment