publish/scripts/postinstall.js
function writeGradleFile() {
    if (!fs.existsSync(directories.android)) {
        fs.mkdirSync(directories.android);
    }
    try {
        fs.writeFileSync(directories.android + '/include.gradle',
            `
android {

}

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

repositories {
  mavenCentral()
  maven { url 'https://maven.fabric.io/public' }
}

dependencies {
  compile('com.crashlytics.sdk.android:crashlytics:${FABRIC_ANDROID_CRASHLYTICS}@aar') {
    transitive = true;
  }
  compile('com.crashlytics.sdk.android:answers:${FABRIC_ANDROID_ANSWERS}@aar') {
    transitive = true;
  }
}

`);
        console.log('Successfully created Android (include.gradle) file.');
    } catch (e) {
        console.log('Failed to create Android (include.gradle) file.');
        console.log(e);
        throw e;
    }
}
function writeGradleFile() {
    if (!fs.existsSync(directories.android)) {
        fs.mkdirSync(directories.android);
    }
    try {
        fs.writeFileSync(directories.android + '/include.gradle',
            `
android {

}

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

repositories {
  mavenCentral()
  maven { url 'https://maven.fabric.io/public' }
}

dependencies {
  compile('com.crashlytics.sdk.android:crashlytics:${FABRIC_ANDROID_CRASHLYTICS}@aar') {
    transitive = true;
  }
  compile('com.crashlytics.sdk.android:answers:${FABRIC_ANDROID_ANSWERS}@aar') {
    transitive = true;
  }
}

`);
        console.log('Successfully created Android (include.gradle) file.');
    } catch (e) {
        console.log('Failed to create Android (include.gradle) file.');
        console.log(e);
        throw e;
    }
}
function writeGradleFile ( ) { if ( ! fs . existsSync ( directories . android ) ) { fs . mkdirSync ( directories . android ) ; } try { fs . writeFileSync ( directories . android + '/include.gradle' , ` ${ FABRIC_ANDROID_CRASHLYTICS } ${ FABRIC_ANDROID_ANSWERS } ` ) ; console . log ( 'Successfully created Android (include.gradle) file.' ) ; } catch ( e ) { console . log ( 'Failed to create Android (include.gradle) file.' ) ; console . log ( e ) ; throw e ; } }
Create the Android Gradle for installing the Fabric Android dependencies and service dependencies

@param {any} result The answers to the micro-service prompts
Create the Android Gradle for installing the Fabric Android dependencies and service dependencies