1 Star 0 Fork 2

a1356473811/LauncherC

forked from 无言/LauncherC 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.gradle 8.86 KB
一键复制 编辑 原始数据 按行查看 历史
a1356473811 提交于 2024-10-14 10:04 . Changes
import com.android.build.gradle.BasePlugin
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id "com.android.application" version "7.4.2"
id "com.android.library" version "7.4.2" apply false
id "org.jetbrains.kotlin.android" version "1.8.10"
id "com.google.protobuf" version "0.9.1"
}
allprojects {
plugins.withType(BasePlugin).configureEach {
project.android {
compileSdk 33
defaultConfig {
minSdk 28
//noinspection ExpiredTargetSdkVersion
targetSdk 30
vectorDrawables.useSupportLibrary = true
}
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'
}
}
tasks.withType(KotlinCompile).configureEach {
compilerOptions.jvmTarget = JvmTarget.JVM_1_8
}
ext.addFrameworkJar = { String path ->
def frameworkJar = new File(rootProject.projectDir, 'prebuilt/' + path)
if (!frameworkJar.exists()) {
throw new IllegalArgumentException("Framework jar path doesn't exist")
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile).configureEach {
options.bootstrapClasspath = files(frameworkJar, options.bootstrapClasspath)
}
tasks.withType(KotlinCompile).configureEach {
libraries.setFrom(files(frameworkJar, libraries))
}
}
}
}
final def buildCommit = providers.exec {
commandLine('git', 'rev-parse', '--short=7', 'HEAD')
}.standardOutput.asText.get().trim()
final def quickstepMinSdk = "29"
final def quickstepMaxSdk = "33"
android {
namespace "com.android.launcher3"
defaultConfig {
versionCode 1
//语义化版本:https://semver.org/lang/zh-CN/
versionName "13.0.1-alpha.1"
buildConfigField "boolean", "QSB_ON_FIRST_SCREEN", "false"
manifestPlaceholders.quickstepMinSdk = quickstepMinSdk
manifestPlaceholders.quickstepMaxSdk = quickstepMaxSdk
buildConfigField "int", "QUICKSTEP_MIN_SDK", quickstepMinSdk
buildConfigField "int", "QUICKSTEP_MAX_SDK", quickstepMaxSdk
buildConfigField "boolean", "REMOVE_DRAWER", "true"
}
android.applicationVariants.configureEach { variant ->
variant.outputs.configureEach {
outputFileName = "${rootProject.name}_${variant.versionName}+${buildCommit}.apk"
}
}
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']
}
}
buildTypes {
configureEach {
signingConfig releaseSigning
}
debug {
minifyEnabled false
}
release {
minifyEnabled true
proguardFiles "proguard-android-optimize.txt", "proguard.pro"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
// 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'
}*/
chair {
dimension "app"
applicationId 'app.lws.launcherc'
testApplicationId 'com.android.launcher3.tests'
isDefault true
}
configureEach {
resValue("string", "quickstep_component", "${applicationId}/com.android.launcher3.uioverrides.QuickstepLauncher")
resValue("string", "launcher_component", "${applicationId}/com.android.launcher3.Launcher")
}
/* l3go {
dimension "app"
applicationId 'com.android.launcher3'
testApplicationId 'com.android.launcher3.tests'
}*/
withQuickstep {
dimension "recents"
minSdkVersion 28
}
withoutQuickstep {
dimension "recents"
}
}
// Disable release builds for now
/* android.variantFilter { variant ->
if (variant.buildType.name.endsWith('release')) {
variant.setIgnore(true)
}
}*/
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"
}*/
chair {
java.srcDirs = ["src_flags", "src_shortcuts_overrides", "chair/src"]
res.srcDirs = ["chair/res", "chair/res_overrides"]
manifest.srcFile "chair/AndroidManifest.xml"
assets.srcDirs "chair/assets"
}
chairWithoutQuickstep {
manifest.srcFile "AndroidManifest.xml"
}
chairWithQuickstep {
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"
}*/
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"
}
}
//来源:AOSP中编译Launcher3模块,out/soong/.intermediates/frameworks/base/framework/android_common/turbine-combined/framework.jar
addFrameworkJar('framework-13.jar')
compileSdk 33
}
configurations.configureEach {
resolutionStrategy {
dependencySubstitution {
cacheChangingModulesFor 0, "seconds"
cacheDynamicVersionsFor 0, "seconds"
def targetProject = findProject(":SystemUIShared")
if (targetProject != null) {
substitute module("com.github.liu-wanshun:launcherlib-systemui-shared:13-SNAPSHOT") using project(":SystemUIShared")
}
}
}
}
dependencies {
implementation libs.androidx.lifecycle.viewmodel
implementation libs.androidx.dynamicanimation
implementation libs.androidx.recyclerview.recyclerview
implementation libs.androidx.preference
implementation project(':iconloaderlib')
implementation project(':viewcapturelib')
implementation("com.github.ChickenHook:RestrictionBypass:2.2")
implementation("com.github.liu-wanshun:launcherlib-systemui-shared:13-SNAPSHOT")
implementation fileTree(dir: "prebuilt", include: 'SystemUI-statsd.jar')
api libs.airbnb.lottie
implementation libs.google.protobuf.javalite
implementation libs.google.material
implementation libs.androidx.slice.view
implementation(libs.androidx.window)
}
protobuf {
// Configure the protoc executable
protoc {
artifact = "com.google.protobuf:protoc:3.21.12"
}
generateProtoTasks {
all().each { task ->
task.builtins {
remove java
java {
option "lite"
}
}
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Android
1
https://gitee.com/a1356473811/LauncherC.git
[email protected]:a1356473811/LauncherC.git
a1356473811
LauncherC
LauncherC
c13

搜索帮助