[Fix] (CI): name APK artifacts by commit

This commit is contained in:
2026-07-15 00:22:12 -04:00
parent e61685547a
commit 056574eebe
2 changed files with 35 additions and 18 deletions
+14
View File
@@ -1,3 +1,4 @@
import com.android.build.gradle.internal.api.ApkVariantOutputImpl
import com.launchers_plugin.renderer.buildscript.RendererConfig
import com.launchers_plugin.renderer.buildscript.buildEnvs
import com.launchers_plugin.renderer.buildscript.buildJsonValue
@@ -62,6 +63,9 @@ val mobileGlMonthlyRevision = runGit(
"--since=${String.format("%d-%02d-01T00:00:00", 2000 + mobileGlVersionMajor, mobileGlVersionMinor)}",
"HEAD",
)?.toIntOrNull() ?: 0
val mobileGlApkSuffix = (findProperty("mobilegl.apkSuffix") ?: System.getenv("MOBILEGL_APK_SUFFIX") ?: mobileGlGitShortHash)
.toString()
.ifBlank { "nogit" }
val pluginRendererConfig = buildJsonValue {
renderer(
@@ -189,6 +193,16 @@ android {
}
}
android.applicationVariants.configureEach {
outputs.configureEach {
(this as ApkVariantOutputImpl).outputFileName = when (flavorName) {
"plugin" -> "MobileGL-plugin-release-$mobileGlApkSuffix.apk"
"trace" -> "MobileGL-plugin-trace-release-$mobileGlApkSuffix.apk"
else -> outputFileName
}
}
}
androidComponents {
onVariants(selector().withFlavor("profile" to "plugin")) { variant ->
variant.packaging.jniLibs.excludes.add("**/libtrace_replay_runner.so")