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