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 { repositories {
mavenCentral() mavenCentral()
google() google()
jcenter()
} }
dependencies { dependencies {
classpath GRADLE_CLASS_PATH classpath GRADLE_CLASS_PATH
@ -62,12 +63,6 @@ android {
minSdkVersion 28 minSdkVersion 28
} }
withQuickstepIconRecents {
dimension "recents"
minSdkVersion 28
}
withoutQuickstep { withoutQuickstep {
dimension "recents" dimension "recents"
} }
@ -78,11 +73,6 @@ android {
if (variant.buildType.name.endsWith('release')) { if (variant.buildType.name.endsWith('release')) {
variant.setIgnore(true) variant.setIgnore(true)
} }
// Icon recents is Go only
if (name.contains("WithQuickstepIconRecents") && !name.contains("l3go")) {
variant.setIgnore(true)
}
} }
sourceSets { sourceSets {
@ -96,10 +86,6 @@ android {
} }
} }
debug {
manifest.srcFile "AndroidManifest.xml"
}
androidTest { androidTest {
res.srcDirs = ['tests/res'] res.srcDirs = ['tests/res']
java.srcDirs = ['tests/src', 'tests/tapl'] java.srcDirs = ['tests/src', 'tests/tapl']
@ -112,15 +98,30 @@ android {
aosp { aosp {
java.srcDirs = ['src_flags', 'src_shortcuts_overrides'] java.srcDirs = ['src_flags', 'src_shortcuts_overrides']
}
aospWithoutQuickstep {
manifest.srcFile "AndroidManifest.xml" manifest.srcFile "AndroidManifest.xml"
} }
aospWithQuickstep {
manifest.srcFile "quickstep/AndroidManifest-launcher.xml"
}
l3go { l3go {
res.srcDirs = ['go/res'] res.srcDirs = ['go/res']
java.srcDirs = ['go/src'] java.srcDirs = ['go/src']
manifest.srcFile "go/AndroidManifest.xml" manifest.srcFile "go/AndroidManifest.xml"
} }
l3goWithoutQuickstepDebug {
manifest.srcFile "AndroidManifest.xml"
}
l3goWithQuickstepDebug {
manifest.srcFile "quickstep/AndroidManifest-launcher.xml"
}
withoutQuickstep { withoutQuickstep {
java.srcDirs = ['src_ui_overrides'] java.srcDirs = ['src_ui_overrides']
} }
@ -130,20 +131,17 @@ android {
java.srcDirs = ['quickstep/src', 'quickstep/recents_ui_overrides/src'] java.srcDirs = ['quickstep/src', 'quickstep/recents_ui_overrides/src']
manifest.srcFile "quickstep/AndroidManifest.xml" 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-darwin/extras/android/m2repository" }
maven { url "../../../prebuilts/fullsdk-linux/extras/android/m2repository" } maven { url "../../../prebuilts/fullsdk-linux/extras/android/m2repository" }
mavenCentral() mavenCentral()
google() google()
}
} }
dependencies { dependencies {
@ -151,14 +149,12 @@ dependencies {
implementation "androidx.recyclerview:recyclerview:${ANDROID_X_VERSION}" implementation "androidx.recyclerview:recyclerview:${ANDROID_X_VERSION}"
implementation "androidx.preference:preference:${ANDROID_X_VERSION}" implementation "androidx.preference:preference:${ANDROID_X_VERSION}"
implementation project(':IconLoader') implementation project(':IconLoader')
withQuickstepImplementation project(':SharedLibWrapper')
implementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/libs", include: 'launcher_protos.jar') implementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/libs", include: 'launcher_protos.jar')
// Recents lib dependency // Recents lib dependency
withQuickstepImplementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/quickstep/libs", include: 'sysui_shared.jar') 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 // 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') withoutQuickstepImplementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/libs", include: 'plugin_core.jar')
@ -175,7 +171,7 @@ dependencies {
protobuf { protobuf {
// Configure the protoc executable // Configure the protoc executable
protoc { protoc {
artifact = 'com.google.protobuf:protoc:3.0.0-alpha-3' artifact = 'com.google.protobuf:protoc:3.0.0'
generateProtoTasks { generateProtoTasks {
all().each { task -> all().each { task ->

View File

@ -2,11 +2,11 @@
android.useAndroidX = true android.useAndroidX = true
android.enableJetifier = 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 PROTOBUF_DEPENDENCY=com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7
BUILD_TOOLS_VERSION=28.0.3 BUILD_TOOLS_VERSION=28.0.3

View File

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

View File

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