Fix gradle build of Launcher3

Test: build, run

Change-Id: I121fe3174bdb2292ae8f08ab610da2bac01251b3
This commit is contained in:
Amos Bianchi 2020-01-15 12:27:36 -08:00
parent bb150db0cd
commit dda7490c34
5 changed files with 49 additions and 34 deletions

View File

@ -0,0 +1,17 @@
apply plugin: 'java'
final String ANDROID_TOP = "${rootDir}/../../.."
final String FRAMEWORK_PREBUILTS_DIR = "${ANDROID_TOP}/prebuilts/framework_intermediates/"
sourceSets {
main {
java.srcDirs = ["${ANDROID_TOP}/frameworks/lib/systemui/SharedLibWrapper/src"]
}
}
sourceCompatibility = 1.8
dependencies {
implementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/quickstep/libs", include: 'sysui_shared.jar')
compileOnly fileTree(dir: "$ANDROID_TOP/prebuilts/fullsdk-${org.gradle.internal.os.OperatingSystem.current().isMacOsX() ? "darwin" : "linux"}/platforms/${COMPILE_SDK}", include: 'android.jar')
}

View File

@ -2,6 +2,7 @@ buildscript {
repositories {
mavenCentral()
google()
jcenter()
}
dependencies {
classpath GRADLE_CLASS_PATH
@ -62,12 +63,6 @@ android {
minSdkVersion 28
}
withQuickstepIconRecents {
dimension "recents"
minSdkVersion 28
}
withoutQuickstep {
dimension "recents"
}
@ -78,11 +73,6 @@ android {
if (variant.buildType.name.endsWith('release')) {
variant.setIgnore(true)
}
// Icon recents is Go only
if (name.contains("WithQuickstepIconRecents") && !name.contains("l3go")) {
variant.setIgnore(true)
}
}
sourceSets {
@ -96,10 +86,6 @@ android {
}
}
debug {
manifest.srcFile "AndroidManifest.xml"
}
androidTest {
res.srcDirs = ['tests/res']
java.srcDirs = ['tests/src', 'tests/tapl']
@ -112,15 +98,30 @@ android {
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']
}
@ -130,20 +131,17 @@ android {
java.srcDirs = ['quickstep/src', 'quickstep/recents_ui_overrides/src']
manifest.srcFile "quickstep/AndroidManifest.xml"
}
withQuickstepIconRecents {
res.srcDirs = ['quickstep/res', 'go/quickstep/res']
java.srcDirs = ['quickstep/src', 'go/quickstep/src']
manifest.srcFile "quickstep/AndroidManifest.xml"
}
}
}
repositories {
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 {
@ -151,14 +149,12 @@ dependencies {
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')
// Recents lib dependency for Go
withQuickstepIconRecentsImplementation 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')
@ -175,7 +171,7 @@ dependencies {
protobuf {
// Configure the protoc executable
protoc {
artifact = 'com.google.protobuf:protoc:3.0.0-alpha-3'
artifact = 'com.google.protobuf:protoc:3.0.0'
generateProtoTasks {
all().each { task ->

View File

@ -2,11 +2,11 @@
android.useAndroidX = true
android.enableJetifier = true
ANDROID_X_VERSION=1.0.0-beta01
ANDROID_X_VERSION=1+
GRADLE_CLASS_PATH=com.android.tools.build:gradle:3.3.0
GRADLE_CLASS_PATH=com.android.tools.build:gradle:3.5.1
PROTOBUF_CLASS_PATH=com.google.protobuf:protobuf-gradle-plugin:0.8.6
PROTOBUF_CLASS_PATH=com.google.protobuf:protobuf-gradle-plugin:0.8.8
PROTOBUF_DEPENDENCY=com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7
BUILD_TOOLS_VERSION=28.0.3

View File

@ -3,7 +3,6 @@ apply plugin: 'com.android.library'
android {
compileSdkVersion COMPILE_SDK
buildToolsVersion BUILD_TOOLS_VERSION
publishNonDefault true
defaultConfig {
minSdkVersion 25

View File

@ -1,2 +1,5 @@
include ':IconLoader'
project(':IconLoader').projectDir = new File(rootDir, 'iconloaderlib')
include ':SharedLibWrapper'
project(':SharedLibWrapper').projectDir = new File(rootDir, 'SharedLibWrapper')