Library Subproject in Gradle

This page is now deprecated. For the latest version, please click here.
When you onboard a kit, Fabric sets up the initialization code inside the base project, not the library. Here's how you'd do it:

Let's say you have a base project that depends on a library.

1) Onboard the base project with Fabric.

2) Keep the following in base/build.gradle
buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }
    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

3) Move the following to the library/build.gradle
repositories {
    maven { url 'https://maven.fabric.io/public' }
}

dependencies {
    compile('KIT_GROUP_ID:KIT_ARTIFACT_ID:KIT_VERSION@aar') {
        transitive = true;
    }
}

4) Move Fabric.with into the library (optional)

Now, you should have a base project with an ApiKey and a crashlytics.properties file in the root and a library with the kit you moved into its build.gradle

Feedback and Knowledge Base