Skip to content

t1k:unity:mobile:applovin-upgrade

FieldValue
Modulemobile
Version3.65.6
Effortmedium
Tools—

Keywords: adapters, applovin, integration manager, jenkins branch specifier, manifest.json, max, mediation, packages-lock, release branch, upgrade all

/t1k:unity:mobile:applovin-upgrade
[--plan-only] [--develop <branch>] [--release-prefix <prefix>]

T1K — AppLovin Upgrade (headless “Upgrade All”)

Section titled “T1K — AppLovin Upgrade (headless “Upgrade All”)”

Reproduces the Integration Manager Upgrade All button (AppLovinIntegrationManagerWindow.UpgradeAllNetworks, UPM mode): for every mediation adapter already installed whose version is behind AppLovin’s catalog, write the newer version into Packages/manifest.json. Networks that are not installed are never added. The MAX SDK (com.applovin.mediation.ads) is out of scope — adapters and DSP packages only.

Scripts (Node ≥ 26, run from the repo root):

Terminal window
S=.claude/skills/t1k-unity-mobile-applovin-upgrade/scripts
P="$TEMP/applovin-plan.json" # plan file shared by every step

release.cjs defaults to branch develop and prefix release- (studio convention). Override per-project with --develop <branch> / --release-prefix <prefix> on every release.cjs invocation below (preflight, commit, releases, pr, new-release) when a project uses a different trunk name or release-branch pattern.

RuleReason
Skip pinned adaptersUITemplate/.../PackageMigration/Resources/PackageMigrationConfig.json packagesVersionToUse is force-applied by ProjectAutoMigrationScript on every editor load and every focus change, with an exact-match check — it silently downgrades anything newer. Upgrading a pinned adapter would be reverted by the very batchmode run below. Changing a pin is a UITemplate submodule change that affects every studio project — out of scope; report it.
Cap at the mirrorcom.applovin.mediation is resolved from whichever manifest.json scopedRegistries entry’s scopes covers that package name — the studio mirror on most projects, but derived per-project rather than hardcoded. A version AppLovin calls latest may not be mirrored yet; the plan targets the newest mirrored version ≤ AppLovin latest and reports the gap. Auth comes from ~/.upmconfig.toml (never printed), keyed by the derived registry URL. If no scopedRegistries entry covers the scope, the plan falls back to AppLovin’s own registry with no cap — every target is AppLovin’s catalog latest — and reports a warnings entry saying so.
Batchmode for the lockpackages-lock.json holds hashes/dependency closures only UPM computes. Unity -batchmode -quit resolves packages and writes it. Unity must be closed on this project.
Commit two files onlyBatchmode also runs the other migration modules (AndroidManifest, gradle, proguard, ProjectSettings…). Those changes are NOT committed — they are reported.
Jenkins before pushThe Release job has a GitHubPushTrigger; its branch specifier must already name the new branch when the branch is pushed, or the push builds nothing (or the old branch).

Each step is a gate: stop on any ERROR: and report it — never work around it.

  1. Preflight — bun $S/release.cjs preflight. Requires branch develop, no tracked changes, fast-forwards to origin/develop. If it reports tracked changes, ask the user (AskUserQuestion) — never stash/discard for them.

  2. Plan — bun $S/upgrade.cjs plan --out "$P". Show the user a table from the JSON: upgrades (from → to), skippedPinned (current / AppLovin latest / pin), mirrorBehind (AppLovin latest vs mirror best), notInCatalog. If warnings is non-empty (no scoped registry covers com.applovin.mediation), surface it — every upgrade target is AppLovin’s catalog latest, uncapped. If upgrades is empty → report “already up to date” (with the skipped lists) and stop. --plan-only argument → stop here.

  3. Apply — bun $S/upgrade.cjs apply --plan "$P".

  4. Resolve — bun $S/upgrade.cjs resolve --plan "$P" (Bash timeout: 600000; run in background if it exceeds that, Unity can take several minutes). It exits non-zero on a Unity failure or when any target is missing from manifest/lock (mismatches). On failure: show upmErrors + the log path, then restore the two files (git checkout -- <manifest> <lock>) and stop. If extraChanges is non-empty, list them and AskUserQuestion: keep them uncommitted (default) or discard them (git checkout -- <those paths>). Never commit them in this flow.

  5. Commit + push develop — bun $S/release.cjs commit --plan "$P" --push. Pathspec commit of exactly Packages/manifest.json + Packages/packages-lock.json; refuses if anything else is staged or lands in the commit. The message is kept short: one subject line (chore(applovin): upgrade N MAX adapters), no per-adapter list, since the manifest diff already shows it. Put the from → to table in the final report, not the commit. Report the SHA.

  6. Choose the release target — bun $S/release.cjs releases. It ignores branches carrying any prefix before the release-branch pattern (e.g. chibi3/release-*). AskUserQuestion with the latest branch and developCommitsAheadOfLatest:

    • PR to <latest> → step 7a
    • New release branch → step 7b

7a. PR — bun $S/release.cjs pr <latest> (reuses an open develop → release PR if one exists). Report the URL. Done.

7b. New release

  1. Confirm the version — AskUserQuestion offering suggestions.next (studio rollover: 1.0.9 → 1.1.0, 1.1.1 → 1.1.2) as recommended, plus minor (and major if it differs meaningfully). The user may type another; it must be greater than latestVersion.
  2. Find the Jenkins job(s) — mcp__jenkins__findJobsWithScmUrl with git remote get-url origin. AskUserQuestion (multiSelect) which job(s) to re-point — ask every run, never assume. For each chosen job, mcp__jenkins__getJobScm and record the current branch of the project repo SCM entry (the job also checks out JenkinsScripts — that one must not change). Keep the job’s existing spec format — read the job’s actual current value rather than assuming it (a bare branch name with no */ prefix is the studio convention, but not universal).
  3. Re-point Jenkins (reuses the core Jenkins skill’s script; credentials resolve from the jenkins MCP entry). <branch> below is <release-prefix><ver> — release-<ver> unless --release-prefix overrode it in step 6:
    Terminal window
    J=~/.claude/skills/t1k-jenkins-job/scripts/jenkins-job.cjs
    bun $J update <folder> <job> --branch <branch> --dry-run # show the diff to the user
    bun $J update <folder> <job> --branch <branch>
    setBranch rewrites the first BranchSpec in config.xml. Verify independently: mcp__jenkins__getJobScm must show the project repo on <branch> AND JenkinsScripts still on master. If JenkinsScripts moved, immediately re-run update --branch <old> to restore and stop. Do not touch PARAM_BUILD_VERSION — the build takes its version from the branch name.
  4. Push the branch — only after every chosen job verified: bun $S/release.cjs new-release <ver> (pushes origin/develop → <branch>; no local checkout, HEAD stays on develop).
  5. Confirm the trigger — mcp__jenkins__getJob on each job shortly after; report whether a build was queued. Never call triggerBuild as a substitute without asking.

Upgraded adapters (from → to), skipped-as-pinned, mirror-behind, the develop commit SHA, then either the PR URL or <branch> + Jenkins job(s) re-pointed + build queued yes/no. Remind: run EDM4U Android/iOS resolve on the next editor open if the adapter’s native SDK versions changed.

The adapter bump runs through scripts/upgrade.cjs (and release.cjs for the release branch):

StepAgent
Run upgrade.cjs --plan-only and read the planned adapter bumps off the outputt1k-fact-fetcher
Apply the bump, regenerate packages-lock.json, commit to developreasoning tier — t1k-unity-base-developer; a write to the user’s manifest
Open the PR or cut the release branchreasoning tier — operator-confirmed, never delegated
  • apply does exact text replacement of "name": "version" so CRLF line endings and 4-space indent survive; it fails if the manifest changed after plan — re-run plan.
  • A stale Temp/UnityLockfile (crashed editor) is deleted automatically; a live editor keeps it locked and resolve refuses.
  • Unity path defaults to C:/Program Files/Unity/Hub/Editor/<ProjectVersion>/Editor/Unity.exe on Windows, or /Applications/Unity/Hub/Editor/<ProjectVersion>/Unity.app/Contents/MacOS/Unity on macOS; override either with UNITY_EXE.
  • The pin table is base config merged with the variant for the project’s editor (Unity 6 = base only), mirroring PackageMigration.GetUnityVariantKey().
  • git status --porcelain lines are fixed-column (XY + path); the shared git() helper in scripts/lib.cjs trims only trailing newline/CR, never leading whitespace — trimming the whole multi-line output would eat the leading space off the first line and shift every downstream slice(3) by one column for that entry.
  • The mirror registry is derived from manifest.json’s scopedRegistries[].scopes (whichever entry covers com.applovin.mediation), not hardcoded — a project without a matching scopedRegistries entry has no cap and gets AppLovin’s catalog latest for every upgrade. The ~/.upmconfig.toml lookup tries the derived URL both with and without a trailing slash, since Unity/npm auth sections key on an exact string and a scopedRegistries.url may or may not carry one.