diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000000..87f98092e2
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,11 @@
+root = true
+
+[*]
+charset = utf-8
+indent_size = 4
+insert_final_newline = true
+max_line_length = 100
+trim_trailing_whitespace = true
+
+[*.{yml,yaml}]
+indent_size = 2
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000000..411c077775
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,4 @@
+* text=auto eol=lf
+
+*.bat text eol=crlf
+*.jar binary
diff --git a/.github/workflows/build_debug_apk.yml b/.github/workflows/build_debug_apk.yml
index 63a39ad570..af5bcf27c7 100644
--- a/.github/workflows/build_debug_apk.yml
+++ b/.github/workflows/build_debug_apk.yml
@@ -9,6 +9,7 @@ on:
- '**'
- '!12.1-dev-localization'
- '!12.1-alpha'
+ pull_request:
jobs:
build-debug-apk:
@@ -19,38 +20,32 @@ jobs:
uses: actions/checkout@v3
with:
submodules: true
- - name: Set up Java 11
+ - name: Set up Java 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
- java-version: 11
+ java-version: 17
- uses: gradle/gradle-build-action@v2
- - name: Grant execution permission to Gradle Wrapper
- run: chmod +x gradlew
+ - name: Write sign info
+ if: github.repository == 'LawnchairLauncher/lawnchair'
+ run: |
+ if [ ! -z "${{ secrets.KEYSTORE }}" ]; then
+ echo storePassword='${{ secrets.KEYSTORE_PASSWORD }}' >> keystore.properties
+ echo keyAlias='${{ secrets.KEY_ALIAS }}' >> keystore.properties
+ echo keyPassword='${{ secrets.KEY_PASSWORD }}' >> keystore.properties
+ echo storeFile='${{ github.workspace }}/key.jks' >> keystore.properties
+ echo ${{ secrets.KEYSTORE }} | base64 --decode > ${{ github.workspace }}/key.jks
+ fi
- name: Build debug APK
run: ./gradlew assembleLawnWithQuickstepDebug
- - name: Sign debug APK
- uses: r0adkll/sign-android-release@v1
- id: sign-debug-apk
- with:
- releaseDirectory: build/outputs/apk/lawnWithQuickstep/debug
- signingKeyBase64: ${{ secrets.KEYSTORE }}
- alias: ${{ secrets.KEY_ALIAS }}
- keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }}
- keyPassword: ${{ secrets.KEY_PASSWORD }}
- - name: Rename artifact
- run: |
- oldArtifactPath="${{ steps.sign-debug-apk.outputs.signedReleaseFile }}"
- newArtifactPath="${oldArtifactPath%'-signed.apk'}.apk"
- echo "ARTIFACT_PATH=$newArtifactPath" >> $GITHUB_ENV
- mv "$oldArtifactPath" "$newArtifactPath"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: Debug APK
- path: ${{ env.ARTIFACT_PATH }}
+ path: build/outputs/apk/lawnWithQuickstep/debug/*.apk
send-notifications:
runs-on: ubuntu-latest
+ if: github.repository == 'LawnchairLauncher/lawnchair'
needs: build-debug-apk
steps:
- name: Check out repository
diff --git a/.github/workflows/build_release_apk.yml b/.github/workflows/build_release_apk.yml
index a46d4b1893..71441f3e5d 100644
--- a/.github/workflows/build_release_apk.yml
+++ b/.github/workflows/build_release_apk.yml
@@ -15,39 +15,32 @@ jobs:
uses: actions/checkout@v3
with:
submodules: true
- - name: Set up Java 11
+ - name: Set up Java 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
- java-version: 11
+ java-version: 17
- uses: gradle/gradle-build-action@v2
- - name: Grant execution permission to Gradle Wrapper
- run: chmod +x gradlew
+ - name: Write sign info
+ if: github.repository == 'LawnchairLauncher/lawnchair'
+ run: |
+ if [ ! -z "${{ secrets.KEYSTORE }}" ]; then
+ echo storePassword='${{ secrets.KEYSTORE_PASSWORD }}' >> keystore.properties
+ echo keyAlias='${{ secrets.KEY_ALIAS }}' >> keystore.properties
+ echo keyPassword='${{ secrets.KEY_PASSWORD }}' >> keystore.properties
+ echo storeFile='${{ github.workspace }}/key.jks' >> keystore.properties
+ echo ${{ secrets.KEYSTORE }} | base64 --decode > ${{ github.workspace }}/key.jks
+ fi
- name: Build release APK
run: ./gradlew assembleLawnWithQuickstepRelease
- - name: Sign release APK
- uses: r0adkll/sign-android-release@v1
- id: sign-release-apk
- with:
- releaseDirectory: build/outputs/apk/lawnWithQuickstep/release
- signingKeyBase64: ${{ secrets.KEYSTORE }}
- alias: ${{ secrets.KEY_ALIAS }}
- keyStorePassword: ${{ secrets.KEYSTORE_PASSWORD }}
- keyPassword: ${{ secrets.KEY_PASSWORD }}
- - name: Rename artifact
- continue-on-error: true
- run: |
- oldArtifactPath="${{ steps.sign-release-apk.outputs.signedReleaseFile }}"
- newArtifactPath="${oldArtifactPath%'-signed.apk'}.apk"
- echo "ARTIFACT_PATH=$newArtifactPath" >> $GITHUB_ENV
- mv "$oldArtifactPath" "$newArtifactPath"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: Release APK
- path: ${{ env.ARTIFACT_PATH }}
+ path: build/outputs/apk/lawnWithQuickstep/release/*.apk
send-notifications:
runs-on: ubuntu-latest
+ if: github.repository == 'LawnchairLauncher/lawnchair'
needs: build-release-apk
steps:
- name: Check out repository
diff --git a/.github/workflows/release_update.yml b/.github/workflows/release_update.yml
index 1e64e36350..a8917a80b4 100644
--- a/.github/workflows/release_update.yml
+++ b/.github/workflows/release_update.yml
@@ -26,14 +26,12 @@ jobs:
uses: actions/checkout@v3
with:
submodules: true
- - name: Set up Java 11
+ - name: Set up Java 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
- java-version: 11
+ java-version: 17
- uses: gradle/gradle-build-action@v2
- - name: Grant execution permission to Gradle Wrapper
- run: chmod +x gradlew
- name: Build release APK
run: ./gradlew assembleLawnWithQuickstepRelease
- name: Sign release APK
diff --git a/CompatLib/.gitignore b/CompatLib/.gitignore
deleted file mode 100644
index 42afabfd2a..0000000000
--- a/CompatLib/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
\ No newline at end of file
diff --git a/CompatLib/build.gradle b/CompatLib/build.gradle
index 7749def9bc..ffdb852dac 100644
--- a/CompatLib/build.gradle
+++ b/CompatLib/build.gradle
@@ -4,11 +4,12 @@ plugins {
}
android {
- compileSdk 31
+ compileSdk COMPILE_SDK
+ namespace "app.lawnchair.compatlib"
defaultConfig {
- minSdk 26
- targetSdk 31
+ minSdk MIN_SDK
+ targetSdk TARGET_SDK
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
diff --git a/CompatLib/src/main/AndroidManifest.xml b/CompatLib/src/main/AndroidManifest.xml
index da3d364cbc..8072ee00db 100644
--- a/CompatLib/src/main/AndroidManifest.xml
+++ b/CompatLib/src/main/AndroidManifest.xml
@@ -1,5 +1,2 @@
-
-
-
\ No newline at end of file
+
diff --git a/CompatLibVR/.gitignore b/CompatLibVR/.gitignore
deleted file mode 100644
index 42afabfd2a..0000000000
--- a/CompatLibVR/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
\ No newline at end of file
diff --git a/CompatLibVR/build.gradle b/CompatLibVR/build.gradle
index fbb4a866e9..18c3848e8f 100644
--- a/CompatLibVR/build.gradle
+++ b/CompatLibVR/build.gradle
@@ -4,11 +4,12 @@ plugins {
}
android {
- compileSdk 30
+ compileSdk COMPILE_SDK
+ namespace "app.lawnchair.compatlib.eleven"
defaultConfig {
- minSdk 26
- targetSdk 31
+ minSdk MIN_SDK
+ targetSdk TARGET_SDK
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
@@ -34,4 +35,4 @@ android {
dependencies {
implementation 'androidx.core:core-ktx:1.7.0'
implementation project(':CompatLib')
-}
\ No newline at end of file
+}
diff --git a/CompatLibVR/src/main/AndroidManifest.xml b/CompatLibVR/src/main/AndroidManifest.xml
index e65e490ae0..8072ee00db 100644
--- a/CompatLibVR/src/main/AndroidManifest.xml
+++ b/CompatLibVR/src/main/AndroidManifest.xml
@@ -1,5 +1,2 @@
-
-
-
\ No newline at end of file
+
diff --git a/CompatLibVS/.gitignore b/CompatLibVS/.gitignore
deleted file mode 100644
index 42afabfd2a..0000000000
--- a/CompatLibVS/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
\ No newline at end of file
diff --git a/CompatLibVS/build.gradle b/CompatLibVS/build.gradle
index c8f81e8359..c011da38e5 100644
--- a/CompatLibVS/build.gradle
+++ b/CompatLibVS/build.gradle
@@ -4,11 +4,12 @@ plugins {
}
android {
- compileSdk 31
+ compileSdk COMPILE_SDK
+ namespace "app.lawnchair.compatlib.twelve"
defaultConfig {
- minSdk 26
- targetSdk 31
+ minSdk MIN_SDK
+ targetSdk TARGET_SDK
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
@@ -34,4 +35,4 @@ android {
dependencies {
implementation 'androidx.core:core-ktx:1.7.0'
implementation project(':CompatLib')
-}
\ No newline at end of file
+}
diff --git a/CompatLibVS/src/main/AndroidManifest.xml b/CompatLibVS/src/main/AndroidManifest.xml
index e2ed8d4db5..8072ee00db 100644
--- a/CompatLibVS/src/main/AndroidManifest.xml
+++ b/CompatLibVS/src/main/AndroidManifest.xml
@@ -1,5 +1,2 @@
-
-
-
\ No newline at end of file
+
diff --git a/SystemUIShared/.gitignore b/SystemUIShared/.gitignore
deleted file mode 100644
index 6213826ab5..0000000000
--- a/SystemUIShared/.gitignore
+++ /dev/null
@@ -1,13 +0,0 @@
-*.iml
-.project
-.classpath
-.project.properties
-gen/
-bin/
-.idea/
-.gradle/
-local.properties
-gradle/
-build/
-gradlew*
-.DS_Store
diff --git a/SystemUIShared/build.gradle b/SystemUIShared/build.gradle
index c70381ce6b..7fc1a058fa 100644
--- a/SystemUIShared/build.gradle
+++ b/SystemUIShared/build.gradle
@@ -2,14 +2,11 @@ apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
android {
- compileSdkVersion COMPILE_SDK
- buildToolsVersion BUILD_TOOLS_VERSION
+ compileSdk COMPILE_SDK
defaultConfig {
- minSdkVersion 26
- targetSdkVersion 28
- versionCode 1
- versionName "1.0"
+ minSdk MIN_SDK
+ targetSdk TARGET_SDK
}
sourceSets {
@@ -21,7 +18,7 @@ android {
}
}
- lintOptions {
+ lint {
abortOnError false
}
@@ -44,7 +41,6 @@ android {
dependencies {
compileOnly fileTree(dir: new File(rootProject.projectDir, 'prebuilts/libs'), include: 'WindowManager-Shell.jar')
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "androidx.concurrent:concurrent-futures:1.1.0"
implementation "androidx.lifecycle:lifecycle-common-java8:2.4.1"
implementation "androidx.dynamicanimation:dynamicanimation:1.0.0"
diff --git a/build.gradle b/build.gradle
index a6f18ea5af..82fe4b2e7c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,9 +1,14 @@
buildscript {
ext {
- kotlin_version = "1.7.0"
- compose_version = "1.2.0-rc03"
- compose_compiler_version = "1.2.0"
- accompanist_version = '0.24.10-beta'
+ ANDROID_X_VERSION = "1+"
+ BUILD_TOOLS_VERSION = "32.0.0"
+ COMPILE_SDK = 32
+ TARGET_SDK = 32
+ MIN_SDK = 26
+ kotlin_version = "1.7.10"
+ compose_version = "1.2.0"
+ compose_compiler_version = "1.3.0-rc02"
+ accompanist_version = '0.25.0'
libsu_version = '3.1.2'
protocVersion = '3.18.0'
room_version = '2.4.2'
@@ -14,22 +19,15 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
- classpath PROTOBUF_CLASS_PATH
+ classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.16'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
classpath 'com.google.android.gms:oss-licenses-plugin:0.10.5'
classpath 'dev.rikka.tools.refine:gradle-plugin:3.1.1'
- classpath "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:1.7.0-1.0.6"
+ classpath "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:1.7.10-1.0.6"
}
}
-final String FRAMEWORK_PREBUILTS_DIR = "prebuilts"
-final def keystorePropertiesFile = rootProject.file("keystore.properties")
-
-wrapper {
- gradleVersion = '6.8.3'
-}
-
allprojects {
repositories {
google()
@@ -79,10 +77,10 @@ allprojects {
}
}
- tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
- kotlinOptions {
- freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
- }
+ tasks.matching {
+ it.name.contains("transformClassesWithHiddenApiRefine")
+ }.configureEach {
+ notCompatibleWithConfigurationCache("https://github.com/RikkaApps/HiddenApiRefinePlugin/issues/9")
}
}
@@ -125,16 +123,11 @@ def quickstepMinSdk = "32"
def quickstepMaxSdk = "32"
android {
- compileSdkVersion COMPILE_SDK
- buildToolsVersion BUILD_TOOLS_VERSION
-
- lintOptions {
- checkReleaseBuilds false
- }
+ compileSdk COMPILE_SDK
defaultConfig {
- minSdkVersion 26
- targetSdkVersion 32
+ minSdk MIN_SDK
+ targetSdk TARGET_SDK
versionCode 12_01_00_05
versionName "${versionDisplayName}"
buildConfigField "String", "VERSION_DISPLAY_NAME", "\"${versionDisplayName}\""
@@ -142,6 +135,7 @@ android {
buildConfigField "String", "COMMIT_HASH", "\"${buildCommit}\""
buildConfigField "boolean", "ENABLE_AUTO_INSTALLS_LAYOUT", "false"
+ resValue("string", "launcher_component", "${applicationId}/app.lawnchair.LawnchairLauncher")
manifestPlaceholders.quickstepMinSdk = quickstepMinSdk
manifestPlaceholders.quickstepMaxSdk = quickstepMaxSdk
buildConfigField "int", "QUICKSTEP_MIN_SDK", quickstepMinSdk
@@ -157,7 +151,10 @@ android {
variant.outputs.all {
outputFileName = "Lawnchair ${variant.versionName}.apk"
}
- resValue("string", "launcher_component", "${applicationId}/app.lawnchair.LawnchairLauncher")
+ }
+
+ lint {
+ checkReleaseBuilds false
}
buildFeatures {
@@ -168,27 +165,26 @@ android {
kotlinCompilerExtensionVersion = compose_compiler_version
}
+ final def keystorePropertiesFile = rootProject.file("keystore.properties")
+ def releaseSigning = signingConfigs.debug
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']
- }
+ releaseSigning = signingConfigs.create("release") {
+ keyAlias keystoreProperties['keyAlias']
+ keyPassword keystoreProperties['keyPassword']
+ storeFile rootProject.file(keystoreProperties['storeFile'])
+ storePassword keystoreProperties['storePassword']
}
}
buildTypes {
debug {
-
+ signingConfig releaseSigning
}
release {
- if (keystorePropertiesFile.exists()) signingConfig signingConfigs.release
+ signingConfig releaseSigning
minifyEnabled true
shrinkResources true
proguardFiles "proguard-android-optimize.txt", "proguard.pro"
@@ -204,6 +200,11 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}
+ dependenciesInfo {
+ includeInApk = false
+ includeInBundle = false
+ }
+
// The flavor dimensions for build variants (e.g. aospWithQuickstep, aospWithoutQuickstep)
// See: https://developer.android.com/studio/build/build-variants#flavor-dimensions
flavorDimensions "app", "recents"
@@ -229,8 +230,7 @@ android {
withQuickstep {
dimension "recents"
-
- minSdkVersion 26
+ minSdk 26
}
withoutQuickstep {
@@ -319,17 +319,9 @@ android {
addFrameworkJar('framework-12l.jar')
}
-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 {
+ final def FRAMEWORK_PREBUILTS_DIR = "prebuilts"
+
implementation "androidx.dynamicanimation:dynamicanimation:${ANDROID_X_VERSION}"
implementation "androidx.recyclerview:recyclerview:${ANDROID_X_VERSION}"
implementation "androidx.preference:preference-ktx:${ANDROID_X_VERSION}"
@@ -345,7 +337,6 @@ dependencies {
// 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')
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'org.mockito:mockito-core:4.5.1'
@@ -405,7 +396,7 @@ dependencies {
// Persian Date
implementation 'com.github.samanzamani:PersianDate:1.5.4'
- api 'com.airbnb.android:lottie:5.0.3'
+ implementation 'com.airbnb.android:lottie:5.0.3'
}
protobuf {
diff --git a/gradle.properties b/gradle.properties
index a98cbed6a5..f9e9de6595 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,18 +1,12 @@
-# Until all the dependencies move to android X
-android.useAndroidX = true
-android.enableJetifier = true
-org.gradle.parallel=true
-
-ANDROID_X_VERSION=1+
-
-GRADLE_CLASS_PATH=com.android.tools.build:gradle:4.0.0
-
-PROTOBUF_CLASS_PATH=com.google.protobuf:protobuf-gradle-plugin:0.8.16
-PROTOBUF_DEPENDENCY=com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7
-
-BUILD_TOOLS_VERSION=32.0.0
-COMPILE_SDK=android-32
-
-org.gradle.jvmargs=-Xmx2048m
-
android.debug.obsoleteApi=true
+android.enableJetifier=true
+android.nonTransitiveRClass=true
+android.useAndroidX=true
+
+kotlin.code.style=official
+
+org.gradle.caching=true
+org.gradle.jvmargs=-Xmx4g -Dfile.encoding=UTF-8
+org.gradle.parallel=true
+# https://docs.gradle.org/7.4/userguide/configuration_cache.html
+org.gradle.unsafe.configuration-cache=true
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index e708b1c023..249e5832f0 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 968c5e86f5..ae04661ee7 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,5 @@
-#Sat May 28 18:49:53 CEST 2022
distributionBase=GRADLE_USER_HOME
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionPath=wrapper/dists
-zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
old mode 100644
new mode 100755
index 4f906e0c81..a69d9cb6c2
--- a/gradlew
+++ b/gradlew
@@ -1,7 +1,7 @@
-#!/usr/bin/env sh
+#!/bin/sh
#
-# Copyright 2015 the original author or authors.
+# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -17,67 +17,101 @@
#
##############################################################################
-##
-## Gradle start up script for UN*X
-##
+#
+# Gradle start up script for POSIX generated by Gradle.
+#
+# Important for running:
+#
+# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
+# noncompliant, but you have some other compliant shell such as ksh or
+# bash, then to run this script, type that shell name before the whole
+# command line, like:
+#
+# ksh Gradle
+#
+# Busybox and similar reduced shells will NOT work, because this script
+# requires all of these POSIX shell features:
+# * functions;
+# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
+# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
+# * compound commands having a testable exit status, especially «case»;
+# * various built-in commands including «command», «set», and «ulimit».
+#
+# Important for patching:
+#
+# (2) This script targets any POSIX shell, so it avoids extensions provided
+# by Bash, Ksh, etc; in particular arrays are avoided.
+#
+# The "traditional" practice of packing multiple parameters into a
+# space-separated string is a well documented source of bugs and security
+# problems, so this is (mostly) avoided, by progressively accumulating
+# options in "$@", and eventually passing that to Java.
+#
+# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
+# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
+# see the in-line comments for details.
+#
+# There are tweaks for specific operating systems such as AIX, CygWin,
+# Darwin, MinGW, and NonStop.
+#
+# (3) This script is generated from the Groovy template
+# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# within the Gradle project.
+#
+# You can find Gradle at https://github.com/gradle/gradle/.
+#
##############################################################################
# Attempt to set APP_HOME
+
# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
+app_path=$0
+
+# Need this for daisy-chained symlinks.
+while
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
+ [ -h "$app_path" ]
+do
+ ls=$( ls -ld "$app_path" )
+ link=${ls#*' -> '}
+ case $link in #(
+ /*) app_path=$link ;; #(
+ *) app_path=$APP_HOME$link ;;
+ esac
done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
+
+APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
+APP_BASE_NAME=${0##*/}
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
+MAX_FD=maximum
warn () {
echo "$*"
-}
+} >&2
die () {
echo
echo "$*"
echo
exit 1
-}
+} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
+case "$( uname )" in #(
+ CYGWIN* ) cygwin=true ;; #(
+ Darwin* ) darwin=true ;; #(
+ MSYS* | MINGW* ) msys=true ;; #(
+ NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
@@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
+ JAVACMD=$JAVA_HOME/jre/sh/java
else
- JAVACMD="$JAVA_HOME/bin/java"
+ JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
- JAVACMD="java"
+ JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
@@ -106,80 +140,101 @@ location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
-fi
-
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
-
-# For Cygwin or MSYS, switch paths to Windows format before running java
-if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
-
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
- fi
- i=`expr $i + 1`
- done
- case $i in
- 0) set -- ;;
- 1) set -- "$args0" ;;
- 2) set -- "$args0" "$args1" ;;
- 3) set -- "$args0" "$args1" "$args2" ;;
- 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
+ case $MAX_FD in #(
+ max*)
+ MAX_FD=$( ulimit -H -n ) ||
+ warn "Could not query maximum file descriptor limit"
+ esac
+ case $MAX_FD in #(
+ '' | soft) :;; #(
+ *)
+ ulimit -n "$MAX_FD" ||
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=`save "$@"`
+# Collect all arguments for the java command, stacking in reverse order:
+# * args from the command line
+# * the main class name
+# * -classpath
+# * -D...appname settings
+# * --module-path (only if needed)
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if "$cygwin" || "$msys" ; then
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
+
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
+
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ for arg do
+ if
+ case $arg in #(
+ -*) false ;; # don't mess with options #(
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
+ [ -e "$t" ] ;; #(
+ *) false ;;
+ esac
+ then
+ arg=$( cygpath --path --ignore --mixed "$arg" )
+ fi
+ # Roll the args list around exactly as many times as the number of
+ # args, so each arg winds up back in the position where it started, but
+ # possibly modified.
+ #
+ # NB: a `for` loop captures its iteration list before it begins, so
+ # changing the positional parameters here affects neither the number of
+ # iterations, nor the values presented in `arg`.
+ shift # remove old arg
+ set -- "$@" "$arg" # push replacement arg
+ done
+fi
+
+# Collect all arguments for the java command;
+# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
+# shell script including quotes and variable substitutions, so put them in
+# double quotes to make sure that they get re-expanded; and
+# * put everything else in single quotes, so that it's not re-expanded.
+
+set -- \
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
+ -classpath "$CLASSPATH" \
+ org.gradle.wrapper.GradleWrapperMain \
+ "$@"
+
+# Stop when "xargs" is not available.
+if ! command -v xargs >/dev/null 2>&1
+then
+ die "xargs is not available"
+fi
+
+# Use "xargs" to parse quoted args.
+#
+# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
+#
+# In Bash we could simply go:
+#
+# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
+# set -- "${ARGS[@]}" "$@"
+#
+# but POSIX shell has neither arrays nor command substitution, so instead we
+# post-process each arg (as a line of input to sed) to backslash-escape any
+# character that might be a shell metacharacter, then use eval to reverse
+# that process (while maintaining the separation between arguments), and wrap
+# the whole thing up as a single "set" statement.
+#
+# This will of course break if any of these variables contains a newline or
+# an unmatched quote.
+#
+
+eval "set -- $(
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
+ xargs -n1 |
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
+ tr '\n' ' '
+ )" '"$@"'
exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
index 107acd32c4..f127cfd49d 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -14,7 +14,7 @@
@rem limitations under the License.
@rem
-@if "%DEBUG%" == "" @echo off
+@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@@ -25,7 +25,7 @@
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
+if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto execute
+if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
:end
@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
+if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
+set EXIT_CODE=%ERRORLEVEL%
+if %EXIT_CODE% equ 0 set EXIT_CODE=1
+if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
+exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
diff --git a/hidden-api/.gitignore b/hidden-api/.gitignore
deleted file mode 100644
index 42afabfd2a..0000000000
--- a/hidden-api/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/build
\ No newline at end of file
diff --git a/hidden-api/build.gradle b/hidden-api/build.gradle
index 0ad6eee351..8080952cfd 100644
--- a/hidden-api/build.gradle
+++ b/hidden-api/build.gradle
@@ -5,11 +5,11 @@ plugins {
android {
namespace 'app.lawnchair.hidden_api'
- compileSdk 32
+ compileSdk COMPILE_SDK
defaultConfig {
- minSdk 26
- targetSdk 32
+ minSdk MIN_SDK
+ targetSdk TARGET_SDK
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
diff --git a/hidden-api/src/main/AndroidManifest.xml b/hidden-api/src/main/AndroidManifest.xml
index a5918e68ab..8072ee00db 100644
--- a/hidden-api/src/main/AndroidManifest.xml
+++ b/hidden-api/src/main/AndroidManifest.xml
@@ -1,4 +1,2 @@
-
-
-
\ No newline at end of file
+
diff --git a/quickstep/src/com/android/quickstep/interaction/TutorialController.java b/quickstep/src/com/android/quickstep/interaction/TutorialController.java
index 4145393262..982fba1a3a 100644
--- a/quickstep/src/com/android/quickstep/interaction/TutorialController.java
+++ b/quickstep/src/com/android/quickstep/interaction/TutorialController.java
@@ -537,7 +537,7 @@ abstract class TutorialController implements BackGestureAttemptCallback,
View contentView = View.inflate(
sandboxActivity, R.layout.gesture_tutorial_dialog, null);
AlertDialog tutorialDialog = new AlertDialog
- .Builder(sandboxActivity, R.style.Theme_AppCompat_Dialog_Alert)
+ .Builder(sandboxActivity, androidx.appcompat.R.style.Theme_AppCompat_Dialog_Alert)
.setView(contentView)
.create();
diff --git a/settings.gradle b/settings.gradle
index e1f79417cf..e42cd7dd4c 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,3 +1,17 @@
+// https://docs.gradle.com/enterprise/gradle-plugin/
+plugins {
+ id "com.gradle.enterprise" version "3.10.3"
+}
+
+gradleEnterprise {
+ buildScan {
+ termsOfServiceUrl = "https://gradle.com/terms-of-service"
+ termsOfServiceAgree = "yes"
+ publishAlwaysIf(System.getenv("GITHUB_ACTIONS") == "true")
+ publishOnFailure()
+ }
+}
+
include ':iconloaderlib'
project(':iconloaderlib').projectDir = new File(rootDir, 'platform_frameworks_libs_systemui/iconloaderlib')
diff --git a/tests/src/com/android/launcher3/settings/SettingsActivityTest.java b/tests/src/com/android/launcher3/settings/SettingsActivityTest.java
index 1c205f0a6e..31ba274bbc 100644
--- a/tests/src/com/android/launcher3/settings/SettingsActivityTest.java
+++ b/tests/src/com/android/launcher3/settings/SettingsActivityTest.java
@@ -79,7 +79,7 @@ public class SettingsActivityTest {
@Ignore // b/199309785
public void testSettings_aboutTap_launchesActivity() {
ActivityScenario.launch(SettingsActivity.class);
- onView(withId(R.id.recycler_view)).perform(
+ onView(withId(androidx.preference.R.id.recycler_view)).perform(
actionOnItem(hasDescendant(withText("About")), click()));
intended(allOf(
@@ -94,7 +94,7 @@ public class SettingsActivityTest {
public void testSettings_developerOptionsTap_launchesActivityWithFragment() {
PluginPrefs.setHasPlugins(mApplicationContext);
ActivityScenario.launch(SettingsActivity.class);
- onView(withId(R.id.recycler_view)).perform(
+ onView(withId(androidx.preference.R.id.recycler_view)).perform(
actionOnItem(hasDescendant(withText("Developer Options")), click()));
intended(allOf(