123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190 |
- buildscript {
- repositories {
- mavenCentral()
- google()
- jcenter()
- }
- dependencies {
- classpath GRADLE_CLASS_PATH
- classpath PROTOBUF_CLASS_PATH
- }
- }
- final String ANDROID_TOP = "${rootDir}/../../.."
- final String FRAMEWORK_PREBUILTS_DIR = "${ANDROID_TOP}/prebuilts/framework_intermediates/"
- apply plugin: 'com.android.application'
- apply plugin: 'com.google.protobuf'
- android {
- compileSdkVersion COMPILE_SDK
- buildToolsVersion BUILD_TOOLS_VERSION
- defaultConfig {
- minSdkVersion 25
- targetSdkVersion 28
- versionCode 1
- versionName "1.0"
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- vectorDrawables.useSupportLibrary = true
- }
- buildTypes {
- debug {
- minifyEnabled false
- }
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- // The flavor dimensions for build variants (e.g. aospWithQuickstep, aospWithoutQuickstep)
- // See: https://developer.android.com/studio/build/build-variants#flavor-dimensions
- flavorDimensions "app", "recents"
- productFlavors {
- aosp {
- dimension "app"
- applicationId 'com.android.launcher3'
- testApplicationId 'com.android.launcher3.tests'
- }
- l3go {
- dimension "app"
- applicationId 'com.android.launcher3'
- testApplicationId 'com.android.launcher3.tests'
- }
- withQuickstep {
- dimension "recents"
- minSdkVersion 28
- }
- withoutQuickstep {
- dimension "recents"
- }
- }
- // Disable release builds for now
- android.variantFilter { variant ->
- if (variant.buildType.name.endsWith('release')) {
- variant.setIgnore(true)
- }
- }
- sourceSets {
- main {
- res.srcDirs = ['res']
- java.srcDirs = ['src', 'src_plugins']
- manifest.srcFile 'AndroidManifest-common.xml'
- proto {
- srcDir 'protos/'
- srcDir 'proto_overrides/'
- }
- }
- androidTest {
- res.srcDirs = ['tests/res']
- java.srcDirs = ['tests/src', 'tests/tapl']
- manifest.srcFile "tests/AndroidManifest-common.xml"
- }
- androidTestDebug {
- manifest.srcFile "tests/AndroidManifest.xml"
- }
- aosp {
- java.srcDirs = ['src_flags', 'src_shortcuts_overrides']
- }
- aospWithoutQuickstep {
- manifest.srcFile "AndroidManifest.xml"
- }
- aospWithQuickstep {
- manifest.srcFile "quickstep/AndroidManifest-launcher.xml"
- }
- l3go {
- res.srcDirs = ['go/res']
- java.srcDirs = ['go/src']
- manifest.srcFile "go/AndroidManifest.xml"
- }
- l3goWithoutQuickstepDebug {
- manifest.srcFile "AndroidManifest.xml"
- }
- l3goWithQuickstepDebug {
- manifest.srcFile "quickstep/AndroidManifest-launcher.xml"
- }
- withoutQuickstep {
- java.srcDirs = ['src_ui_overrides']
- }
- withQuickstep {
- res.srcDirs = ['quickstep/res', 'quickstep/recents_ui_overrides/res']
- java.srcDirs = ['quickstep/src', 'quickstep/recents_ui_overrides/src']
- manifest.srcFile "quickstep/AndroidManifest.xml"
- }
- }
- }
- allprojects {
- repositories {
- maven { url "../../../prebuilts/sdk/current/androidx/m2repository" }
- maven { url "../../../prebuilts/fullsdk-darwin/extras/android/m2repository" }
- maven { url "../../../prebuilts/fullsdk-linux/extras/android/m2repository" }
- mavenCentral()
- google()
- }
- }
- dependencies {
- implementation "androidx.dynamicanimation:dynamicanimation:${ANDROID_X_VERSION}"
- implementation "androidx.recyclerview:recyclerview:${ANDROID_X_VERSION}"
- implementation "androidx.preference:preference:${ANDROID_X_VERSION}"
- implementation project(':IconLoader')
- withQuickstepImplementation project(':SharedLibWrapper')
- implementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/libs", include: 'launcher_protos.jar')
- // Recents lib dependency
- withQuickstepImplementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/quickstep/libs", include: 'sysui_shared.jar')
- // Required for AOSP to compile. This is already included in the sysui_shared.jar
- withoutQuickstepImplementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/libs", include: 'plugin_core.jar')
- testImplementation 'junit:junit:4.12'
- androidTestImplementation "org.mockito:mockito-core:1.9.5"
- androidTestImplementation 'com.google.dexmaker:dexmaker:1.2'
- androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:1.2'
- androidTestImplementation 'com.android.support.test:runner:1.0.0'
- androidTestImplementation 'com.android.support.test:rules:1.0.0'
- androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
- androidTestImplementation "androidx.annotation:annotation:${ANDROID_X_VERSION}"
- }
- protobuf {
- // Configure the protoc executable
- protoc {
- artifact = 'com.google.protobuf:protoc:3.0.0'
- generateProtoTasks {
- all().each { task ->
- task.builtins {
- remove java
- javanano {
- option "java_package=launcher_log_extension.proto|com.android.launcher3.userevent.nano"
- option "java_package=launcher_log.proto|com.android.launcher3.userevent.nano"
- option "java_package=launcher_dump.proto|com.android.launcher3.model.nano"
- option "enum_style=java"
- }
- }
- }
- }
- }
- }
|