mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-11 14:54:00 +00:00
Bumps [mockito-core](https://github.com/mockito/mockito) from 4.9.0 to 4.10.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v4.9.0...v4.10.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
423 lines
15 KiB
Groovy
423 lines
15 KiB
Groovy
import com.android.build.gradle.BasePlugin
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
plugins {
|
|
id 'com.android.application' version "7.3.1"
|
|
id 'com.android.library' version "7.3.1" apply false
|
|
id 'org.jetbrains.kotlin.android' version "1.7.20"
|
|
id 'org.jetbrains.kotlin.plugin.parcelize' version "1.7.20"
|
|
id 'org.jetbrains.kotlin.plugin.serialization' version "1.7.20"
|
|
id "com.google.devtools.ksp" version "1.7.20-1.0.8"
|
|
id 'com.google.protobuf' version "0.9.1"
|
|
id 'com.google.android.gms.oss-licenses-plugin' version "0.10.5"
|
|
id 'dev.rikka.tools.refine' version "3.1.1"
|
|
}
|
|
|
|
allprojects {
|
|
plugins.withType(BasePlugin).configureEach {
|
|
project.android {
|
|
compileSdk 33
|
|
defaultConfig {
|
|
minSdk 26
|
|
targetSdk 32
|
|
vectorDrawables.useSupportLibrary = true
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
lint {
|
|
abortOnError true
|
|
checkReleaseBuilds false
|
|
}
|
|
}
|
|
project.dependencies {
|
|
implementation 'androidx.core:core-ktx:1.9.0'
|
|
|
|
testImplementation 'junit:junit:4.13.2'
|
|
androidTestImplementation 'org.mockito:mockito-core:4.10.0'
|
|
androidTestImplementation 'com.google.dexmaker:dexmaker:1.2'
|
|
androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:1.2'
|
|
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'
|
|
androidTestImplementation "androidx.annotation:annotation:1.5.0"
|
|
}
|
|
}
|
|
|
|
tasks.withType(KotlinCompile).configureEach {
|
|
kotlinOptions {
|
|
jvmTarget = JavaVersion.VERSION_1_8
|
|
}
|
|
}
|
|
|
|
tasks.matching {
|
|
it.name.contains("transformClassesWithHiddenApiRefine")
|
|
}.configureEach {
|
|
notCompatibleWithConfigurationCache("https://github.com/RikkaApps/HiddenApiRefinePlugin/issues/9")
|
|
}
|
|
|
|
tasks.matching {
|
|
it.name.contains("OssLicensesTask")
|
|
}.configureEach {
|
|
notCompatibleWithConfigurationCache("https://github.com/google/play-services-plugins/issues/206")
|
|
}
|
|
|
|
ext.getFrameworkJar = { String name ->
|
|
def frameworkJar = new File(rootProject.projectDir, 'prebuilts/libs/' + name)
|
|
if (!frameworkJar.exists()) {
|
|
throw new IllegalArgumentException("Framework jar path doesn't exist")
|
|
}
|
|
return frameworkJar
|
|
}
|
|
|
|
ext.addFrameworkJar = { String name ->
|
|
def frameworkJar = getFrameworkJar(name)
|
|
gradle.projectsEvaluated {
|
|
tasks.withType(JavaCompile) {
|
|
options.bootstrapClasspath = files([frameworkJar] + (options.bootstrapClasspath.files as Iterable<File>))
|
|
}
|
|
tasks.withType(KotlinCompile) {
|
|
it.classpath.from(files([frameworkJar]))
|
|
}
|
|
}
|
|
}
|
|
|
|
ext.replaceFrameworkJar = { String name ->
|
|
def frameworkJar = getFrameworkJar(name)
|
|
gradle.projectsEvaluated {
|
|
tasks.withType(KotlinCompile) {
|
|
def originalFiles = [] + it.classpath.files
|
|
def newFiles = []
|
|
originalFiles.each { file ->
|
|
if (file.path.endsWith('android.jar')) {
|
|
newFiles.add(frameworkJar)
|
|
} else {
|
|
newFiles.add(file)
|
|
}
|
|
}
|
|
it.classpath.setFrom(files([]))
|
|
it.classpath.from(files(newFiles))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// todo remove ext block after migrating to version catalog
|
|
ext {
|
|
accompanist_version = '0.28.0'
|
|
libsu_version = '5.0.3'
|
|
protocVersion = '3.21.11'
|
|
room_version = '2.4.3'
|
|
optoVersion = "1.0.18"
|
|
}
|
|
|
|
final def buildCommit = providers.exec {
|
|
commandLine('git', 'rev-parse', '--short=7', 'HEAD')
|
|
}.standardOutput.asText.get().trim()
|
|
|
|
final def ciBuild = System.getenv("CI") == "true"
|
|
final def ciRef = System.getenv("GITHUB_REF") ?: ""
|
|
final def ciRunNumber = System.getenv("GITHUB_RUN_NUMBER") ?: ""
|
|
final def isReleaseBuild = ciBuild && ciRef.contains("alpha")
|
|
final def devReleaseName = ciBuild ? "Dev (#${ciRunNumber})" : "Dev (${buildCommit})"
|
|
|
|
final def version = "12.1.0"
|
|
final def releaseName = "Alpha 4"
|
|
final def versionDisplayName = "${version} ${isReleaseBuild ? releaseName : devReleaseName}"
|
|
final def majorVersion = versionDisplayName.split("\\.")[0]
|
|
|
|
final def quickstepMinSdk = "32"
|
|
final def quickstepMaxSdk = "32"
|
|
|
|
android {
|
|
defaultConfig {
|
|
versionCode 12_01_00_05
|
|
versionName "${versionDisplayName}"
|
|
buildConfigField "String", "VERSION_DISPLAY_NAME", "\"${versionDisplayName}\""
|
|
buildConfigField "String", "MAJOR_VERSION", "\"${majorVersion}\""
|
|
buildConfigField "String", "COMMIT_HASH", "\"${buildCommit}\""
|
|
buildConfigField "boolean", "ENABLE_AUTO_INSTALLS_LAYOUT", "false"
|
|
|
|
manifestPlaceholders.quickstepMinSdk = quickstepMinSdk
|
|
manifestPlaceholders.quickstepMaxSdk = quickstepMaxSdk
|
|
buildConfigField "int", "QUICKSTEP_MIN_SDK", quickstepMinSdk
|
|
buildConfigField "int", "QUICKSTEP_MAX_SDK", quickstepMaxSdk
|
|
|
|
ksp { arg("room.schemaLocation", "$projectDir/schemas".toString()) }
|
|
}
|
|
|
|
applicationVariants.all { variant ->
|
|
variant.outputs.all {
|
|
outputFileName = "Lawnchair ${variant.versionName}.apk"
|
|
}
|
|
}
|
|
|
|
buildFeatures {
|
|
compose true
|
|
}
|
|
|
|
composeOptions {
|
|
kotlinCompilerExtensionVersion = "1.3.2"
|
|
}
|
|
|
|
final def keystorePropertiesFile = rootProject.file("keystore.properties")
|
|
def releaseSigning = signingConfigs.debug
|
|
if (keystorePropertiesFile.exists()) {
|
|
final def keystoreProperties = new Properties()
|
|
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
|
releaseSigning = signingConfigs.create("release") {
|
|
keyAlias keystoreProperties['keyAlias']
|
|
keyPassword keystoreProperties['keyPassword']
|
|
storeFile rootProject.file(keystoreProperties['storeFile'])
|
|
storePassword keystoreProperties['storePassword']
|
|
}
|
|
}
|
|
|
|
packagingOptions.resources.excludes += [
|
|
"**/*.proto",
|
|
"**/*.bin",
|
|
"**/*.java",
|
|
"**/*.properties",
|
|
"**/*.version",
|
|
"**/*.*_module",
|
|
"com/**",
|
|
"google/**",
|
|
"kotlin/**",
|
|
"kotlinx/**",
|
|
"okhttp3/**",
|
|
"META-INF/services/**",
|
|
"META-INF/com/**",
|
|
"META-INF/licenses/**",
|
|
"META-INF/AL2.0",
|
|
"META-INF/LGPL2.1",
|
|
]
|
|
|
|
buildTypes {
|
|
debug {
|
|
signingConfig releaseSigning
|
|
}
|
|
|
|
release {
|
|
signingConfig releaseSigning
|
|
minifyEnabled true
|
|
shrinkResources true
|
|
proguardFiles "proguard-android-optimize.txt", "proguard.pro"
|
|
}
|
|
}
|
|
|
|
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"
|
|
|
|
productFlavors {
|
|
aosp {
|
|
dimension "app"
|
|
applicationId 'com.android.launcher3'
|
|
testApplicationId 'com.android.launcher3.tests'
|
|
}
|
|
|
|
l3go {
|
|
dimension "app"
|
|
applicationId 'com.android.launcher3'
|
|
testApplicationId 'com.android.launcher3.tests'
|
|
}
|
|
|
|
lawn {
|
|
dimension "app"
|
|
applicationId 'app.lawnchair'
|
|
testApplicationId 'com.android.launcher3.tests'
|
|
isDefault true
|
|
}
|
|
|
|
withQuickstep {
|
|
dimension "recents"
|
|
minSdk 26
|
|
isDefault true
|
|
}
|
|
|
|
withoutQuickstep {
|
|
dimension "recents"
|
|
}
|
|
|
|
all {
|
|
resValue("string", "launcher_component", "${applicationId}/app.lawnchair.LawnchairLauncher")
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
res.srcDirs = ['res']
|
|
java.srcDirs = ['src', 'src_plugins']
|
|
manifest.srcFile 'AndroidManifest-common.xml'
|
|
proto {
|
|
srcDirs = ['protos/', 'quickstep/protos_overrides/']
|
|
}
|
|
}
|
|
|
|
androidTest {
|
|
res.srcDirs = ['tests/res']
|
|
java.srcDirs = ['tests/src', 'tests/tapl']
|
|
manifest.srcFile "tests/AndroidManifest-common.xml"
|
|
}
|
|
|
|
androidTestDebug {
|
|
manifest.srcFile "tests/AndroidManifest.xml"
|
|
}
|
|
|
|
aosp {
|
|
java.srcDirs = ['src_flags', 'src_shortcuts_overrides']
|
|
}
|
|
|
|
aospWithoutQuickstep {
|
|
manifest.srcFile "AndroidManifest.xml"
|
|
}
|
|
|
|
aospWithQuickstep {
|
|
manifest.srcFile "quickstep/AndroidManifest-launcher.xml"
|
|
}
|
|
|
|
l3go {
|
|
res.srcDirs = ['go/res']
|
|
java.srcDirs = ['go/src']
|
|
manifest.srcFile "go/AndroidManifest.xml"
|
|
}
|
|
|
|
l3goWithoutQuickstepDebug {
|
|
manifest.srcFile "AndroidManifest.xml"
|
|
}
|
|
|
|
l3goWithQuickstepDebug {
|
|
manifest.srcFile "quickstep/AndroidManifest-launcher.xml"
|
|
}
|
|
|
|
lawn {
|
|
java.srcDirs = ['src_flags', 'src_shortcuts_overrides', 'lawnchair/src']
|
|
aidl.srcDirs = ['lawnchair/aidl']
|
|
res.srcDirs = ['lawnchair/res']
|
|
manifest.srcFile "lawnchair/AndroidManifest.xml"
|
|
assets {
|
|
srcDirs 'lawnchair/assets'
|
|
}
|
|
proto {
|
|
srcDirs = ['lawnchair/protos/']
|
|
}
|
|
}
|
|
|
|
lawnWithoutQuickstep {
|
|
manifest.srcFile "AndroidManifest.xml"
|
|
}
|
|
|
|
lawnWithQuickstep {
|
|
manifest.srcFile "quickstep/AndroidManifest-launcher.xml"
|
|
}
|
|
|
|
withoutQuickstep {
|
|
java.srcDirs = ['src_ui_overrides']
|
|
}
|
|
|
|
withQuickstep {
|
|
res.srcDirs = ['quickstep/res', 'quickstep/recents_ui_overrides/res']
|
|
java.srcDirs = ['quickstep/src', 'quickstep/recents_ui_overrides/src']
|
|
manifest.srcFile "quickstep/AndroidManifest.xml"
|
|
}
|
|
}
|
|
|
|
addFrameworkJar('framework-12l.jar')
|
|
}
|
|
|
|
dependencies {
|
|
final def FRAMEWORK_PREBUILTS_DIR = "prebuilts/libs"
|
|
|
|
implementation "androidx.dynamicanimation:dynamicanimation:1.0.0"
|
|
implementation "androidx.recyclerview:recyclerview:1.2.1"
|
|
implementation "androidx.preference:preference-ktx:1.2.0"
|
|
implementation projects.iconloaderlib
|
|
implementation projects.searchuilib
|
|
implementation fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'SystemUI-statsd.jar')
|
|
|
|
// Recents lib dependency
|
|
withQuickstepImplementation projects.systemUIShared
|
|
withQuickstepCompileOnly projects.hiddenApi
|
|
implementation fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'WindowManager-Shell.jar')
|
|
|
|
// Required for AOSP to compile. This is already included in the sysui_shared.jar
|
|
withoutQuickstepImplementation fileTree(dir: FRAMEWORK_PREBUILTS_DIR, include: 'plugin_core.jar')
|
|
|
|
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1'
|
|
implementation 'com.github.ChickenHook:RestrictionBypass:2.2'
|
|
implementation 'dev.rikka.tools.refine:runtime:3.1.1'
|
|
|
|
implementation platform("androidx.compose:compose-bom:2022.12.00")
|
|
implementation "androidx.compose.ui:ui"
|
|
implementation "androidx.compose.ui:ui-tooling"
|
|
implementation "androidx.compose.ui:ui-text-google-fonts"
|
|
implementation "androidx.compose.foundation:foundation"
|
|
implementation "androidx.compose.material:material-icons-extended"
|
|
implementation "androidx.compose.material:material"
|
|
implementation "androidx.compose.runtime:runtime-livedata"
|
|
implementation "androidx.compose.material3:material3:1.1.0-alpha02"
|
|
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
|
|
implementation "androidx.activity:activity-compose:1.6.1"
|
|
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1"
|
|
implementation "androidx.navigation:navigation-compose:2.5.3"
|
|
implementation "androidx.palette:palette-ktx:1.0.0"
|
|
implementation "androidx.slice:slice-core:1.1.0-alpha02"
|
|
implementation "com.google.accompanist:accompanist-drawablepainter:$accompanist_version"
|
|
implementation "com.google.accompanist:accompanist-insets-ui:$accompanist_version"
|
|
implementation "com.google.accompanist:accompanist-navigation-animation:$accompanist_version"
|
|
implementation "com.google.accompanist:accompanist-permissions:$accompanist_version"
|
|
implementation "com.google.accompanist:accompanist-pager:$accompanist_version"
|
|
implementation "com.google.accompanist:accompanist-placeholder-material:$accompanist_version"
|
|
implementation "com.google.accompanist:accompanist-systemuicontroller:$accompanist_version"
|
|
implementation "com.google.android.material:material:1.7.0"
|
|
implementation "io.github.fornewid:material-motion-compose-core:0.10.3"
|
|
implementation 'dev.kdrag0n:colorkt:1.0.5'
|
|
implementation 'io.coil-kt:coil-compose:2.2.2'
|
|
implementation 'me.xdrop:fuzzywuzzy:1.4.0'
|
|
implementation "com.patrykmichalik.opto:domain:$optoVersion"
|
|
implementation "com.patrykmichalik.opto:core:$optoVersion"
|
|
implementation "com.patrykmichalik.opto:compose:$optoVersion"
|
|
implementation "androidx.datastore:datastore-preferences:1.0.0"
|
|
implementation "com.squareup.retrofit2:retrofit:2.9.0"
|
|
implementation "com.squareup.retrofit2:converter-gson:2.9.0"
|
|
|
|
implementation "androidx.room:room-runtime:$room_version"
|
|
implementation "androidx.room:room-ktx:$room_version"
|
|
ksp "androidx.room:room-compiler:$room_version"
|
|
|
|
implementation "com.github.topjohnwu.libsu:core:$libsu_version"
|
|
implementation "com.github.topjohnwu.libsu:service:$libsu_version"
|
|
|
|
implementation "com.google.protobuf:protobuf-javalite:$protocVersion"
|
|
implementation 'com.github.LawnchairLauncher:oss-notices:1.0.2'
|
|
|
|
// Persian Date
|
|
implementation 'com.github.samanzamani:PersianDate:1.5.4'
|
|
|
|
implementation 'com.airbnb.android:lottie:5.2.0'
|
|
}
|
|
|
|
protobuf {
|
|
// Configure the protoc executable
|
|
protoc {
|
|
artifact = "com.google.protobuf:protoc:${protocVersion}"
|
|
}
|
|
generateProtoTasks {
|
|
all().each { task ->
|
|
task.builtins {
|
|
remove java
|
|
java {
|
|
option "lite"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|