2015-08-29 23:16:27 -07:00
|
|
|
buildscript {
|
2021-02-28 12:17:59 +01:00
|
|
|
ext {
|
2021-03-11 15:48:17 +01:00
|
|
|
kotlin_version = '1.4.31'
|
|
|
|
|
compose_version = '1.0.0-beta02'
|
2021-02-28 12:17:59 +01:00
|
|
|
}
|
2015-08-29 23:16:27 -07:00
|
|
|
repositories {
|
|
|
|
|
mavenCentral()
|
2018-04-23 14:03:04 -07:00
|
|
|
google()
|
2020-01-15 12:27:36 -08:00
|
|
|
jcenter()
|
2015-08-29 23:16:27 -07:00
|
|
|
}
|
|
|
|
|
dependencies {
|
2021-03-11 15:00:03 +01:00
|
|
|
classpath 'com.android.tools.build:gradle:7.0.0-alpha09'
|
2018-11-01 23:12:54 -07:00
|
|
|
classpath PROTOBUF_CLASS_PATH
|
2021-02-28 12:17:59 +01:00
|
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
2015-08-29 23:16:27 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-02-28 02:55:46 +05:30
|
|
|
final String FRAMEWORK_PREBUILTS_DIR = "prebuilts"
|
|
|
|
|
|
2021-03-15 22:05:07 +01:00
|
|
|
wrapper {
|
|
|
|
|
gradleVersion = '8.6.3'
|
|
|
|
|
}
|
|
|
|
|
|
2021-02-28 02:55:46 +05:30
|
|
|
allprojects {
|
|
|
|
|
repositories {
|
|
|
|
|
google()
|
|
|
|
|
mavenCentral()
|
|
|
|
|
jcenter()
|
|
|
|
|
maven { url 'https://jitpack.io' }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ext.addFrameworkJar = { String path ->
|
|
|
|
|
def frameworkJar = new File(rootProject.projectDir, 'prebuilts/libs/' + path)
|
|
|
|
|
if (!frameworkJar.exists()) {
|
|
|
|
|
throw new IllegalArgumentException("Framework jar path doesn't exist")
|
|
|
|
|
}
|
|
|
|
|
gradle.projectsEvaluated {
|
|
|
|
|
tasks.withType(JavaCompile) {
|
|
|
|
|
options.bootstrapClasspath = files([frameworkJar] + (options.bootstrapClasspath.files as Iterable<File>))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-03-15 13:39:00 -07:00
|
|
|
|
2015-08-29 23:16:27 -07:00
|
|
|
apply plugin: 'com.android.application'
|
2021-02-28 16:51:04 +05:30
|
|
|
apply plugin: 'kotlin-android'
|
2015-08-29 23:16:27 -07:00
|
|
|
apply plugin: 'com.google.protobuf'
|
|
|
|
|
|
2021-03-17 09:30:20 +01:00
|
|
|
final def commitHash = { ->
|
|
|
|
|
final def stdout = new ByteArrayOutputStream()
|
|
|
|
|
exec {
|
|
|
|
|
commandLine 'git', 'rev-parse', '--short=7', 'HEAD'
|
|
|
|
|
standardOutput = stdout
|
|
|
|
|
}
|
|
|
|
|
stdout.toString().trim()
|
|
|
|
|
}
|
|
|
|
|
|
2015-08-29 23:16:27 -07:00
|
|
|
android {
|
2019-01-30 11:40:38 -08:00
|
|
|
compileSdkVersion COMPILE_SDK
|
2018-11-01 23:12:54 -07:00
|
|
|
buildToolsVersion BUILD_TOOLS_VERSION
|
2015-08-29 23:16:27 -07:00
|
|
|
|
|
|
|
|
defaultConfig {
|
2019-01-25 15:10:18 -08:00
|
|
|
minSdkVersion 25
|
2021-03-03 14:25:21 +01:00
|
|
|
targetSdkVersion 30
|
2015-08-29 23:16:27 -07:00
|
|
|
versionCode 1
|
2021-03-17 09:30:20 +01:00
|
|
|
versionName "11.0-alpha.01+${commitHash()}"
|
|
|
|
|
setProperty("archivesBaseName", "Lawnchair-$versionName")
|
2015-10-16 17:18:54 -07:00
|
|
|
|
2018-08-24 17:48:25 -07:00
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
2018-04-23 14:03:04 -07:00
|
|
|
vectorDrawables.useSupportLibrary = true
|
2015-08-29 23:16:27 -07:00
|
|
|
}
|
2021-03-03 14:25:21 +01:00
|
|
|
|
|
|
|
|
buildFeatures {
|
|
|
|
|
compose true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
composeOptions {
|
2021-03-11 15:48:17 +01:00
|
|
|
kotlinCompilerExtensionVersion "1.0.0-beta02"
|
2021-03-03 14:25:21 +01:00
|
|
|
}
|
|
|
|
|
|
2015-08-29 23:16:27 -07:00
|
|
|
buildTypes {
|
|
|
|
|
debug {
|
|
|
|
|
minifyEnabled false
|
|
|
|
|
}
|
|
|
|
|
}
|
2016-08-25 22:21:40 -07:00
|
|
|
|
2021-02-28 16:51:04 +05:30
|
|
|
kotlinOptions {
|
|
|
|
|
jvmTarget = '1.8'
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-23 14:03:04 -07:00
|
|
|
compileOptions {
|
|
|
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
|
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-04 16: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-23 14:03:04 -07:00
|
|
|
|
2016-08-25 22:21:40 -07:00
|
|
|
productFlavors {
|
|
|
|
|
aosp {
|
2019-01-04 16:30:24 -08:00
|
|
|
dimension "app"
|
2021-02-28 23:01:05 +05:30
|
|
|
applicationId 'com.android.launcher3'
|
2016-08-25 22:21:40 -07:00
|
|
|
testApplicationId 'com.android.launcher3.tests'
|
|
|
|
|
}
|
2017-07-03 13:50:52 -07:00
|
|
|
|
|
|
|
|
l3go {
|
2021-02-28 23:01:05 +05:30
|
|
|
dimension "app"
|
|
|
|
|
applicationId 'com.android.launcher3'
|
|
|
|
|
testApplicationId 'com.android.launcher3.tests'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
lawn {
|
2019-01-04 16:30:24 -08:00
|
|
|
dimension "app"
|
2021-02-28 02:55:46 +05:30
|
|
|
applicationId 'ch.deletescape.lawnchair'
|
2017-07-03 13:50:52 -07:00
|
|
|
testApplicationId 'com.android.launcher3.tests'
|
|
|
|
|
}
|
2017-10-30 10:03:34 -07:00
|
|
|
|
2019-01-04 16:30:24 -08:00
|
|
|
withQuickstep {
|
|
|
|
|
dimension "recents"
|
2018-08-14 15:21:45 -07:00
|
|
|
|
|
|
|
|
minSdkVersion 28
|
2017-10-30 10:03:34 -07:00
|
|
|
}
|
2019-01-04 16:30:24 -08:00
|
|
|
|
|
|
|
|
withoutQuickstep {
|
|
|
|
|
dimension "recents"
|
|
|
|
|
}
|
2016-08-25 22:21:40 -07:00
|
|
|
}
|
2017-10-30 10:03:34 -07:00
|
|
|
|
|
|
|
|
// Disable release builds for now
|
|
|
|
|
android.variantFilter { variant ->
|
|
|
|
|
if (variant.buildType.name.endsWith('release')) {
|
2019-01-04 17:54:51 -08:00
|
|
|
variant.setIgnore(true)
|
|
|
|
|
}
|
2017-10-30 10:03:34 -07:00
|
|
|
}
|
|
|
|
|
|
2015-08-29 23:16:27 -07:00
|
|
|
sourceSets {
|
|
|
|
|
main {
|
2016-02-18 15:09:21 -08:00
|
|
|
res.srcDirs = ['res']
|
2019-01-04 15:55:42 -08:00
|
|
|
java.srcDirs = ['src', 'src_plugins']
|
2016-08-25 22:21:40 -07:00
|
|
|
manifest.srcFile 'AndroidManifest-common.xml'
|
2017-07-19 01:24:07 -07:00
|
|
|
proto {
|
|
|
|
|
srcDir 'protos/'
|
|
|
|
|
srcDir 'proto_overrides/'
|
|
|
|
|
}
|
2015-08-29 23:16:27 -07:00
|
|
|
}
|
2015-10-16 17:18:54 -07:00
|
|
|
|
|
|
|
|
androidTest {
|
2016-09-09 15:47:55 -07:00
|
|
|
res.srcDirs = ['tests/res']
|
2018-08-14 15:21:45 -07:00
|
|
|
java.srcDirs = ['tests/src', 'tests/tapl']
|
2017-01-21 01:33:02 -08:00
|
|
|
manifest.srcFile "tests/AndroidManifest-common.xml"
|
2015-10-16 17:18:54 -07:00
|
|
|
}
|
2016-08-25 22:21:40 -07:00
|
|
|
|
2017-10-30 10:03:34 -07:00
|
|
|
androidTestDebug {
|
|
|
|
|
manifest.srcFile "tests/AndroidManifest.xml"
|
2016-08-25 22:21:40 -07:00
|
|
|
}
|
2017-01-21 01:33:02 -08:00
|
|
|
|
2017-10-30 10:03:34 -07:00
|
|
|
aosp {
|
2019-01-04 16:30:24 -08:00
|
|
|
java.srcDirs = ['src_flags', 'src_shortcuts_overrides']
|
2020-01-15 12:27:36 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
aospWithoutQuickstep {
|
2019-01-04 16:30:24 -08:00
|
|
|
manifest.srcFile "AndroidManifest.xml"
|
2017-01-21 01:33:02 -08:00
|
|
|
}
|
2017-07-03 13:50:52 -07:00
|
|
|
|
2020-01-15 12:27:36 -08:00
|
|
|
aospWithQuickstep {
|
|
|
|
|
manifest.srcFile "quickstep/AndroidManifest-launcher.xml"
|
|
|
|
|
}
|
|
|
|
|
|
2017-07-03 13:50:52 -07:00
|
|
|
l3go {
|
|
|
|
|
res.srcDirs = ['go/res']
|
2019-01-04 16:30:24 -08:00
|
|
|
java.srcDirs = ['go/src']
|
2017-10-30 10:03:34 -07:00
|
|
|
manifest.srcFile "go/AndroidManifest.xml"
|
2017-07-03 13:50:52 -07:00
|
|
|
}
|
|
|
|
|
|
2020-01-15 12:27:36 -08:00
|
|
|
l3goWithoutQuickstepDebug {
|
|
|
|
|
manifest.srcFile "AndroidManifest.xml"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
l3goWithQuickstepDebug {
|
|
|
|
|
manifest.srcFile "quickstep/AndroidManifest-launcher.xml"
|
|
|
|
|
}
|
|
|
|
|
|
2021-02-28 23:01:05 +05:30
|
|
|
lawn {
|
|
|
|
|
java.srcDirs = ['src_flags', 'src_shortcuts_overrides', 'lawnchair/src']
|
|
|
|
|
res.srcDirs = ['lawnchair/res']
|
|
|
|
|
manifest.srcFile "lawnchair/AndroidManifest.xml"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
lawnWithoutQuickstep {
|
|
|
|
|
manifest.srcFile "AndroidManifest.xml"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
lawnWithQuickstep {
|
|
|
|
|
manifest.srcFile "quickstep/AndroidManifest-launcher.xml"
|
|
|
|
|
}
|
|
|
|
|
|
2019-01-04 16:30:24 -08:00
|
|
|
withoutQuickstep {
|
|
|
|
|
java.srcDirs = ['src_ui_overrides']
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
withQuickstep {
|
2019-01-04 17: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-29 23:16:27 -07:00
|
|
|
}
|
2021-02-28 02:55:46 +05:30
|
|
|
|
|
|
|
|
addFrameworkJar('framework.jar')
|
2015-08-29 23:16:27 -07:00
|
|
|
}
|
|
|
|
|
|
2020-01-15 12: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()
|
2021-03-01 12:37:21 +01:00
|
|
|
jcenter()
|
2020-01-15 12:27:36 -08:00
|
|
|
}
|
2015-08-29 23:16:27 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
2018-11-01 23:12:54 -07: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-15 12:27:36 -08:00
|
|
|
withQuickstepImplementation project(':SharedLibWrapper')
|
2019-03-15 13:39:00 -07:00
|
|
|
implementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/libs", include: 'launcher_protos.jar')
|
2021-02-28 02:55:46 +05:30
|
|
|
implementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/libs", include: 'sysui_statslog.jar')
|
2018-11-01 23:12:54 -07:00
|
|
|
|
2019-01-04 16:30:24 -08:00
|
|
|
// Recents lib dependency
|
2021-02-28 02:55:46 +05:30
|
|
|
withQuickstepImplementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/libs", include: 'sysui_shared.jar')
|
2018-04-23 14:03:04 -07:00
|
|
|
|
2019-01-04 16:30:24 -08:00
|
|
|
// Required for AOSP to compile. This is already included in the sysui_shared.jar
|
2019-03-15 13:39:00 -07:00
|
|
|
withoutQuickstepImplementation fileTree(dir: "${FRAMEWORK_PREBUILTS_DIR}/libs", include: 'plugin_core.jar')
|
2018-04-23 14:03:04 -07:00
|
|
|
|
2021-02-28 16:51:04 +05:30
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
2021-03-03 14:25:21 +01:00
|
|
|
testImplementation 'junit:junit:4.13.2'
|
|
|
|
|
androidTestImplementation 'org.mockito:mockito-core:3.8.0'
|
2018-04-23 14:03:04 -07:00
|
|
|
androidTestImplementation 'com.google.dexmaker:dexmaker:1.2'
|
|
|
|
|
androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:1.2'
|
2021-03-03 14:25:21 +01:00
|
|
|
androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
|
|
|
|
androidTestImplementation 'com.android.support.test:rules:1.0.2'
|
|
|
|
|
androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'
|
2018-11-01 23:12:54 -07:00
|
|
|
androidTestImplementation "androidx.annotation:annotation:${ANDROID_X_VERSION}"
|
2021-03-03 14:25:21 +01:00
|
|
|
implementation 'com.google.protobuf.nano:protobuf-javanano:3.2.0rc2'
|
2021-02-28 02:55:46 +05:30
|
|
|
implementation 'com.github.ChickenHook:RestrictionBypass:2.2'
|
2021-03-01 12:37:21 +01:00
|
|
|
implementation 'com.google.android.material:material:1.3.0'
|
2021-03-03 14:25:21 +01:00
|
|
|
|
2021-03-11 15:48:17 +01:00
|
|
|
implementation "androidx.compose.ui:ui:$compose_version"
|
|
|
|
|
implementation "androidx.compose.ui:ui-tooling:$compose_version"
|
|
|
|
|
implementation "androidx.compose.foundation:foundation:$compose_version"
|
|
|
|
|
implementation "androidx.compose.material:material:$compose_version"
|
|
|
|
|
implementation "androidx.compose.material:material-icons-core:$compose_version"
|
|
|
|
|
implementation "androidx.compose.material:material-icons-extended:$compose_version"
|
2021-03-11 15:51:35 +01:00
|
|
|
implementation 'androidx.activity:activity-compose:1.3.0-alpha04'
|
|
|
|
|
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:1.0.0-alpha03'
|
2021-03-11 15:48:17 +01:00
|
|
|
implementation "androidx.compose.runtime:runtime-livedata:$compose_version"
|
|
|
|
|
implementation "androidx.compose.runtime:runtime-rxjava2:$compose_version"
|
|
|
|
|
implementation "androidx.compose.compiler:compiler:$compose_version"
|
2021-03-07 16:00:17 +01:00
|
|
|
implementation "androidx.navigation:navigation-compose:1.0.0-alpha08"
|
2015-08-29 23:16:27 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protobuf {
|
|
|
|
|
// Configure the protoc executable
|
|
|
|
|
protoc {
|
2020-01-15 12:27:36 -08:00
|
|
|
artifact = 'com.google.protobuf:protoc:3.0.0'
|
2016-08-25 22:21:40 -07:00
|
|
|
|
|
|
|
|
generateProtoTasks {
|
|
|
|
|
all().each { task ->
|
|
|
|
|
task.builtins {
|
|
|
|
|
remove java
|
|
|
|
|
javanano {
|
2017-07-19 01:24:07 -07:00
|
|
|
option "java_package=launcher_log_extension.proto|com.android.launcher3.userevent.nano"
|
2016-11-09 16:24:30 -08:00
|
|
|
option "java_package=launcher_log.proto|com.android.launcher3.userevent.nano"
|
2017-03-07 09:10:06 -08:00
|
|
|
option "java_package=launcher_dump.proto|com.android.launcher3.model.nano"
|
2016-11-23 02:24:32 +05:30
|
|
|
option "enum_style=java"
|
2016-08-25 22:21:40 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-08-29 23:16:27 -07:00
|
|
|
}
|
|
|
|
|
}
|