KernelSU/manager/build.gradle.kts
Light_summer 60fcd27b84
manager: Refactor the click logic of ModuleItem (#2105)
Drop `com.google.accompanist` that we needn't it

Remove unused metadata, abi

Optimize app icon (No visual changes)

Update Gradle to 8.10.2

Enable per app language support

Optimize `SwitchItem`


https://github.com/user-attachments/assets/777729e6-5108-4060-91a7-28b5b9d98441

Refactor the click logic of `ModuleItem`


https://github.com/user-attachments/assets/e61da54a-6c1c-45d7-bf27-52b452134b7e

Use compose's Text in AboutCard to support dynamicColor


![Screenshot_20241001-094116](https://github.com/user-attachments/assets/9882a4c1-719d-4622-a316-063cf349a753)

Add scroll behavior for TopAppBar


![Screenshot_20241001-133657.png](https://github.com/user-attachments/assets/1a884648-bc91-4f8a-9940-f2a5f0b8f6da)

![Screenshot_20241001-133645.png](https://github.com/user-attachments/assets/cd4712d3-a2c7-47f1-bba4-4312b779f6b1)

Fix padding for BottomNavigationBar
2024-10-01 20:40:16 +08:00

98 lines
2.8 KiB
Plaintext

import com.android.build.api.dsl.ApplicationDefaultConfig
import com.android.build.api.dsl.CommonExtension
import com.android.build.gradle.api.AndroidBasePlugin
import java.io.ByteArrayOutputStream
plugins {
alias(libs.plugins.agp.app) apply false
alias(libs.plugins.agp.lib) apply false
alias(libs.plugins.kotlin) apply false
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.lsplugin.cmaker)
}
cmaker {
default {
arguments.addAll(
arrayOf(
"-DANDROID_STL=none",
)
)
abiFilters("arm64-v8a", "x86_64", "riscv64")
}
buildTypes {
if (it.name == "release") {
arguments += "-DDEBUG_SYMBOLS_PATH=${layout.buildDirectory.asFile.get().absolutePath}/symbols"
}
}
}
val androidMinSdkVersion = 26
val androidTargetSdkVersion = 35
val androidCompileSdkVersion = 35
val androidBuildToolsVersion = "35.0.0"
val androidCompileNdkVersion = "27.0.12077973"
val androidSourceCompatibility = JavaVersion.VERSION_21
val androidTargetCompatibility = JavaVersion.VERSION_21
val managerVersionCode by extra(getVersionCode())
val managerVersionName by extra(getVersionName())
fun getGitCommitCount(): Int {
val out = ByteArrayOutputStream()
exec {
commandLine("git", "rev-list", "--count", "HEAD")
standardOutput = out
}
return out.toString().trim().toInt()
}
fun getGitDescribe(): String {
val out = ByteArrayOutputStream()
exec {
commandLine("git", "describe", "--tags", "--always")
standardOutput = out
}
return out.toString().trim()
}
fun getVersionCode(): Int {
val commitCount = getGitCommitCount()
val major = 1
return major * 10000 + commitCount + 200
}
fun getVersionName(): String {
return getGitDescribe()
}
subprojects {
plugins.withType(AndroidBasePlugin::class.java) {
extensions.configure(CommonExtension::class.java) {
compileSdk = androidCompileSdkVersion
ndkVersion = androidCompileNdkVersion
buildToolsVersion = androidBuildToolsVersion
defaultConfig {
minSdk = androidMinSdkVersion
if (this is ApplicationDefaultConfig) {
targetSdk = androidTargetSdkVersion
versionCode = managerVersionCode
versionName = managerVersionName
}
ndk {
abiFilters += listOf("arm64-v8a", "x86_64", "riscv64")
}
}
lint {
abortOnError = true
checkReleaseBuilds = false
}
compileOptions {
sourceCompatibility = androidSourceCompatibility
targetCompatibility = androidTargetCompatibility
}
}
}
}