Created
February 21, 2018 11:48
-
-
Save fractalwrench/4ed6ce5d9e438be76bdb2f6daa423e4e to your computer and use it in GitHub Desktop.
Bugsnag API Key Setup
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
apply plugin: 'com.android.application' | |
apply plugin: 'kotlin-android' | |
apply plugin: 'kotlin-android-extensions' | |
def bugsnag_api_key = project.hasProperty("bugsnagKey") ? project.property("bugsnagKey") : "your-api-key" | |
android { | |
compileSdkVersion 26 | |
defaultConfig { | |
applicationId "com.bugsnag.myapplication" | |
minSdkVersion 14 | |
targetSdkVersion 26 | |
versionCode 1 | |
versionName "1.0" | |
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | |
} | |
buildTypes { | |
release { | |
minifyEnabled false | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
} | |
} | |
flavorDimensions "normal" | |
productFlavors { | |
standard { | |
buildConfigField "String", "BUGSNAP_API_KEY", "\"${bugsnag_api_key}\"" | |
} | |
} | |
} | |
dependencies { | |
implementation fileTree(dir: 'libs', include: ['*.jar']) | |
implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" | |
implementation 'com.bugsnag:bugsnag-android:4.2.2' | |
implementation 'com.android.support:appcompat-v7:26.1.0' | |
implementation 'com.android.support.constraint:constraint-layout:1.0.2' | |
testImplementation 'junit:junit:4.12' | |
androidTestImplementation 'com.android.support.test:runner:1.0.1' | |
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' | |
} | |
apply plugin: 'com.bugsnag.android.gradle' | |
bugsnag { | |
apiKey "${bugsnag_api_key}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment