Last active
March 2, 2018 04:22
-
-
Save Kun-Yao-Lin/9f3a7c26ae6c862fa5e6486f28240ac9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
package="......."> | |
<application | |
android:allowBackup="false" | |
android:icon="@mipmap/ic_launcher" | |
android:label="@string/app_name"> | |
......... | |
<!--facebook--> | |
<meta-data | |
android:name="com.facebook.sdk.ApplicationId" | |
android:value="@string/facebook_app_id" /> | |
<activity | |
android:name="com.facebook.FacebookActivity" | |
android:screenOrientation="portrait" | |
android:configChanges="orientation|keyboardHidden|screenSize"></activity> | |
<provider | |
android:authorities="com.facebook.app.FacebookContentProvider${facebookAppId}" | |
android:name="com.facebook.FacebookContentProvider" | |
android:exported="true" > | |
</provider> | |
</application> | |
</manifest> |
This file contains hidden or 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
apply plugin: 'com.android.application' | |
android { | |
useLibrary 'org.apache.http.legacy' | |
signingConfigs { | |
release { | |
keyAlias ...... | |
keyPassword ...... | |
storePassword ...... | |
storeFile file(......) | |
} | |
} | |
compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION) | |
buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION | |
defaultConfig { | |
applicationId "......." | |
minSdkVersion Integer.parseInt(project.ANDROID_BUILD_MIN_SDK_VERSION) | |
targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION) | |
versionCode 0 | |
versionName "1.0" | |
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | |
..... | |
} | |
buildTypes { | |
debug { | |
.... | |
//facebook app id | |
buildConfigField "String", "FACEBOOK_APP_ID", "\""+project.STAGING_FACEBOOK_APP_ID+"\"" | |
resValue "string", "facebook_app_id", project.STAGING_FACEBOOK_APP_ID | |
manifestPlaceholders = [facebookAppId: project.STAGING_FACEBOOK_APP_ID] | |
} | |
release { | |
signingConfig signingConfigs.release | |
//facebook app id | |
buildConfigField "String", "FACEBOOK_APP_ID", "\""+project.PRODUCTION_FACEBOOK_APP_ID+"\"" | |
resValue "string", "facebook_app_id", project.PRODUCTION_FACEBOOK_APP_ID | |
manifestPlaceholders = [facebookAppId: project.PRODUCTION_FACEBOOK_APP_ID] | |
} | |
} | |
.... | |
} | |
dependencies { | |
compile fileTree(dir: 'libs', include: ['*.jar']) | |
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { | |
exclude group: 'com.android.support', module: 'support-annotations' | |
}) | |
compile project.ANDROID_SUPPORT_LIB | |
compile 'com.facebook.android:facebook-android-sdk:XXX' | |
} |
This file contains hidden or 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
# Project-wide Gradle settings. | |
# IDE (e.g. Android Studio) users: | |
# Gradle settings configured through the IDE *will override* | |
# any settings specified in this file. | |
# For more details on how to configure your build environment visit | |
# http://www.gradle.org/docs/current/userguide/build_environment.html | |
# Specifies the JVM arguments used for the daemon process. | |
# The setting is particularly useful for tweaking memory settings. | |
org.gradle.jvmargs=-Xmx1536m | |
# When configured, Gradle will run in incubating parallel mode. | |
# This option should only be used with decoupled projects. More details, visit | |
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects | |
# org.gradle.parallel=true | |
ANDROID_COMPILE_SDK_VERSION= Google Inc.:Google APIs:23 | |
ANDROID_BUILD_TARGET_SDK_VERSION= 23 | |
ANDROID_BUILD_TOOLS_VERSION= 23.0.1 | |
ANDROID_BUILD_SDK_VERSION= 23 | |
ANDROID_BUILD_MIN_SDK_VERSION= 15 | |
ANDROID_SUPPORT_LIB = com.android.support:appcompat-v7:23.2.1 | |
STAGING_FACEBOOK_APP_ID = <直接填數值> | |
PRODUCTION_FACEBOOK_APP_ID = <直接填數值> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment