2015-08-30 14:16:27 +08:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
2018-04-24 05:03:04 +08:00
|
|
|
google()
|
2015-08-30 14:16:27 +08:00
|
|
|
}
|
|
|
|
dependencies {
|
2018-11-02 14:12:54 +08:00
|
|
|
classpath GRADLE_CLASS_PATH
|
|
|
|
classpath PROTOBUF_CLASS_PATH
|
2015-08-30 14:16:27 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-16 04:39:00 +08:00
|
|
|
final String ANDROID_TOP = "${rootDir}/../../.."
|
|
|
|
final String FRAMEWORK_PREBUILTS_DIR = "${ANDROID_TOP}/prebuilts/framework_intermediates/"
|
|
|
|
|
2015-08-30 14:16:27 +08:00
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
apply plugin: 'com.google.protobuf'
|
|
|
|
|
|
|
|
android {
|
2019-01-31 03:40:38 +08:00
|
|
|
compileSdkVersion COMPILE_SDK
|
2018-11-02 14:12:54 +08:00
|
|
|
buildToolsVersion BUILD_TOOLS_VERSION
|
2015-08-30 14:16:27 +08:00
|
|
|
|
|
|
|
defaultConfig {
|
2019-01-26 07:10:18 +08:00
|
|
|
minSdkVersion 25
|
2018-01-27 04:24:10 +08:00
|
|
|
targetSdkVersion 28
|
2015-08-30 14:16:27 +08:00
|
|
|
versionCode 1
|
|
|
|
versionName "1.0"
|
2015-10-17 08:18:54 +08:00
|
|
|
|
2018-08-25 08:48:25 +08:00
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
2018-04-24 05:03:04 +08:00
|
|
|
vectorDrawables.useSupportLibrary = true
|
2015-08-30 14:16:27 +08:00
|
|
|
}
|
|
|
|
buildTypes {
|
|
|
|
debug {
|
|
|
|
minifyEnabled false
|
|
|
|
}
|
|
|
|
}
|
2016-08-26 13:21:40 +08:00
|
|
|
|
2018-04-24 05:03:04 +08:00
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
}
|
|
|
|
|
2019-01-05 08:30:24 +08:00
|
|
|
// The flavor dimensions for build variants (e.g. aospWithQuickstep, aospWithoutQuickstep)
|
|
|
|
// See: https://developer.android.com/studio/build/build-variants#flavor-dimensions
|
|
|
|
flavorDimensions "app", "recents"
|
2018-04-24 05:03:04 +08:00
|
|
|
|
2016-08-26 13:21:40 +08:00
|
|
|
productFlavors {
|
|
|
|
aosp {
|
2019-01-05 08:30:24 +08:00
|
|
|
dimension "app"
|
2016-08-26 13:21:40 +08:00
|
|
|
applicationId 'com.android.launcher3'
|
|
|
|
testApplicationId 'com.android.launcher3.tests'
|
|
|
|
}
|
2017-07-04 04:50:52 +08:00
|
|
|
|
|
|
|
l3go {
|
2019-01-05 08:30:24 +08:00
|
|
|
dimension "app"
|
2017-07-04 04:50:52 +08:00
|
|
|
applicationId 'com.android.launcher3'
|
|
|
|
testApplicationId 'com.android.launcher3.tests'
|
|
|
|
}
|
2017-10-31 01:03:34 +08:00
|
|
|
|
2019-01-05 08:30:24 +08:00
|
|
|
withQuickstep {
|
|
|
|
dimension "recents"
|
2018-08-15 06:21:45 +08:00
|
|
|
|
|
|
|
minSdkVersion 28
|
2017-10-31 01:03:34 +08:00
|
|
|
}
|
2019-01-05 08:30:24 +08:00
|
|
|
|
|
|
|
withoutQuickstep {
|
|
|
|
dimension "recents"
|
|
|
|
}
|
2016-08-26 13:21:40 +08:00
|
|
|
}
|
2017-10-31 01:03:34 +08:00
|
|
|
|
|
|
|
// Disable release builds for now
|
|
|
|
android.variantFilter { variant ->
|
|
|
|
if (variant.buildType.name.endsWith('release')) {
|
2019-01-05 09:54:51 +08:00
|
|
|
variant.setIgnore(true)
|
|
|
|
}
|
2017-10-31 01:03:34 +08:00
|
|
|
}
|
|
|
|
|
2015-08-30 14:16:27 +08:00
|
|
|
sourceSets {
|
|
|
|
main {
|
2016-02-19 07:09:21 +08:00
|
|
|
res.srcDirs = ['res']
|
2019-01-05 07:55:42 +08:00
|
|
|
java.srcDirs = ['src', 'src_plugins']
|
2016-08-26 13:21:40 +08:00
|
|
|
manifest.srcFile 'AndroidManifest-common.xml'
|
2017-07-19 16:24:07 +08:00
|
|
|
proto {
|
2021-01-28 06:45:58 +08:00
|
|
|
srcDirs = ['protos/', 'protos_overrides/']
|
2017-07-19 16:24:07 +08:00
|
|
|
}
|
2015-08-30 14:16:27 +08:00
|
|
|
}
|
2015-10-17 08:18:54 +08:00
|
|
|
|
|
|
|
androidTest {
|
2016-09-10 06:47:55 +08:00
|
|
|
res.srcDirs = ['tests/res']
|
2018-08-15 06:21:45 +08:00
|
|
|
java.srcDirs = ['tests/src', 'tests/tapl']
|
2017-01-21 17:33:02 +08:00
|
|
|
manifest.srcFile "tests/AndroidManifest-common.xml"
|
2015-10-17 08:18:54 +08:00
|
|
|
}
|
2016-08-26 13:21:40 +08:00
|
|
|
|
2017-10-31 01:03:34 +08:00
|
|
|
androidTestDebug {
|
|
|
|
manifest.srcFile "tests/AndroidManifest.xml"
|
2016-08-26 13:21:40 +08:00
|
|
|
}
|
2017-01-21 17:33:02 +08:00
|
|
|
|
2017-10-31 01:03:34 +08:00
|
|
|
aosp {
|
2019-01-05 08:30:24 +08:00
|
|
|
java.srcDirs = ['src_flags', 'src_shortcuts_overrides']
|
2020-01-16 04:27:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
aospWithoutQuickstep {
|
2019-01-05 08:30:24 +08:00
|
|
|
manifest.srcFile "AndroidManifest.xml"
|
2017-01-21 17:33:02 +08:00
|
|
|
}
|
2017-07-04 04:50:52 +08:00
|
|
|
|
2020-01-16 04:27:36 +08:00
|
|
|
aospWithQuickstep {
|
|
|
|
manifest.srcFile "quickstep/AndroidManifest-launcher.xml"
|
|
|
|
}
|
|
|
|
|
2017-07-04 04:50:52 +08:00
|
|
|
l3go {
|
|
|
|
res.srcDirs = ['go/res']
|
2019-01-05 08:30:24 +08:00
|
|
|
java.srcDirs = ['go/src']
|
2017-10-31 01:03:34 +08:00
|
|
|
manifest.srcFile "go/AndroidManifest.xml"
|
2017-07-04 04:50:52 +08:00
|
|
|
}
|
|
|
|
|
2020-01-16 04:27:36 +08:00
|
|
|
l3goWithoutQuickstepDebug {
|
|
|
|
manifest.srcFile "AndroidManifest.xml"
|
|
|
|
}
|
|
|
|
|
|
|
|
l3goWithQuickstepDebug {
|
|
|
|
manifest.srcFile "quickstep/AndroidManifest-launcher.xml"
|
|
|
|
}
|
|
|
|
|
2019-01-05 08:30:24 +08:00
|
|
|
withoutQuickstep {
|
|
|
|
java.srcDirs = ['src_ui_overrides']
|
|
|
|
}
|
|
|
|
|
|
|
|
withQuickstep {
|
2019-01-05 09:54:51 +08:00
|
|
|
res.srcDirs = ['quickstep/res', 'quickstep/recents_ui_overrides/res']
|
|
|
|
java.srcDirs = ['quickstep/src', 'quickstep/recents_ui_overrides/src']
|
|
|
|
manifest.srcFile "quickstep/AndroidManifest.xml"
|
|
|
|
}
|
2015-08-30 14:16:27 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-16 04:27:36 +08:00
|
|
|
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()
|
|
|
|
}
|
2015-08-30 14:16:27 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2018-11-02 14:12:54 +08:00
|
|
|
implementation "androidx.dynamicanimation:dynamicanimation:${ANDROID_X_VERSION}"
|
|
|
|
implementation "androidx.recyclerview:recyclerview:${ANDROID_X_VERSION}"
|
|
|
|
implementation "androidx.preference:preference:${ANDROID_X_VERSION}"
|
|
|
|
implementation project(':IconLoader')
|
2020-01-16 04:27:36 +08:00
|
|
|
withQuickstepImplementation project(':SharedLibWrapper')
|
2018-11-02 14:12:54 +08:00
|
|
|
|
2019-01-05 08:30:24 +08:00
|
|
|
// Recents lib dependency
|
2019-03-16 04:39:00 +08:00
|
|
|
withQuickstepImplementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/quickstep/libs", include: 'sysui_shared.jar')
|
2018-04-24 05:03:04 +08:00
|
|
|
|
2019-01-05 08:30:24 +08:00
|
|
|
// Required for AOSP to compile. This is already included in the sysui_shared.jar
|
2019-03-16 04:39:00 +08:00
|
|
|
withoutQuickstepImplementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/libs", include: 'plugin_core.jar')
|
2018-04-24 05:03:04 +08:00
|
|
|
|
|
|
|
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'
|
2018-11-02 14:12:54 +08:00
|
|
|
androidTestImplementation "androidx.annotation:annotation:${ANDROID_X_VERSION}"
|
2021-11-10 05:19:21 +08:00
|
|
|
|
|
|
|
api 'com.airbnb.android:lottie:3.3.0'
|
2015-08-30 14:16:27 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
protobuf {
|
|
|
|
// Configure the protoc executable
|
|
|
|
protoc {
|
2020-10-24 00:26:44 +08:00
|
|
|
artifact = "com.google.protobuf:protoc:${protocVersion}"
|
|
|
|
}
|
|
|
|
generateProtoTasks {
|
|
|
|
all().each { task ->
|
|
|
|
task.builtins {
|
|
|
|
remove java
|
|
|
|
java {
|
|
|
|
option "lite"
|
2016-08-26 13:21:40 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-08-30 14:16:27 +08:00
|
|
|
}
|
2021-01-28 06:45:58 +08:00
|
|
|
}
|