Skip to content

Instantly share code, notes, and snippets.

@dlew
Last active September 11, 2019 18:35
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dlew/deda38ecea717c953e1b to your computer and use it in GitHub Desktop.
Save dlew/deda38ecea717c953e1b to your computer and use it in GitHub Desktop.
Sample gradle.build for Crashlytics
// Follow the five numbered instructions for setting up Crashlytics
buildscript {
repositories {
maven { url 'http://repo1.maven.org/maven2' }
// 1. Add the Crashlytics Maven repository to your build script.
maven { url 'http://download.crashlytics.com/maven' }
}
dependencies {
classpath 'com.android.tools.build:gradle:+'
// 2. Add a reference to the Crashlytics Gradle plugin to your dependencies.
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
}
}
apply plugin: 'android'
// 3. Apply the Crashlytics plugin after the Android plugin has been applied.
apply plugin: 'crashlytics'
repositories {
// 4. Add the Maven repository.
maven { url 'http://download.crashlytics.com/maven' }
}
android {
compileSdkVersion 18
buildToolsVersion "18.0.0"
defaultConfig {
minSdkVersion 7
targetSdkVersion 18
}
}
dependencies {
compile files('libs/android-support-v4.jar')
// 5. Add the Crashlytics SDK to the Android project.
compile 'com.crashlytics.android:crashlytics:1.+'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment