Crashlytics (Fabric) without plugin

How can I use Crashlytics (Fabric) for a project without installing the AndroidStudio plugin, using only Gradle on my build server? I tried to find any instructions for this but no result.

I have this code in my project:

Build.gradle project

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
        ...

    }
    dependencies {
        ...
        classpath 'io.fabric.tools:gradle:1.+'
    }
}

      

Build.gradle module

apply plugin: "com.android.application"
apply plugin: "io.fabric"

repositories {
    ...
    maven { url "https://maven.fabric.io/public" }
}
...
dependencies {
    ...
    compile("com.crashlytics.sdk.android:crashlytics:2.4.0@aar") { transitive = true }
}

      

manifesto

<meta-data android:name="io.fabric.ApiKey" android:value="..." />

      

Application

@Override
public void onCreate() {
    super.onCreate();
    Fabric.with(this, new Crashlytics());
    ...
}

      

I had this file in my eclipse project - "crashlytics.properties" (with apiSecret). Should I be using it somewhere in AndroidStudio and Gradle?

Also, should I add other information to the project in order to add Crashlytics correctly?

+3


source to share


1 answer


+1


source







All Articles