2015-08-29 23:16:27 -07:00
|
|
|
buildscript {
|
2021-02-28 12:17:59 +01:00
|
|
|
ext {
|
2021-10-01 23:30:01 +07:00
|
|
|
kotlin_version = '1.5.30'
|
|
|
|
|
compose_version = '1.0.3'
|
2021-10-01 23:04:05 +07:00
|
|
|
accompanist_version = '0.19.0'
|
2021-06-15 20:26:41 +07:00
|
|
|
libsu_version = '3.1.2'
|
2021-10-05 14:13:08 +07:00
|
|
|
protocVersion = '3.18.0'
|
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()
|
2015-08-29 23:16:27 -07:00
|
|
|
}
|
|
|
|
|
dependencies {
|
2021-10-01 23:04:05 +07:00
|
|
|
classpath 'com.android.tools.build:gradle:7.1.0-alpha12'
|
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"
|
2021-04-24 14:12:14 +02:00
|
|
|
classpath 'com.google.android.gms:oss-licenses-plugin:0.10.4'
|
2015-08-29 23:16:27 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-02-28 02:55:46 +05:30
|
|
|
final String FRAMEWORK_PREBUILTS_DIR = "prebuilts"
|
2021-03-27 13:46:33 +05:30
|
|
|
final def keystorePropertiesFile = rootProject.file("keystore.properties")
|
2021-02-28 02:55:46 +05:30
|
|
|
|
2021-03-15 22:05:07 +01:00
|
|
|
wrapper {
|
2021-03-17 10:49:42 +01:00
|
|
|
gradleVersion = '6.8.3'
|
2021-03-15 22:05:07 +01:00
|
|
|
}
|
|
|
|
|
|
2021-02-28 02:55:46 +05:30
|
|
|
allprojects {
|
|
|
|
|
repositories {
|
|
|
|
|
google()
|
|
|
|
|
mavenCentral()
|
|
|
|
|
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-22 19:05:52 +01:00
|
|
|
apply plugin: 'com.google.android.gms.oss-licenses-plugin'
|
2015-08-29 23:16:27 -07:00
|
|
|
|
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
|
|
|
|
2021-03-26 08:17:34 +01:00
|
|
|
lintOptions {
|
|
|
|
|
checkReleaseBuilds false
|
|
|
|
|
}
|
|
|
|
|
|
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
|
2021-08-26 15:14:37 +02:00
|
|
|
versionCode 7
|
2021-08-26 23:00:13 +07:00
|
|
|
def versionDisplayName = "11.0 Alpha 6.1"
|
|
|
|
|
def majorVersion = versionDisplayName.split("\\.")[0]
|
|
|
|
|
versionName "${versionDisplayName} (${commitHash()})"
|
|
|
|
|
buildConfigField "String", "VERSION_DISPLAY_NAME", "\"${versionDisplayName}\""
|
|
|
|
|
buildConfigField "String", "MAJOR_VERSION", "\"${majorVersion}\""
|
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
|
|
|
|
2021-03-17 10:29:38 +01:00
|
|
|
applicationVariants.all { variant ->
|
|
|
|
|
variant.outputs.all {
|
|
|
|
|
outputFileName = "Lawnchair ${variant.versionName}.apk"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-03 14:25:21 +01:00
|
|
|
buildFeatures {
|
|
|
|
|
compose true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
composeOptions {
|
2021-10-01 23:30:01 +07:00
|
|
|
kotlinCompilerExtensionVersion = "1.0.3"
|
2021-03-03 14:25:21 +01:00
|
|
|
}
|
|
|
|
|
|
2021-03-27 13:46:33 +05:30
|
|
|
if (keystorePropertiesFile.exists()) {
|
|
|
|
|
final def keystoreProperties = new Properties()
|
|
|
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
|
|
|
|
|
|
|
|
|
signingConfigs {
|
|
|
|
|
release {
|
|
|
|
|
keyAlias keystoreProperties['keyAlias']
|
|
|
|
|
keyPassword keystoreProperties['keyPassword']
|
|
|
|
|
storeFile rootProject.file(keystoreProperties['storeFile'])
|
|
|
|
|
storePassword keystoreProperties['storePassword']
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2015-08-29 23:16:27 -07:00
|
|
|
buildTypes {
|
|
|
|
|
debug {
|
2021-03-17 10:45:54 +01:00
|
|
|
versionNameSuffix ".debug"
|
2015-08-29 23:16:27 -07:00
|
|
|
}
|
2021-03-27 07:39:44 +01:00
|
|
|
|
|
|
|
|
release {
|
2021-03-27 13:46:33 +05:30
|
|
|
if (keystorePropertiesFile.exists()) signingConfig signingConfigs.release
|
2021-03-27 13:41:28 +05:30
|
|
|
minifyEnabled true
|
2021-03-27 08:50:20 +01:00
|
|
|
shrinkResources true
|
2021-03-27 07:39:44 +01:00
|
|
|
versionNameSuffix ".release"
|
2021-03-27 13:41:28 +05:30
|
|
|
proguardFiles "proguard-android-optimize.txt", "proguard.flags"
|
2021-03-27 07:39:44 +01:00
|
|
|
}
|
2015-08-29 23:16:27 -07:00
|
|
|
}
|
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-03-21 18:22:24 +01:00
|
|
|
applicationId 'app.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
|
|
|
|
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 {
|
2021-01-27 14:45:58 -08:00
|
|
|
srcDirs = ['protos/', 'protos_overrides/']
|
2017-07-19 01:24:07 -07:00
|
|
|
}
|
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']
|
2021-03-19 03:38:39 +05:30
|
|
|
aidl.srcDirs = ['lawnchair/aidl']
|
2021-02-28 23:01:05 +05:30
|
|
|
res.srcDirs = ['lawnchair/res']
|
|
|
|
|
manifest.srcFile "lawnchair/AndroidManifest.xml"
|
2021-09-09 21:35:09 +07:00
|
|
|
assets {
|
|
|
|
|
srcDirs 'lawnchair/assets'
|
|
|
|
|
}
|
2021-02-28 23:01:05 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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()
|
|
|
|
|
}
|
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}"
|
2021-03-21 19:07:16 +01:00
|
|
|
implementation "androidx.preference:preference-ktx:${ANDROID_X_VERSION}"
|
2018-11-01 23:12:54 -07:00
|
|
|
implementation project(':IconLoader')
|
2020-01-15 12:27:36 -08:00
|
|
|
withQuickstepImplementation project(':SharedLibWrapper')
|
2018-11-01 23:12:54 -07:00
|
|
|
|
2019-01-04 16:30:24 -08:00
|
|
|
// Recents lib dependency
|
2021-06-03 10:55:06 +07:00
|
|
|
withQuickstepImplementation project(':SystemUIShared')
|
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'
|
2021-04-10 16:04:36 +02:00
|
|
|
androidTestImplementation 'org.mockito:mockito-core:3.9.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-02-28 02:55:46 +05:30
|
|
|
implementation 'com.github.ChickenHook:RestrictionBypass:2.2'
|
2021-07-03 18:56:30 +02:00
|
|
|
implementation 'com.google.android.material:material:1.4.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"
|
2021-08-05 01:51:32 +07:00
|
|
|
implementation 'androidx.activity:activity-compose:1.3.1'
|
2021-10-01 23:30:01 +07:00
|
|
|
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.4.0-rc01'
|
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-10-01 23:17:11 +07:00
|
|
|
implementation "androidx.navigation:navigation-compose:2.4.0-alpha10"
|
2021-08-05 10:14:44 +07:00
|
|
|
implementation "androidx.palette:palette-ktx:${ANDROID_X_VERSION}"
|
2021-05-18 00:06:23 +07:00
|
|
|
implementation "com.google.accompanist:accompanist-insets:$accompanist_version"
|
2021-08-05 20:41:40 +07:00
|
|
|
implementation "com.google.accompanist:accompanist-insets-ui:$accompanist_version"
|
2021-08-05 01:51:32 +07:00
|
|
|
implementation "com.google.accompanist:accompanist-navigation-animation:$accompanist_version"
|
2021-08-04 23:31:57 +07:00
|
|
|
implementation "com.google.accompanist:accompanist-placeholder-material:$accompanist_version"
|
2021-05-18 00:06:23 +07:00
|
|
|
implementation "com.google.accompanist:accompanist-systemuicontroller:$accompanist_version"
|
2021-08-05 01:51:32 +07:00
|
|
|
implementation "com.github.fornewid:material-motion-compose:0.6.1"
|
2021-08-05 00:59:06 +07:00
|
|
|
implementation "io.coil-kt:coil-compose:1.3.1"
|
2021-03-30 01:40:06 +05:30
|
|
|
implementation 'me.xdrop:fuzzywuzzy:1.3.1'
|
2021-06-15 20:26:41 +07:00
|
|
|
|
|
|
|
|
implementation "com.github.topjohnwu.libsu:core:$libsu_version"
|
|
|
|
|
implementation "com.github.topjohnwu.libsu:service:$libsu_version"
|
2015-08-29 23:16:27 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protobuf {
|
|
|
|
|
// Configure the protoc executable
|
|
|
|
|
protoc {
|
2020-10-23 09:26:44 -07:00
|
|
|
artifact = "com.google.protobuf:protoc:${protocVersion}"
|
|
|
|
|
}
|
|
|
|
|
generateProtoTasks {
|
|
|
|
|
all().each { task ->
|
|
|
|
|
task.builtins {
|
|
|
|
|
remove java
|
|
|
|
|
java {
|
|
|
|
|
option "lite"
|
2016-08-25 22:21:40 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-08-29 23:16:27 -07:00
|
|
|
}
|
|
|
|
|
}
|