246 lines
9.6 KiB
Groovy
246 lines
9.6 KiB
Groovy
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.android)
|
|
alias(libs.plugins.atomicfu)
|
|
// alias(libs.plugins.protobuf)
|
|
}
|
|
|
|
//preBuild {
|
|
// doLast {
|
|
// try {
|
|
// def rootProjectName = rootProject.name.replace(" ", "_")
|
|
// def projectName = project.name.replace(" ", "_")
|
|
// def iml_path1 = "$rootProject.rootDir\\.idea\\modules\\" + projectName + "\\" + rootProjectName + "." + projectName + ".iml"
|
|
// def iml_path0 = "$rootProject.rootDir\\.idea\\modules\\" + projectName + "\\" + rootProjectName + "." + projectName + ".main.iml"
|
|
// def imlFileList = [file(iml_path0), file(iml_path1)]
|
|
// for (imlFile in imlFileList) {
|
|
// if (imlFile.exists()) {
|
|
// def parsedXml = (new XmlParser()).parse(imlFile)
|
|
// def jdkNode = parsedXml.component[1].orderEntry.find { it.'@type' == 'jdk' }
|
|
// def sdkString = jdkNode.'@jdkName'
|
|
// parsedXml.component[1].remove(jdkNode)
|
|
// new Node(parsedXml.component[1], 'orderEntry', ['type': 'jdk', 'jdkName': sdkString, 'jdkType': 'Android SDK'])
|
|
// groovy.xml.XmlUtil.serialize(parsedXml, new FileOutputStream(imlFile))
|
|
// }
|
|
// }
|
|
// } catch (FileNotFoundException e) {
|
|
// e.printStackTrace()
|
|
// }
|
|
// }
|
|
//}
|
|
|
|
android {
|
|
namespace 'com.cariad.cea.settings'
|
|
compileSdk 34
|
|
|
|
defaultConfig {
|
|
applicationId "com.cariad.cea.settings"
|
|
minSdk 31
|
|
targetSdk 34
|
|
versionCode 15
|
|
versionName "1.0"
|
|
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
sourceSets.main {
|
|
manifest.srcFile 'AndroidManifest.xml'
|
|
java.srcDirs = ['src']
|
|
res.srcDirs = ['res', 'res-export', 'res-product']
|
|
// proto.srcDirs = ['protos']
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_17
|
|
targetCompatibility JavaVersion.VERSION_17
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = '17'
|
|
}
|
|
|
|
buildFeatures {
|
|
compose true
|
|
}
|
|
|
|
composeOptions {
|
|
kotlinCompilerExtensionVersion = '1.5.0' // 假设1.4.0支持Kotlin 1.9.0
|
|
}
|
|
|
|
lintOptions {
|
|
checkReleaseBuilds false
|
|
abortOnError false
|
|
}
|
|
|
|
signingConfigs {
|
|
platform {
|
|
storeFile file("../platform.jks")
|
|
storePassword 'android'
|
|
keyAlias 'androidkey'
|
|
keyPassword 'android'
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
debuggable false
|
|
minifyEnabled false
|
|
signingConfig signingConfigs.platform
|
|
}
|
|
|
|
debug {
|
|
debuggable false
|
|
minifyEnabled false
|
|
signingConfig signingConfigs.platform
|
|
}
|
|
|
|
applicationVariants.all { variant ->
|
|
variant.outputs.all {
|
|
outputFileName = "CariadSettings.apk"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation libs.androidx.activity
|
|
implementation libs.androidx.constraintlayout
|
|
compileOnly files('../libs/framework.jar')
|
|
implementation libs.navigation.fragment.ktx
|
|
implementation libs.window.window.java
|
|
implementation libs.gson
|
|
implementation libs.guava
|
|
|
|
implementation files('../libs/BiometricsSharedLib.jar')
|
|
implementation files('../libs/BiometricsSharedLib-java.jar')
|
|
implementation files('../libs/SystemUIUnfoldLib.jar')
|
|
implementation files('../libs/android.hardware.dumpstate-V1-java.jar')
|
|
implementation files('../libs/android.hardware.dumpstate-V1.0-java.jar')
|
|
implementation files('../libs/android.hardware.dumpstate-V1.1-java.jar')
|
|
implementation files('../libs/com_android_server_accessibility_flags_lib.jar')
|
|
implementation files('../libs/net-utils-framework-common.jar')
|
|
implementation files('../libs/notification_flags_lib.jar')
|
|
implementation files('../libs/securebox.jar')
|
|
|
|
// implementation files('../libs/FingerprintManagerInteractor.jar')
|
|
implementation files('../libs/MediaDrmSettingsFlagsLib.jar')
|
|
// implementation files('../libs/Settings-change-ids.jar')
|
|
// SettingsLib的依赖在后面整体配置
|
|
implementation files('../libs/aconfig_settings_flags_lib.jar')
|
|
implementation files('../libs/accessibility_settings_flags_lib.jar')
|
|
implementation files('../libs/app-usage-event-protos-lite.jar')
|
|
implementation files('../libs/battery-event-protos-lite.jar')
|
|
implementation files('../libs/battery-usage-slot-protos-lite.jar')
|
|
implementation files('./libs/contextualcards.aar')
|
|
implementation files('../libs/development_settings_flag_lib.jar')
|
|
implementation files('../libs/factory_reset_flags_lib.jar')
|
|
implementation files('../libs/fuelgauge-log-protos-lite.jar')
|
|
implementation files('../libs/fuelgauge-usage-state-protos-lite.jar')
|
|
implementation files('../libs/power-anomaly-event-protos-lite.jar')
|
|
implementation files('../libs/settings-contextual-card-protos-lite.jar')
|
|
implementation files('../libs/settings-log-bridge-protos-lite.jar')
|
|
implementation files('../libs/settings-logtags.jar')
|
|
implementation files('../libs/settings-telephony-protos-lite.jar')
|
|
// implementation files('../libs/setupdesign-lottie-loading-layout.jar')
|
|
implementation project(':lottie_loading_layout')
|
|
|
|
implementation files('../libs/statslog-settings.jar')
|
|
implementation files('../libs/settingslib_flags_lib.jar')
|
|
implementation files('../libs/wifi_aconfig_flags_lib.jar')
|
|
implementation files('../libs/android.view.accessibility.flags-aconfig-java.jar')
|
|
implementation files('../libs/telephony_flags_core_java_lib.jar')
|
|
|
|
|
|
// implementation files('../libs/SystemUISharedLib.jar')
|
|
implementation libs.androidx.appcompat
|
|
implementation libs.material
|
|
implementation libs.slice.builders
|
|
implementation libs.slice.core
|
|
implementation libs.slice.view
|
|
implementation libs.lottie
|
|
// implementation libs.compose.ui
|
|
implementation libs.compose.material3
|
|
implementation libs.material.icons.core
|
|
implementation libs.preference
|
|
implementation libs.room.runtime
|
|
annotationProcessor libs.room.compiler
|
|
implementation libs.atomicfu
|
|
|
|
implementation(project(':SettingsLib'))
|
|
implementation(project(':SettingsLib:search'))
|
|
implementation project(':SettingsLib:ActionBarShadow')
|
|
implementation project(':SettingsLib:ActionButtonsPreference')
|
|
implementation project(':SettingsLib:ActivityEmbedding')
|
|
implementation project(':SettingsLib:AdaptiveIcon')
|
|
implementation project(':SettingsLib:AppPreference')
|
|
implementation project(':SettingsLib:BannerMessagePreference')
|
|
implementation project(':SettingsLib:BarChartPreference')
|
|
implementation project(':SettingsLib:ButtonPreference')
|
|
implementation project(':SettingsLib:CollapsingToolbarBaseActivity')
|
|
implementation project(':SettingsLib:Color')
|
|
implementation project(':SettingsLib:DataStore')
|
|
implementation project(':SettingsLib:DeviceStateRotationLock')
|
|
implementation project(':SettingsLib:DisplayUtils')
|
|
implementation project(':SettingsLib:EmergencyNumber')
|
|
implementation project(':SettingsLib:EntityHeaderWidgets')
|
|
implementation project(':SettingsLib:FooterPreference')
|
|
implementation project(':SettingsLib:HelpUtils')
|
|
implementation project(':SettingsLib:IllustrationPreference')
|
|
implementation project(':SettingsLib:LayoutPreference')
|
|
implementation project(':SettingsLib:MainSwitchPreference')
|
|
implementation project(':SettingsLib:ProfileSelector')
|
|
implementation project(':SettingsLib:ProgressBar')
|
|
implementation project(':SettingsLib:RestrictedLockUtils')
|
|
implementation project(':SettingsLib:SearchWidget')
|
|
implementation project(':SettingsLib:SelectorWithWidgetPreference')
|
|
implementation project(':SettingsLib:SettingsSpinner')
|
|
implementation project(':SettingsLib:SettingsTheme')
|
|
implementation project(':SettingsLib:SettingsTransition')
|
|
implementation project(':SettingsLib:Tile')
|
|
implementation project(':SettingsLib:TopIntroPreference')
|
|
implementation project(':SettingsLib:TwoTargetPreference')
|
|
implementation project(':SettingsLib:UsageProgressBarPreference')
|
|
implementation project(':SettingsLib:Utils')
|
|
|
|
implementation project(':WifiTrackerLib')
|
|
implementation project(':setupdesign')
|
|
implementation project(':setupcompat')
|
|
implementation project(':iconloaderlib')
|
|
// implementation project(':lottie_loading_layout')
|
|
implementation project(':spa')
|
|
implementation project(':SettingsLib:SpaPrivileged')
|
|
|
|
implementation libs.protobuf.javalite
|
|
implementation libs.protoc
|
|
implementation libs.zxing
|
|
implementation files('../libs/settingslib_media_flags_lib.jar')
|
|
implementation files('../libs/core-all.jar')
|
|
implementation files('../libs/android.hidl.base-V1.0-java.jar')
|
|
implementation libs.dagger
|
|
annotationProcessor libs.dagger.compiler
|
|
}
|
|
//protobuf {
|
|
// protoc {
|
|
// // 通用 artifact
|
|
// artifact = 'com.google.protobuf:protoc:3.8.0'
|
|
// // MacOS
|
|
// if (org.gradle.internal.os.OperatingSystem.current().isMacOsX()) {
|
|
// artifact = 'com.google.protobuf:protoc:3.8.0:osx-x86_64'
|
|
// }
|
|
// }
|
|
// generateProtoTasks {
|
|
// all().each { task ->
|
|
// task.builtins {
|
|
// remove java
|
|
// java {
|
|
// option "lite"
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
//} |