Updated main branch
This commit is contained in:
parent
9a3987bc1e
commit
3f2388004d
350 changed files with 79360 additions and 0 deletions
82
manager/build.gradle.kts
Normal file
82
manager/build.gradle.kts
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
import com.android.build.api.dsl.ApplicationDefaultConfig
|
||||
import com.android.build.api.dsl.CommonExtension
|
||||
import com.android.build.gradle.api.AndroidBasePlugin
|
||||
|
||||
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", "armeabi-v7a")
|
||||
}
|
||||
buildTypes {
|
||||
if (it.name == "release") {
|
||||
arguments += "-DDEBUG_SYMBOLS_PATH=${layout.buildDirectory.asFile.get().absolutePath}/symbols"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val androidMinSdkVersion = 26
|
||||
val androidTargetSdkVersion = 36
|
||||
val androidCompileSdkVersion = 36
|
||||
val androidBuildToolsVersion = "36.1.0"
|
||||
val androidCompileNdkVersion by extra(libs.versions.ndk.get())
|
||||
val androidCmakeVersion by extra("3.22.0+")
|
||||
val androidSourceCompatibility = JavaVersion.VERSION_21
|
||||
val androidTargetCompatibility = JavaVersion.VERSION_21
|
||||
val managerVersionCode by extra(4 * 10000 + getGitCommitCount() - 2815)
|
||||
val managerVersionName by extra(getGitDescribe())
|
||||
|
||||
fun getGitCommitCount(): Int {
|
||||
return providers.exec {
|
||||
commandLine("git", "rev-list", "--count", "HEAD")
|
||||
}.standardOutput.asText.get().trim().toInt()
|
||||
}
|
||||
|
||||
fun getGitDescribe(): String {
|
||||
return providers.exec {
|
||||
commandLine("git", "describe", "--tags", "--always", "--abbrev=0")
|
||||
}.standardOutput.asText.get().trim()
|
||||
}
|
||||
|
||||
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", "armeabi-v7a")
|
||||
}
|
||||
}
|
||||
|
||||
lint {
|
||||
abortOnError = true
|
||||
checkReleaseBuilds = false
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = androidSourceCompatibility
|
||||
targetCompatibility = androidTargetCompatibility
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue