Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 1 | buildscript { |
| 2 | repositories { |
| 3 | mavenCentral() |
| 4 | } |
| 5 | dependencies { |
Tony Wickham | 10236d6 | 2016-09-28 12:49:25 -0700 | [diff] [blame] | 6 | classpath 'com.android.tools.build:gradle:2.2.0' |
Sunny Goyal | 4a4b49f | 2016-08-25 22:21:40 -0700 | [diff] [blame] | 7 | classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.0' |
Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 8 | } |
| 9 | } |
| 10 | |
| 11 | apply plugin: 'com.android.application' |
| 12 | apply plugin: 'com.google.protobuf' |
| 13 | |
| 14 | android { |
Sunny Goyal | b20cbb2 | 2016-07-07 15:01:26 -0700 | [diff] [blame] | 15 | compileSdkVersion 25 |
| 16 | buildToolsVersion '24.0.0' |
Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 17 | |
| 18 | defaultConfig { |
Sunny Goyal | d297be2 | 2016-05-10 15:35:02 -0700 | [diff] [blame] | 19 | minSdkVersion 21 |
Sunny Goyal | 4a4b49f | 2016-08-25 22:21:40 -0700 | [diff] [blame] | 20 | targetSdkVersion 25 |
Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 21 | versionCode 1 |
| 22 | versionName "1.0" |
Sunny Goyal | 3d1c0ff | 2015-10-16 17:18:54 -0700 | [diff] [blame] | 23 | |
Sunny Goyal | 3d1c0ff | 2015-10-16 17:18:54 -0700 | [diff] [blame] | 24 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 25 | } |
| 26 | buildTypes { |
| 27 | debug { |
| 28 | minifyEnabled false |
| 29 | } |
| 30 | } |
Sunny Goyal | 4a4b49f | 2016-08-25 22:21:40 -0700 | [diff] [blame] | 31 | |
| 32 | productFlavors { |
| 33 | aosp { |
| 34 | applicationId 'com.android.launcher3' |
| 35 | testApplicationId 'com.android.launcher3.tests' |
| 36 | } |
| 37 | } |
Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 38 | sourceSets { |
| 39 | main { |
Sunny Goyal | bd82250 | 2016-02-18 15:09:21 -0800 | [diff] [blame] | 40 | res.srcDirs = ['res'] |
Sunny Goyal | d83a67a | 2016-05-23 21:40:53 -0700 | [diff] [blame] | 41 | java.srcDirs = ['src', 'src_config'] |
Sunny Goyal | 4a4b49f | 2016-08-25 22:21:40 -0700 | [diff] [blame] | 42 | manifest.srcFile 'AndroidManifest-common.xml' |
Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 43 | proto.srcDirs 'protos/' |
| 44 | } |
Sunny Goyal | 3d1c0ff | 2015-10-16 17:18:54 -0700 | [diff] [blame] | 45 | |
| 46 | androidTest { |
| 47 | java.srcDirs = ['tests/src'] |
Sunny Goyal | f0ba8b7 | 2016-09-09 15:47:55 -0700 | [diff] [blame] | 48 | res.srcDirs = ['tests/res'] |
Sunny Goyal | 3d1c0ff | 2015-10-16 17:18:54 -0700 | [diff] [blame] | 49 | manifest.srcFile "tests/AndroidManifest.xml" |
| 50 | } |
Sunny Goyal | 4a4b49f | 2016-08-25 22:21:40 -0700 | [diff] [blame] | 51 | |
| 52 | aosp { |
| 53 | manifest.srcFile "AndroidManifest.xml" |
| 54 | } |
Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 55 | } |
| 56 | } |
| 57 | |
| 58 | repositories { |
| 59 | mavenCentral() |
| 60 | } |
| 61 | |
| 62 | dependencies { |
Sunny Goyal | eb04507 | 2016-02-25 14:50:53 -0800 | [diff] [blame] | 63 | compile 'com.android.support:support-v4:23.1.1' |
| 64 | compile 'com.android.support:recyclerview-v7:23.1.1' |
Tony Wickham | 827cef2 | 2016-03-17 15:39:39 -0700 | [diff] [blame] | 65 | compile 'com.android.support:palette-v7:23.2.0' |
Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 66 | compile 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-2' |
Sunny Goyal | 3d1c0ff | 2015-10-16 17:18:54 -0700 | [diff] [blame] | 67 | |
| 68 | testCompile 'junit:junit:4.12' |
Sunny Goyal | f0ba8b7 | 2016-09-09 15:47:55 -0700 | [diff] [blame] | 69 | androidTestCompile "org.mockito:mockito-core:1.+" |
| 70 | androidTestCompile 'com.google.dexmaker:dexmaker:1.2' |
| 71 | androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2' |
Sunny Goyal | eb04507 | 2016-02-25 14:50:53 -0800 | [diff] [blame] | 72 | androidTestCompile 'com.android.support.test:runner:0.5' |
| 73 | androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2' |
Tony Wickham | 827cef2 | 2016-03-17 15:39:39 -0700 | [diff] [blame] | 74 | androidTestCompile 'com.android.support:support-annotations:23.2.0' |
Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 75 | } |
| 76 | |
| 77 | protobuf { |
| 78 | // Configure the protoc executable |
| 79 | protoc { |
| 80 | artifact = 'com.google.protobuf:protoc:3.0.0-alpha-3' |
Sunny Goyal | 4a4b49f | 2016-08-25 22:21:40 -0700 | [diff] [blame] | 81 | |
| 82 | generateProtoTasks { |
| 83 | all().each { task -> |
| 84 | task.builtins { |
| 85 | remove java |
| 86 | javanano { |
Sunny Goyal | 58bcd5a | 2016-11-09 16:24:30 -0800 | [diff] [blame] | 87 | option "java_package=launcher_log.proto|com.android.launcher3.userevent.nano" |
Sunny Goyal | 6c46a6d | 2016-11-23 02:24:32 +0530 | [diff] [blame^] | 88 | option "enum_style=java" |
Sunny Goyal | 4a4b49f | 2016-08-25 22:21:40 -0700 | [diff] [blame] | 89 | } |
| 90 | } |
| 91 | } |
| 92 | } |
Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 93 | } |
| 94 | } |