Minor things (#3752)

* Update buildTypes

* Replace android.jar with framework-13.jar

* io.github.fornewid:material-motion-compose-core:1.0.7

* Update submodule

* Move spotless extension

* Remove extra package attrs

* Use Kapt in plugins block

* Remove extra line

* Reuse protobuf config

* Use core-ktx

* Replace android.jar with framework-13.jar

* Cleanup

* Optimize Dagger deps

* Try to migrate to Hilt KSP compiler

* Revert "Try to migrate to Hilt KSP compiler"

This reverts commit 7a11610216a44623df958cbc26c6c170c4b0d282.

* Remove extra core-ktx

* Add compileOnlyCommonJars

* Move addFrameworkJar out of android extension

* Cleanup

* Use com.google.dagger:hilt-compiler

* Update submodule
This commit is contained in:
Goooler authored and GitHub committed 2023-11-21 06:13:18 +00:00
1 parent 30d3b8722b
commit 61d9ab51ca
13 files changed
+73 -124

No files matched your search

+48 -35
View File
@@ -5,6 +5,8 @@ plugins {
id 'com.android.application' version "8.1.4"
id 'com.android.library' version "8.1.4" apply false
id 'org.jetbrains.kotlin.android' version "1.9.20"
// TODO: Remove this after Dagger/Hilt finished fully migration to KSP.
id 'org.jetbrains.kotlin.kapt' version "1.9.20" apply false
id 'org.jetbrains.kotlin.plugin.parcelize' version "1.9.20"
id 'org.jetbrains.kotlin.plugin.serialization' version "1.9.20"
id "com.google.devtools.ksp" version "1.9.20-1.0.14"
@@ -19,7 +21,7 @@ allprojects {
plugins.withType(AndroidBasePlugin).configureEach {
apply plugin: 'org.gradle.android.cache-fix'
project.android {
android {
compileSdk 34
defaultConfig {
minSdk 26
@@ -31,12 +33,35 @@ allprojects {
checkReleaseBuilds false
}
}
project.dependencies {
dependencies {
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
}
}
plugins.withId('com.google.protobuf') {
def protocVersion = '3.25.1'
protobuf {
// Configure the protoc executable
protoc {
artifact = "com.google.protobuf:protoc:${protocVersion}"
}
generateProtoTasks {
all().configureEach { task ->
task.builtins {
remove java
java {
option "lite"
}
}
}
}
}
dependencies {
implementation "com.google.protobuf:protobuf-javalite:$protocVersion"
}
}
plugins.withType(JavaBasePlugin).configureEach {
java {
toolchain.languageVersion = JavaLanguageVersion.of(17)
@@ -44,11 +69,9 @@ allprojects {
}
tasks.withType(KotlinCompile).configureEach {
compilerOptions {
freeCompilerArgs.add(
"-Xjvm-default=all",
)
}
compilerOptions.freeCompilerArgs.add(
"-Xjvm-default=all",
)
}
ext.addFrameworkJar = { String name ->
@@ -65,14 +88,24 @@ allprojects {
}
}
}
ext.compileOnlyCommonJars = {
dependencies {
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'WindowManager-Shell.jar')
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'core.jar')
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'seeder.jar')
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'SystemUI-core.jar')
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'SystemUI-statsd.jar')
}
}
}
// todo remove ext block after migrating to version catalog
ext {
FRAMEWORK_PREBUILTS_DIR = "$rootDir/prebuilts/libs"
accompanist_version = '0.32.0'
daggerVersion = '2.48.1'
libsu_version = '5.2.1'
protocVersion = '3.25.1'
room_version = '2.6.0'
optoVersion = "1.0.18"
}
@@ -173,8 +206,7 @@ android {
debug {
applicationIdSuffix ".debug"
resValue("string", "derived_app_name", "Lawnchair (Debug)")
minifyEnabled false
shrinkResources false
signingConfig releaseSigning
proguardFiles "proguard-android-optimize.txt", "proguard.pro"
}
@@ -309,16 +341,9 @@ android {
manifest.srcFile "quickstep/AndroidManifest.xml"
}
}
addFrameworkJar('android.jar')
}
spotless {
kotlin {
ktlint("1.0.1")
target("lawnchair/src/**/*.kt")
}
}
addFrameworkJar('framework-13.jar')
dependencies {
implementation projects.iconloaderlib
@@ -371,7 +396,7 @@ dependencies {
implementation "com.google.accompanist:accompanist-permissions:$accompanist_version"
implementation "com.google.accompanist:accompanist-systemuicontroller:$accompanist_version"
implementation "com.google.android.material:material:1.10.0"
implementation "io.github.fornewid:material-motion-compose-core:1.0.6"
implementation "io.github.fornewid:material-motion-compose-core:1.0.7"
implementation 'dev.kdrag0n:colorkt:1.0.5'
implementation 'io.coil-kt:coil-compose:2.5.0'
implementation 'me.xdrop:fuzzywuzzy:1.4.0'
@@ -389,8 +414,6 @@ dependencies {
implementation "com.github.topjohnwu.libsu:core:$libsu_version"
implementation "com.github.topjohnwu.libsu:service:$libsu_version"
implementation "com.google.protobuf:protobuf-javalite:$protocVersion"
// Persian Date
implementation 'com.github.samanzamani:PersianDate:1.7.1'
@@ -408,20 +431,10 @@ ksp {
arg("room.incremental", "true")
}
protobuf {
// Configure the protoc executable
protoc {
artifact = "com.google.protobuf:protoc:${protocVersion}"
}
generateProtoTasks {
all().configureEach { task ->
task.builtins {
remove java
java {
option "lite"
}
}
}
spotless {
kotlin {
ktlint("1.0.1")
target("lawnchair/src/**/*.kt")
}
}
+2 -1
View File
@@ -4,5 +4,6 @@ plugins {
android {
namespace "app.lawnchair.compatlib"
addFrameworkJar('framework-12.jar')
}
addFrameworkJar('framework-12.jar')
+2 -1
View File
@@ -4,9 +4,10 @@ plugins {
android {
namespace "app.lawnchair.compatlib.eleven"
addFrameworkJar('framework-11.jar')
}
addFrameworkJar('framework-11.jar')
dependencies {
implementation projects.compatLib
}
+2 -1
View File
@@ -4,9 +4,10 @@ plugins {
android {
namespace "app.lawnchair.compatlib.twelve"
addFrameworkJar('framework-12.jar')
}
addFrameworkJar('framework-12.jar')
dependencies {
implementation projects.compatLib
}
Binary file not shown.
Binary file not shown.
-22
View File
@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2017 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.systemui.animation">
</manifest>
+3 -4
View File
@@ -16,12 +16,11 @@ android {
res.srcDirs = ['res']
}
}
addFrameworkJar('android.jar')
}
addFrameworkJar('framework-13.jar')
compileOnlyCommonJars()
dependencies {
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'WindowManager-Shell.jar')
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'core.jar')
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'seeder.jar')
implementation "androidx.core:core-animation:1.0.0-rc01"
}
+6 -12
View File
@@ -4,7 +4,6 @@ plugins {
}
android {
namespace "com.android.systemui.shared"
buildFeatures {
aidl true
@@ -17,22 +16,17 @@ android {
res.srcDirs = ['res']
}
}
addFrameworkJar('android.jar')
}
addFrameworkJar('framework-13.jar')
compileOnlyCommonJars()
dependencies {
compileOnly projects.hiddenApi
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'WindowManager-Shell.jar')
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'seeder.jar')
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'core.jar')
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'core-all.jar')
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'SystemUI-core.jar')
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'SystemUI-statsd.jar')
compileOnly projects.systemUnFold
implementation 'javax.inject:javax.inject:1'
implementation 'com.google.dagger:dagger-android-support:2.48.1' // if you use the support libraries
annotationProcessor 'com.google.dagger:dagger-android-processor:2.48.1'
annotationProcessor 'com.google.dagger:dagger-compiler:2.48.1'
implementation "com.google.dagger:hilt-android:$daggerVersion"
annotationProcessor "com.google.dagger:hilt-compiler:$daggerVersion"
implementation "androidx.concurrent:concurrent-futures:1.1.0"
}
+1 -2
View File
@@ -16,8 +16,7 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.android.app.viewcapture">
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS"
tools:ignore="ProtectedPermissions" />
</manifest>
+2 -29
View File
@@ -17,34 +17,7 @@ android {
manifest.srcFile "tests/AndroidManifest.xml"
}
}
addFrameworkJar('android.jar')
}
dependencies {
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'WindowManager-Shell.jar')
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'core.jar')
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'seeder.jar')
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'SystemUI-core.jar')
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'SystemUI-statsd.jar')
implementation "androidx.core:core:1.12.0"
implementation "com.google.protobuf:protobuf-javalite:$protocVersion"
}
protobuf {
// Configure the protoc executable
protoc {
artifact = "com.google.protobuf:protoc:${protocVersion}"
}
generateProtoTasks {
all().configureEach { task ->
task.builtins {
remove java
java {
option "lite"
}
}
}
}
}
addFrameworkJar('framework-13.jar')
compileOnlyCommonJars()
+6 -16
View File
@@ -1,10 +1,9 @@
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'org.jetbrains.kotlin.kapt'
}
apply plugin: 'kotlin-kapt'
android {
namespace "com.android.systemui.unfold"
buildFeatures {
@@ -16,23 +15,14 @@ android {
aidl.srcDirs = ['src']
}
}
addFrameworkJar('android.jar')
}
addFrameworkJar('framework-13.jar')
compileOnlyCommonJars()
dependencies {
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'WindowManager-Shell.jar')
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'core.jar')
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'seeder.jar')
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'SystemUI-core.jar')
compileOnly fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'SystemUI-statsd.jar')
implementation 'javax.inject:javax.inject:1'
implementation 'com.google.dagger:dagger-android-support:2.48.1' // if you use the support libraries
kapt 'com.google.dagger:dagger-android-processor:2.48.1'
kapt 'com.google.dagger:dagger-compiler:2.48.1'
implementation "com.google.dagger:hilt-android:2.48.1"
kapt "com.google.dagger:hilt-android-compiler:2.48.1"
implementation "com.google.dagger:hilt-android:$daggerVersion"
kapt "com.google.dagger:hilt-compiler:$daggerVersion"
implementation "androidx.concurrent:concurrent-futures:1.1.0"
implementation "androidx.lifecycle:lifecycle-common:2.6.2"