mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-13 06:38:31 +09:00
[Chore] (android-plugin): calendar versioning 26.07 with commit-hash build id
versionCode = major * 100 + minor (2607); versionName = 26.07.<short git hash> (e.g. 26.07.4e558ee, -trace suffixed for trace flavors), replacing the placeholder versionCode 1 / versionName 'dev'. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -32,6 +32,21 @@ def mobileGlAbiFilters = {
|
|||||||
.findAll { !it.isEmpty() }
|
.findAll { !it.isEmpty() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Calendar versioning: major = two-digit year, minor = month. The build
|
||||||
|
// identifier is the short commit hash, giving version names like 26.07.4e558ee.
|
||||||
|
def mobileGlVersionMajor = 26
|
||||||
|
def mobileGlVersionMinor = 7
|
||||||
|
def mobileGlGitShortHash = {
|
||||||
|
try {
|
||||||
|
def proc = ['git', 'rev-parse', '--short=7', 'HEAD'].execute(null, rootDir)
|
||||||
|
proc.waitFor()
|
||||||
|
def hash = proc.in.text.trim()
|
||||||
|
(proc.exitValue() == 0 && hash) ? hash : 'nogit'
|
||||||
|
} catch (Exception ignored) {
|
||||||
|
'nogit'
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace 'top.mobilegl.plugin'
|
namespace 'top.mobilegl.plugin'
|
||||||
compileSdk 34
|
compileSdk 34
|
||||||
@@ -40,8 +55,8 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdk 26
|
minSdk 26
|
||||||
targetSdk 34
|
targetSdk 34
|
||||||
versionCode 1
|
versionCode mobileGlVersionMajor * 100 + mobileGlVersionMinor
|
||||||
versionName 'dev'
|
versionName String.format('%d.%02d.%s', mobileGlVersionMajor, mobileGlVersionMinor, mobileGlGitShortHash)
|
||||||
|
|
||||||
ndk {
|
ndk {
|
||||||
def abiFiltersOverride = mobileGlAbiFilters()
|
def abiFiltersOverride = mobileGlAbiFilters()
|
||||||
|
|||||||
Reference in New Issue
Block a user