Integrate corrected char expressions into Liam code36

This commit is contained in:
zenord
2026-10-14 20:46:10 +08:00
parent 0c386ac8ec
commit 99a03e0487
23 changed files with 607 additions and 59 deletions
+15 -5
View File
@@ -40,7 +40,7 @@ def avatarPlaybackDiagnostic = providers.gradleProperty('avatarPlaybackDiagnosti
def avatarRuntimeFix = providers.gradleProperty('avatarRuntimeFix').orNull == 'true'
def avatarFullActionCandidate = providers.gradleProperty('avatarFullActionCandidate').orNull == 'true'
def actionVersionCode = (providers.gradleProperty('actionVersionCode').orNull ?: '16').toInteger()
if (characterProfileId != 'main' && (!avatarUserAssetCandidate || !avatarUserNetworkActions || actionVersionCode < characterProfile.minimumVersionCode)) throw new GradleException('Persona test requires existing exact black media/network flags and its minimum version code')
if (characterProfileId != 'main' && (!avatarUserAssetCandidate || actionVersionCode < characterProfile.minimumVersionCode)) throw new GradleException('Persona test requires authorized exact media and its minimum version code')
if (avatarActionCandidate && (!avatarMouthCandidate || actionVersionCode < 16)) {
throw new GradleException('Action stage requires the existing mouth runtime and a fresh code >=16')
}
@@ -52,7 +52,11 @@ if (avatarUiCandidate && !avatarNatural) {
}
def naturalManifestSha = providers.gradleProperty('naturalManifestSha').orNull ?: ''
def emotionManifestSha = providers.gradleProperty('emotionManifestSha').orNull ?: ''
def characterMedia = characterCatalog.mediaBundles[avatarUserAssetCandidate ? 'black-correct03' : 'white-full04']
def characterMediaId = providers.gradleProperty('characterMediaBundle').orNull ?: (avatarUserAssetCandidate ? 'black-correct03' : 'white-full04')
def characterMedia = characterCatalog.mediaBundles[characterMediaId]
def allowedMedia = characterProfile.mediaSelection == 'existing-build-flags' ? ['black-correct03','white-full04'] : [characterProfile.mediaSelection] + (characterProfile.additionalMediaSelections ?: [])
if (!characterMedia || !(characterMediaId in allowedMedia)) throw new GradleException('Profile/media selection is not authorized')
if (avatarUserNetworkActions && characterMedia.networkActionsAllowed != true) throw new GradleException('Network dance requires separate reviewed media registration')
if (emotionManifestSha && !(emotionManifestSha ==~ /[0-9a-f]{64}/)) throw new GradleException('Emotion graph requires exact external manifest SHA')
if (emotionManifestSha && (!avatarActionCandidate || !avatarMouthCandidate || !avatarNatural || actionVersionCode < 17)) throw new GradleException('Emotion candidate requires own-mouth runtime and a fresh code >=17')
if (avatarFullActionCandidate && (!emotionManifestSha || !avatarActionCandidate || actionVersionCode < 18)) throw new GradleException('Full candidate requires pinned emotion/action graph and fresh code >=18')
@@ -64,7 +68,7 @@ if (faceDiagnosticsFix && (!presenceCandidate || actionVersionCode < 24)) throw
if (presenceCandidate && (!avatarStartupFix || actionVersionCode < 23)) throw new GradleException('Presence candidate requires startup fix and fresh code >=23')
if (avatarStartupFix && (!avatarPlaybackClockFix || actionVersionCode < 22)) throw new GradleException('Startup fix requires repaired playback and fresh code >=22')
if (avatarUserNetworkActions && (!avatarUserAssetCandidate || actionVersionCode < 32)) throw new GradleException('User network dance requires authorized exact asset mode and fresh code >=32')
if (avatarUserAssetCandidate && (!avatarStartupFix || !cameraProbeDiagnostic || actionVersionCode < 30 || emotionManifestSha != '208f703ed92bf795bfeb78a1cef89b67bed2e45da80038a56157fd1ecd4cfa93')) throw new GradleException('User asset debug candidate requires exact authorized correct03, startup and current diagnostics, fresh code >=30')
if (avatarUserAssetCandidate && (!avatarStartupFix || !cameraProbeDiagnostic || actionVersionCode < (characterMedia.minimumVersionCode ?: 30) || characterMedia.userAuthorizedDebug != true || emotionManifestSha != characterMedia.indexSha256)) throw new GradleException('User asset debug candidate requires exact authorized media, startup and current diagnostics, fresh code')
if (!avatarUserAssetCandidate && avatarPlaybackClockFix && (!avatarFullActionCandidate || actionVersionCode < 21 || emotionManifestSha != '987e125a7d7a2cde99121b5f5246c82f4dbe36c4899d3d49eaffd1a68bafb887')) throw new GradleException('Playback clock fix requires frozen full graph and fresh code >=21')
if (avatarPlaybackDiagnostic && (!avatarFullActionCandidate || actionVersionCode < 20 || emotionManifestSha != '987e125a7d7a2cde99121b5f5246c82f4dbe36c4899d3d49eaffd1a68bafb887')) throw new GradleException('Playback diagnostic requires frozen full graph and fresh code >=20')
if (avatarRuntimeFix && (!avatarFullActionCandidate || actionVersionCode < 19)) throw new GradleException('Runtime fix requires full pinned graph and fresh code >=19')
@@ -104,10 +108,12 @@ def stagePackagedAssets = tasks.register('stagePackagedAssets', Exec) {
inputs.files(characterCatalogFile, rootProject.file('manifests/retained-avatar-files.json'), rootProject.file('scripts/select-character-assets.py'))
inputs.dir(file('src/main/assets'))
inputs.dir(file('src/main/res/drawable-nodpi'))
inputs.property('selection', [characterProfileId, emotionManifestSha, avatarUserAssetCandidate, avatarMouthCandidate, avatarStartupFix].toString())
if (characterMedia.resourceDirectory) inputs.dir(rootProject.file(characterMedia.resourceDirectory))
inputs.property('selection', [characterProfileId, characterMediaId, emotionManifestSha, avatarUserAssetCandidate, avatarMouthCandidate, avatarStartupFix].toString())
outputs.dir(packagedAssets)
outputs.file(layout.buildDirectory.file('generated/character-selection.json'))
commandLine 'python3', rootProject.file('scripts/select-character-assets.py'), '--profile', characterProfileId,
'--media-bundle', emotionManifestSha ? characterMediaId : '',
'--assets', file('src/main/assets'), '--emotion-sha', emotionManifestSha,
'--user-assets', avatarUserAssetCandidate.toString(), '--mouth', avatarMouthCandidate.toString(),
'--startup', avatarStartupFix.toString(), '--output', packagedAssets.get().asFile,
@@ -123,7 +129,7 @@ android {
resValue 'string', 'character_app_name', characterProfile.appName
buildConfigField 'String', 'CHARACTER_PROFILE', groovy.json.JsonOutput.toJson(characterProfileId)
buildConfigField 'String', 'DIALOGUE_PERSONA', groovy.json.JsonOutput.toJson(characterProfile.persona)
buildConfigField 'String', 'CHARACTER_NOTE', groovy.json.JsonOutput.toJson(characterProfile.settingsNote)
buildConfigField 'String', 'CHARACTER_NOTE', groovy.json.JsonOutput.toJson(characterMedia.settingsNote ?: characterProfile.settingsNote)
buildConfigField 'boolean', 'PERMISSION_CONNECTION_RETENTION', characterProfile.permissionConnectionRetention.toString()
minSdk 26
targetSdk 34
@@ -131,6 +137,7 @@ android {
versionCode avatarActionCandidate ? actionVersionCode : (avatarMouthCandidate ? 15 : (avatarUiCandidate ? 14 : (avatarNatural ? 13 : 12)))
versionName = avatarUserNetworkActions ? '0.7.14' : avatarUserAssetCandidate ? '0.7.12' : cameraProbeDiagnostic ? '0.7.11' : cameraPreviewStream ? '0.7.9' : cameraDirectYuv ? '0.7.8' : cameraCompatibilityFix ? '0.7.7' : faceDiagnosticsFix ? '0.7.6' : presenceCandidate ? '0.7.5' : avatarStartupFix ? '0.7.4' : avatarPlaybackClockFix ? '0.7.3' : avatarPlaybackDiagnostic ? '0.7.2' : avatarRuntimeFix ? '0.7.1' : (avatarActionCandidate ? '0.7.0' : ((avatarUiCandidate || avatarMouthCandidate) ? '0.6.2' : '0.6.1'))
ndk { abiFilters 'arm64-v8a' }
if (characterProfile.versionBase) versionName = characterProfile.versionBase
versionName += characterProfile.versionSuffix
}
compileOptions { sourceCompatibility JavaVersion.VERSION_17; targetCompatibility JavaVersion.VERSION_17 }
@@ -150,6 +157,7 @@ android {
buildConfigField 'String', 'EMOTION_ASSET_ROOT', groovy.json.JsonOutput.toJson(characterMedia.assetRoot)
buildConfigField 'String', 'STARTUP_ASSET_ROOT', groovy.json.JsonOutput.toJson(characterMedia.bootstrapRoot)
buildConfigField 'String', 'STARTUP_MANIFEST_SHA', groovy.json.JsonOutput.toJson(characterMedia.bootstrapSha256)
buildConfigField 'int', 'STARTUP_POSTER_RES_ID', 'com.gorios.lanvoice.R.drawable.' + characterMedia.posterResource
buildConfigField 'boolean', 'CAMERA_PROBE_DIAGNOSTIC', cameraProbeDiagnostic ? 'true' : 'false'
buildConfigField 'boolean', 'AVATAR_STARTUP_FIX', avatarStartupFix ? 'true' : 'false'
buildConfigField 'boolean', 'AVATAR_ENGINEERING', (avatarEngineering || avatarNatural) ? 'true' : 'false'
@@ -164,6 +172,7 @@ android {
buildConfigField 'String', 'EMOTION_ASSET_ROOT', '"avatar/a01-expression-action-v1/"'
buildConfigField 'String', 'STARTUP_ASSET_ROOT', '"avatar/startup-white-01/"'
buildConfigField 'String', 'STARTUP_MANIFEST_SHA', '"461f5cfc10036de5f10ca3ce765fb8d9998697d3fd035aa9b1862d2ccfc3eaa2"'
buildConfigField 'int', 'STARTUP_POSTER_RES_ID', 'com.gorios.lanvoice.R.drawable.startup_poster'
buildConfigField 'boolean', 'CAMERA_PROBE_DIAGNOSTIC', 'false'
buildConfigField 'boolean', 'AVATAR_STARTUP_FIX', 'false'
buildConfigField 'boolean', 'AVATAR_ENGINEERING', 'false'
@@ -175,6 +184,7 @@ android {
}
androidResources { noCompress += ['task', 'mp4'] }
sourceSets.main.res.srcDir(networkSecurityResources)
if (characterMedia.resourceDirectory) sourceSets.main.res.srcDir(rootProject.file(characterMedia.resourceDirectory))
// Retain private archived imports on disk, but never put old seated/arms-down
// animation packs into the new graph APK.
sourceSets.main.assets.setSrcDirs([packagedAssets])