• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1buildscript {
2    repositories {
3        mavenCentral()
4    }
5
6    dependencies {
7        classpath 'com.android.tools.build:gradle:0.12.+'
8    }
9}
10
11apply plugin: 'com.android.application'
12
13
14dependencies {
15
16    compile "com.android.support:support-v4:20.+"
17    compile "com.android.support:support-v13:20.+"
18
19}
20
21// The sample build uses multiple directories to
22// keep boilerplate and common code separate from
23// the main sample code.
24List<String> dirs = [
25    'main',     // main sample code; look here for the interesting stuff.
26    'common',   // components that are reused by multiple samples
27    'template'] // boilerplate code that is generated by the sample template process
28
29android {
30    compileSdkVersion "android-L"
31
32    buildToolsVersion "20.0.0"
33
34    sourceSets {
35        main {
36            dirs.each { dir ->
37                java.srcDirs "src/${dir}/java"
38                res.srcDirs "src/${dir}/res"
39            }
40        }
41
42    }
43
44}
45// BEGIN_EXCLUDE
46// Tasks below this line will be hidden from release output
47
48task preflight (dependsOn: parent.preflight) {
49    project.afterEvaluate {
50        // Inject a preflight task into each variant so we have a place to hook tasks
51        // that need to run before any of the android build tasks.
52        //
53        android.applicationVariants.each { variant ->
54            tasks.getByPath("prepare${variant.name.capitalize()}Dependencies").dependsOn preflight
55        }
56    }
57}
58
59// END_EXCLUDE
60