blob: bc347ce3a74fb70eb672bced1c8158cd40ceb208 [file] [log] [blame]
Maarten Derksabb6ff82016-09-19 09:45:20 +02001/**
2 * The buildscript {} block is where you configure the repositories and
3 * dependencies for Gradle itself--meaning, you should not include dependencies
4 * for your modules here. For example, this block includes the Android plugin for
5 * Gradle as a dependency because it provides the additional instructions Gradle
6 * needs to build Android app modules.
7 */
8
9buildscript {
10
11 /**
12 * The repositories {} block configures the repositories Gradle uses to
13 * search or download the dependencies. Gradle pre-configures support for remote
14 * repositories such as JCenter, Maven Central, and Ivy. You can also use local
15 * repositories or define your own remote repositories. The code below defines
16 * JCenter as the repository Gradle should use to look for its dependencies.
17 */
18
19 repositories {
20 jcenter()
21 }
22
23 /**
24 * The dependencies {} block configures the dependencies Gradle needs to use
25 * to build your project. The following line adds Android Plugin for Gradle
26 * version 2.1.3 as a classpath dependency.
27 */
28
29 dependencies {
Borjan Tchakaloffd34d86b2016-11-21 18:05:46 +010030 classpath 'com.android.tools.build:gradle:2.2.2'
Maarten Derksabb6ff82016-09-19 09:45:20 +020031 }
32}
33
34/**
35 * The allprojects {} block is where you configure the repositories and
36 * dependencies used by all modules in your project, such as third-party plugins
37 * or libraries. Dependencies that are not required by all the modules in the
38 * project should be configured in module-level build.gradle files. For new
39 * projects, Android Studio configures JCenter as the default repository, but it
40 * does not configure any dependencies.
41 */
42
43allprojects {
44 repositories {
45 jcenter()
46 }
47}