Add maven url to repositories in build.gradle

To add crashlytics support I need to add maven { url 'https://maven.fabric.io/public' } to repositories both in buildscript and allprojects. Please add support in build.gradle.

Hey Bjørn-Olav!

Thanks for the suggestion; I’ve created an internal issue.

Stay tuned!

The fix for this is in for review, this should be in the next release.

This was released but I though I should come back and say that for other google-weary travelers

the top build.gradle file looks like this:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
       jcenter()
       mavenCentral()
       @(Gradle.BuildScript.Repository:Join('\n'))
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.0'
        @(Gradle.Dependency.ClassPath:Join('\n', 'classpath \'', '\''))
    }
}

allprojects {
    repositories {
        jcenter()
        mavenCentral()
        @(Gradle.AllProjects.Repository:Join('\n'))
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

so you can use Gradle.BuildScript.Repository, Gradle.Dependency.ClassPath & Gradle.AllProjects.Repository

Here is an example uno attribute:

[Require("Gradle.BuildScript.Repository", "FOOBAR")]