You've already forked Zygisk-Assistant
mirror of
https://github.com/snake-4/Zygisk-Assistant.git
synced 2025-09-06 06:37:02 +00:00
Added commit hash to version strings
This commit is contained in:
@@ -4,6 +4,15 @@ plugins {
|
||||
alias(libs.plugins.agp.lib) apply false
|
||||
}
|
||||
|
||||
val commitHash: String by extra({
|
||||
val stdout = ByteArrayOutputStream()
|
||||
rootProject.exec {
|
||||
commandLine("git", "rev-parse", "--short", "HEAD")
|
||||
standardOutput = stdout
|
||||
}
|
||||
stdout.toString().trim()
|
||||
})
|
||||
|
||||
val moduleId by extra("zygisk-assistant")
|
||||
val moduleName by extra("Zygisk Assistant")
|
||||
val verName by extra("v2.0.0")
|
||||
|
||||
@@ -7,6 +7,7 @@ plugins {
|
||||
val moduleId: String by rootProject.extra
|
||||
val moduleName: String by rootProject.extra
|
||||
val verCode: Int by rootProject.extra
|
||||
val commitHash: String by rootProject.extra
|
||||
val verName: String by rootProject.extra
|
||||
val abiList: List<String> by rootProject.extra
|
||||
|
||||
@@ -39,7 +40,7 @@ androidComponents.onVariants { variant ->
|
||||
val libOutDir = layout.buildDirectory.dir("intermediates/stripped_native_libs/$variantLowered/out/lib").get()
|
||||
val moduleDir = layout.buildDirectory.dir("outputs/module/$variantLowered").get()
|
||||
val zipOutDir = layout.buildDirectory.dir("outputs/release").get()
|
||||
val zipFileName = "$moduleName-$verName-$verCode-$buildTypeLowered.zip".replace(' ', '-')
|
||||
val zipFileName = "$moduleName-$verName-$commitHash-$buildTypeLowered.zip".replace(' ', '-')
|
||||
|
||||
val prepareModuleFilesTask = task<Sync>("prepareModuleFiles$variantCapped") {
|
||||
group = "module"
|
||||
@@ -50,7 +51,7 @@ androidComponents.onVariants { variant ->
|
||||
expand(
|
||||
"moduleId" to moduleId,
|
||||
"moduleName" to moduleName,
|
||||
"versionName" to "$verName ($verCode-$variantLowered)",
|
||||
"versionName" to "$verName ($commitHash-$variantLowered)",
|
||||
"versionCode" to verCode
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest/>
|
||||
Reference in New Issue
Block a user