Add isolated Liam persona test APK profile

This commit is contained in:
zenord
2026-10-14 17:50:40 +08:00
parent 5a7be557d0
commit 4c70ff665e
12 changed files with 197 additions and 54 deletions
+4 -4
View File
@@ -8,9 +8,9 @@ def characterProfileId = providers.gradleProperty('characterProfile').orNull ?:
def characterCatalogFile = rootProject.file('manifests/character-build-profiles.json')
def characterCatalog = new groovy.json.JsonSlurper().parse(characterCatalogFile)
def characterProfile = characterCatalog.profiles[characterProfileId]
if (!characterProfile || !(characterProfileId in ['main', 'lvbu-test'])) throw new GradleException('Unknown trusted character profile')
if (!characterProfile || !(characterProfileId in ['main', 'lvbu-test', 'liam-test'])) throw new GradleException('Unknown trusted character profile')
if (characterProfileId != 'main') layout.buildDirectory.set(file('build/characters/' + characterProfileId))
if (characterProfileId == 'lvbu-test' && gradle.startParameter.taskNames.any { it.toLowerCase().contains('release') }) throw new GradleException('Lvbu profile is debug-only')
if (characterProfileId != 'main' && gradle.startParameter.taskNames.any { it.toLowerCase().contains('release') }) throw new GradleException('Persona test profile is debug-only')
// Populated once by scripts/prepare-expression.sh from stable Maven versions, then pinned.
def expressionVersions = new Properties()
@@ -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 == 'lvbu-test' && (!avatarUserAssetCandidate || !avatarUserNetworkActions || actionVersionCode < 34)) throw new GradleException('Lvbu test requires existing exact black media/network flags and fresh code >=34')
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 (avatarActionCandidate && (!avatarMouthCandidate || actionVersionCode < 16)) {
throw new GradleException('Action stage requires the existing mouth runtime and a fresh code >=16')
}
@@ -182,7 +182,7 @@ android {
tasks.named('preBuild').configure { dependsOn(generateNetworkSecurityConfig, stagePackagedAssets) }
androidComponents {
beforeVariants(selector().withBuildType('release')) { variant ->
if (characterProfileId == 'lvbu-test') variant.enable = false
if (characterProfileId != 'main') variant.enable = false
}
}
dependencies {
@@ -27,7 +27,7 @@ object DialogueProtocol {
const val DOWNLINK_PCM_BYTES = 1_920
fun hello(actionPackSha: String? = null,pendingPackSha: String?=null,persona: String="default"): String {
require(persona in setOf("default","lvbu"))
require(persona in setOf("default","lvbu","liam"))
return JSONObject()
.put("type", "hello")
.put("codec", "pcm16")