Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 1 | buildscript { |
| 2 | repositories { |
| 3 | mavenCentral() |
Sunny Goyal | 889495d | 2017-04-13 11:24:54 -0700 | [diff] [blame] | 4 | jcenter() |
Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 5 | } |
| 6 | dependencies { |
Sunny Goyal | 5bc6b6f | 2017-10-26 15:36:10 -0700 | [diff] [blame] | 7 | classpath 'com.android.tools.build:gradle:2.3.3' |
Sunny Goyal | 4a4b49f | 2016-08-25 22:21:40 -0700 | [diff] [blame] | 8 | classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.0' |
Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 9 | } |
| 10 | } |
| 11 | |
| 12 | apply plugin: 'com.android.application' |
| 13 | apply plugin: 'com.google.protobuf' |
| 14 | |
| 15 | android { |
Sunny Goyal | f2dd421 | 2017-09-28 11:31:39 -0700 | [diff] [blame] | 16 | compileSdkVersion 27 |
| 17 | buildToolsVersion '27.0.0' |
Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 18 | |
| 19 | defaultConfig { |
Sunny Goyal | d297be2 | 2016-05-10 15:35:02 -0700 | [diff] [blame] | 20 | minSdkVersion 21 |
Sunny Goyal | f2dd421 | 2017-09-28 11:31:39 -0700 | [diff] [blame] | 21 | targetSdkVersion 27 |
Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 22 | versionCode 1 |
| 23 | versionName "1.0" |
Sunny Goyal | 3d1c0ff | 2015-10-16 17:18:54 -0700 | [diff] [blame] | 24 | |
Sunny Goyal | 3d1c0ff | 2015-10-16 17:18:54 -0700 | [diff] [blame] | 25 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" |
Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 26 | } |
| 27 | buildTypes { |
| 28 | debug { |
| 29 | minifyEnabled false |
| 30 | } |
| 31 | } |
Sunny Goyal | 4a4b49f | 2016-08-25 22:21:40 -0700 | [diff] [blame] | 32 | |
| 33 | productFlavors { |
| 34 | aosp { |
| 35 | applicationId 'com.android.launcher3' |
| 36 | testApplicationId 'com.android.launcher3.tests' |
| 37 | } |
Sunny Goyal | 64a75aa | 2017-07-03 13:50:52 -0700 | [diff] [blame] | 38 | |
| 39 | l3go { |
| 40 | applicationId 'com.android.launcher3' |
| 41 | testApplicationId 'com.android.launcher3.tests' |
| 42 | } |
Sunny Goyal | 9d34196 | 2017-10-30 10:03:34 -0700 | [diff] [blame] | 43 | |
| 44 | quickstep { |
| 45 | applicationId 'com.android.launcher3' |
| 46 | testApplicationId 'com.android.launcher3.tests' |
| 47 | } |
Sunny Goyal | 4a4b49f | 2016-08-25 22:21:40 -0700 | [diff] [blame] | 48 | } |
Sunny Goyal | 9d34196 | 2017-10-30 10:03:34 -0700 | [diff] [blame] | 49 | |
| 50 | // Disable release builds for now |
| 51 | android.variantFilter { variant -> |
| 52 | if (variant.buildType.name.endsWith('release')) { |
| 53 | variant.setIgnore(true); |
| 54 | } |
| 55 | } |
| 56 | |
Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 57 | sourceSets { |
| 58 | main { |
Sunny Goyal | bd82250 | 2016-02-18 15:09:21 -0800 | [diff] [blame] | 59 | res.srcDirs = ['res'] |
Sunny Goyal | 64a75aa | 2017-07-03 13:50:52 -0700 | [diff] [blame] | 60 | java.srcDirs = ['src'] |
Sunny Goyal | 4a4b49f | 2016-08-25 22:21:40 -0700 | [diff] [blame] | 61 | manifest.srcFile 'AndroidManifest-common.xml' |
Sunny Goyal | 2385ebe | 2017-07-19 01:24:07 -0700 | [diff] [blame] | 62 | proto { |
| 63 | srcDir 'protos/' |
| 64 | srcDir 'proto_overrides/' |
| 65 | } |
Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 66 | } |
Sunny Goyal | 3d1c0ff | 2015-10-16 17:18:54 -0700 | [diff] [blame] | 67 | |
Sunny Goyal | 9d34196 | 2017-10-30 10:03:34 -0700 | [diff] [blame] | 68 | debug { |
| 69 | manifest.srcFile "AndroidManifest.xml" |
| 70 | } |
| 71 | |
Sunny Goyal | 3d1c0ff | 2015-10-16 17:18:54 -0700 | [diff] [blame] | 72 | androidTest { |
Sunny Goyal | f0ba8b7 | 2016-09-09 15:47:55 -0700 | [diff] [blame] | 73 | res.srcDirs = ['tests/res'] |
Sunny Goyal | 64a75aa | 2017-07-03 13:50:52 -0700 | [diff] [blame] | 74 | java.srcDirs = ['tests/src'] |
Sunny Goyal | 658058b | 2017-01-21 01:33:02 -0800 | [diff] [blame] | 75 | manifest.srcFile "tests/AndroidManifest-common.xml" |
Sunny Goyal | 3d1c0ff | 2015-10-16 17:18:54 -0700 | [diff] [blame] | 76 | } |
Sunny Goyal | 4a4b49f | 2016-08-25 22:21:40 -0700 | [diff] [blame] | 77 | |
Sunny Goyal | 9d34196 | 2017-10-30 10:03:34 -0700 | [diff] [blame] | 78 | androidTestDebug { |
| 79 | manifest.srcFile "tests/AndroidManifest.xml" |
Sunny Goyal | 4a4b49f | 2016-08-25 22:21:40 -0700 | [diff] [blame] | 80 | } |
Sunny Goyal | 658058b | 2017-01-21 01:33:02 -0800 | [diff] [blame] | 81 | |
Sunny Goyal | 9d34196 | 2017-10-30 10:03:34 -0700 | [diff] [blame] | 82 | aosp { |
Sunny Goyal | 8b0a647 | 2017-11-06 21:09:23 -0800 | [diff] [blame] | 83 | java.srcDirs = ['src_flags', "src_ui_overrides"] |
Sunny Goyal | 658058b | 2017-01-21 01:33:02 -0800 | [diff] [blame] | 84 | } |
Sunny Goyal | 64a75aa | 2017-07-03 13:50:52 -0700 | [diff] [blame] | 85 | |
| 86 | l3go { |
| 87 | res.srcDirs = ['go/res'] |
Sunny Goyal | 8b0a647 | 2017-11-06 21:09:23 -0800 | [diff] [blame] | 88 | java.srcDirs = ['go/src_flags', "src_ui_overrides"] |
Sunny Goyal | 9d34196 | 2017-10-30 10:03:34 -0700 | [diff] [blame] | 89 | manifest.srcFile "go/AndroidManifest.xml" |
Sunny Goyal | 64a75aa | 2017-07-03 13:50:52 -0700 | [diff] [blame] | 90 | } |
| 91 | |
Sunny Goyal | 9d34196 | 2017-10-30 10:03:34 -0700 | [diff] [blame] | 92 | quickstep { |
| 93 | res.srcDirs = ['quickstep/res'] |
Sunny Goyal | 8b0a647 | 2017-11-06 21:09:23 -0800 | [diff] [blame] | 94 | java.srcDirs = ['src_flags', 'quickstep/src'] |
Sunny Goyal | 9d34196 | 2017-10-30 10:03:34 -0700 | [diff] [blame] | 95 | manifest.srcFile "quickstep/AndroidManifest.xml" |
Sunny Goyal | 64a75aa | 2017-07-03 13:50:52 -0700 | [diff] [blame] | 96 | } |
Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 97 | } |
| 98 | } |
| 99 | |
| 100 | repositories { |
| 101 | mavenCentral() |
Sunny Goyal | 889495d | 2017-04-13 11:24:54 -0700 | [diff] [blame] | 102 | jcenter() |
Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 103 | } |
| 104 | |
Sunny Goyal | f2dd421 | 2017-09-28 11:31:39 -0700 | [diff] [blame] | 105 | final String SUPPORT_LIBS_VERSION = '27.0.0-SNAPSHOT' |
Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 106 | dependencies { |
Sunny Goyal | a52ecb0 | 2016-12-16 15:04:51 -0800 | [diff] [blame] | 107 | compile "com.android.support:support-v4:${SUPPORT_LIBS_VERSION}" |
Rajeev Kumar | 4bfa466 | 2017-06-14 19:04:10 -0700 | [diff] [blame] | 108 | compile "com.android.support:support-dynamic-animation:${SUPPORT_LIBS_VERSION}" |
Sunny Goyal | a52ecb0 | 2016-12-16 15:04:51 -0800 | [diff] [blame] | 109 | compile "com.android.support:recyclerview-v7:${SUPPORT_LIBS_VERSION}" |
Sunny Goyal | 64a75aa | 2017-07-03 13:50:52 -0700 | [diff] [blame] | 110 | compile 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7' |
Sunny Goyal | 3d1c0ff | 2015-10-16 17:18:54 -0700 | [diff] [blame] | 111 | |
Sunny Goyal | 7313339 | 2017-11-02 11:04:49 -0700 | [diff] [blame] | 112 | quickstepCompile fileTree(dir: "quickstep/libs", include: 'sysui_shared.jar') |
| 113 | |
Sunny Goyal | 3d1c0ff | 2015-10-16 17:18:54 -0700 | [diff] [blame] | 114 | testCompile 'junit:junit:4.12' |
Sunny Goyal | 64a75aa | 2017-07-03 13:50:52 -0700 | [diff] [blame] | 115 | androidTestCompile "org.mockito:mockito-core:1.9.5" |
Sunny Goyal | f0ba8b7 | 2016-09-09 15:47:55 -0700 | [diff] [blame] | 116 | androidTestCompile 'com.google.dexmaker:dexmaker:1.2' |
| 117 | androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2' |
Sunny Goyal | 8b0a647 | 2017-11-06 21:09:23 -0800 | [diff] [blame] | 118 | androidTestCompile 'com.android.support.test:runner:1.0.0' |
| 119 | androidTestCompile 'com.android.support.test:rules:1.0.0' |
Sunny Goyal | eb04507 | 2016-02-25 14:50:53 -0800 | [diff] [blame] | 120 | androidTestCompile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2' |
Sunny Goyal | 3e9be43 | 2017-01-05 15:22:41 -0800 | [diff] [blame] | 121 | androidTestCompile "com.android.support:support-annotations:${SUPPORT_LIBS_VERSION}" |
Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 122 | } |
| 123 | |
| 124 | protobuf { |
| 125 | // Configure the protoc executable |
| 126 | protoc { |
| 127 | artifact = 'com.google.protobuf:protoc:3.0.0-alpha-3' |
Sunny Goyal | 4a4b49f | 2016-08-25 22:21:40 -0700 | [diff] [blame] | 128 | |
| 129 | generateProtoTasks { |
| 130 | all().each { task -> |
| 131 | task.builtins { |
| 132 | remove java |
| 133 | javanano { |
Sunny Goyal | 2385ebe | 2017-07-19 01:24:07 -0700 | [diff] [blame] | 134 | option "java_package=launcher_log_extension.proto|com.android.launcher3.userevent.nano" |
Sunny Goyal | 58bcd5a | 2016-11-09 16:24:30 -0800 | [diff] [blame] | 135 | option "java_package=launcher_log.proto|com.android.launcher3.userevent.nano" |
Sunny Goyal | b26d8b6 | 2017-03-07 09:10:06 -0800 | [diff] [blame] | 136 | option "java_package=launcher_dump.proto|com.android.launcher3.model.nano" |
Sunny Goyal | 6c46a6d | 2016-11-23 02:24:32 +0530 | [diff] [blame] | 137 | option "enum_style=java" |
Sunny Goyal | 4a4b49f | 2016-08-25 22:21:40 -0700 | [diff] [blame] | 138 | } |
| 139 | } |
| 140 | } |
| 141 | } |
Sunny Goyal | edf329a | 2015-08-29 23:16:27 -0700 | [diff] [blame] | 142 | } |
| 143 | } |