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