Skip to content

ADFA-174: Flip application id and namespace to org.appdevforall.codeonthego (Phase 3) - #2179

Open
jimturner-adfa wants to merge 6 commits into
ADFA-174-change-to-org-appdevforall-codeonthegofrom
ADFA-174-phase3-application-id
Open

jimturner-adfa wants to merge 6 commits into
ADFA-174-change-to-org-appdevforall-codeonthegofrom
ADFA-174-phase3-application-id

Conversation

@jimturner-adfa

@jimturner-adfa jimturner-adfa commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

ADFA-174

Important

Stacked on #2136; do not merge before it. Merge together with appdevforall/terminal-packages#3: its packages have /data/data/org.appdevforall.codeonthego baked in, and this PR is what moves the app there.

Irreversible for existing installs. Android treats the new application id as a different app, so current users don't get this as an update (ADR 0017).

Phase 3 of ADR 0017. It moves the application id and the Gradle/AGP namespace to org.appdevforall.codeonthego.

Blockers before merge

  • Firebase: register a client for org.appdevforall.codeonthego and update the google-services.json CI uses. Without it, process…GoogleServices fails the build, and the app crashes in AnalyticsManager on first use.
  • Migration notice: a last update to the old com.itsaky.androidide app that tells users to install the new one. It goes in a separate PR on stage, and is waiting on the wording and on where users get the new app.
  • Package repo: publish terminal-packages#3's packages to apt/codeonthego-main, rebuilding termux-tools first so its sources.list points there.

Review by commit

Commit What it is
9be0a165a spotlessApply on the 35 files the rename touches that were still identical to stage - formatting only
1a0b5adc1 the flip, scripted (523 files)
f68110896 docs: CLAUDE.md, ARCHITECTURE.md, and implementation notes in ADR 0017
9488ecd24 SYNC_META_VERSION 2 -> 3, so projects carried over from the old app re-sync once
b2ff0485b, d5c84d377 merge #2136's apiCheck and doc-path fixes; the namespace flip leaves the API dump unchanged

Notes for reviewers:

  • 9be0a165a: the non-whitespace lines are formatter reflow. String resources were compared value by value and render identically (76 values differ only in raw whitespace). The init script GenerateInitScriptTask writes differs only in indentation, and TermuxConstants is whitespace-only, with its constants in the same order.

  • 1a0b5adc1: BuildConfig.PACKAGE_NAME drives the application id, every namespace, the Gradle plugin ids and the Maven group. The script moves everything tied to it:

    • imports of the generated classes: R, BuildConfig, data binding, the eventbus indexes and the generated lexers;
    • gradle-plugin's package declarations, the init-script template and the QuickBuildPlugin class-name string;
    • hidden copies of the id: TermuxConstants.TERMUX_PACKAGE_NAME, the data-dir constants ANDROIDIDE_HOME / MAVEN_LOCAL_REPOSITORY, the Shizuku starter, the logsender / quickbuild IDE package, and the /data/data paths in code, tests and strings.

    These keep com.itsaky.androidide on purpose:

    • vendored build logic and forks in composite-builds;
    • the buildinfo template package;
    • android-tree-sitter;
    • the external gradle-tooling-api artifact.

    The offline Maven repos need no republishing: localMvnRepository.zip has no artifacts under the app's group, and plugin-maven-repo.zip already uses org/appdevforall/codeonthego.

  • 9488ecd24: a project's Gradle sync cache lives in the project, on shared storage, and holds absolute paths into the app's data dir. checkSyncNeeded compared only the schema version and the watched build files, so caches written by the old app passed. Carried-over projects then kept a classpath of missing jars (no kotlin-stdlib, no AndroidX) for code intelligence. The new test a cache synced under the old application id is resynced fails without the bump.

Verification

  • All modules compile, main and unit-test sources.
  • Unit tests: 5,907 pass, 0 fail, 9 skipped. The run covers testV8DebugUnitTest in every module, :plugin-api:testDebugUnitTest, the JVM modules, and :gradle-plugin:test.
  • spotlessCheck and :plugin-api:apiCheck pass.
  • On a Pixel 6 Pro (arm64-v8a, API 37), with a bootstrap built from terminal-packages#3:
    • onboarding and setup complete;
    • bash, git, python3 and java/javac 21 (javac --release 17) run from the new prefix;
    • a project synced by the old app re-syncs (NEED_SYNC: sync meta version mismatch: expected=3, actual=2), its cache is rewritten with new-dir paths only, and it builds to an APK in-app.
  • Not done:
    • instrumentation tests;
    • apt install inside the terminal, which needs the new repository published;
    • the 2x font-scale check: there is no UI change.

🤖 Generated with Claude Code

yaturner and others added 4 commits October 22, 2026 12:13
Pre-formats the files the Phase 3 rename touches that were still identical
to origin/stage, so the rename commit carries no formatter noise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nthego

Phase 3 of ADR 0017. BuildConfig.PACKAGE_NAME is now
org.appdevforall.codeonthego, which moves the application id (and the app
data dir), every module namespace, the Gradle plugin ids and the Maven
group. Mechanical follow-through, scripted:

- imports of the generated classes that move with the namespace: R,
  BuildConfig, data binding, the eventbus indexes and the generated lexers
- gradle-plugin package declarations (its sources were already under
  org/appdevforall/codeonthego), the init-script template in
  GenerateInitScriptTask, and the QuickBuildPlugin class-name string
- hidden copies of the id: TermuxConstants.TERMUX_PACKAGE_NAME, the
  data-dir constants ANDROIDIDE_HOME / MAVEN_LOCAL_REPOSITORY, the
  shizuku starter, logsender/quickbuild IDE package, hardcoded
  /data/data paths in code, tests and string resources

Unchanged by design: vendored build logic and forks in composite-builds,
the buildinfo template package, android-tree-sitter, and the external
gradle-tooling-api artifact.

Requires the matching terminal packages (appdevforall/terminal-packages#3)
and a Firebase client registered for the new id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CLAUDE.md and ARCHITECTURE.md said the namespace stays com.itsaky.androidide;
ADR 0017 gains implementation notes on what keeps the old name and the
hidden copies of the id the device test found.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gradle sync caches live in the project on shared storage and hold absolute
paths into the app data dir. After the id change they point into the old
app's /data/data dir, yet checkSyncNeeded accepted them because only the
schema version and watched build files are compared - so carried-over
projects kept a classpath of missing jars (no kotlin-stdlib, AndroidX)
for code intelligence until a manual sync.

Bump SYNC_META_VERSION so those caches are discarded and resynced once.
Found on a device with a project synced by the old app.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jimturner-adfa jimturner-adfa self-assigned this Oct 27, 2026
@hal-eisen-adfa

hal-eisen-adfa commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Filed ADFA-6792 (subtask of ADFA-174): rebuild appdevforall/dev-assets bootstraps and the plugin template for the new application id.

@jimturner-adfa
jimturner-adfa requested a review from a team November 11, 2026 21:40
@jimturner-adfa
jimturner-adfa marked this pull request as ready for review November 11, 2026 21:44

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@Daniel-ADFA Daniel-ADFA left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Top of a 2-PR stack, on #2136. This head is the stack tip, d5c84d3. The findings whose code is in #2136's layer (the plugin contract rename, the provider authorities) are on #2136.

CRITICAL

  • constants.kt:42 - fresh installs get a bootstrap built for the old data dir (ADFA-6792)

IMPORTANT

  • ProjectSyncHelper.kt:57 - the resync bump is cancelled by stage's "3"
  • BuildConfig.kt:32 - new id gets a fresh debug keystore; apps built by the old IDE can't be updated
  • BuildConfig.kt:32 - Share-Your-Apps refuses the new caller id

MINOR (outside this diff, no anchor)

  • .github/workflows/signing-fingerprint.yml:145-200 emits and validates a single package_name, read from PACKAGE_NAME. App Links can't cover both apps during the migration: the new app stays unverified until someone dispatches it with deploy, and then the old one loses verification. Allow both packages for the migration window and add the dispatch to the release steps.
  • quickbuild/docs/manual-qa.md, quickbuild/docs/debugging.md, scripts/r8-plugin-impact/README.md and infra/well-known-worker/README.md still use com.itsaky.androidide in adb, run-as and pm commands that stop working after the flip.

NITPICK - 1 inline, not listed

CI: Build Universal APK is red on this head and the previous one. The log has expired, so the cause isn't confirmed; it's probably the Firebase blocker the body lists. The FIREBASE_APP_ID secret is also tied to the old app and isn't in that list.

Merge state: about 860 paths conflict with stage.


@Suppress("SdCardPath")
const val ANDROIDIDE_HOME = "/data/data/com.itsaky.androidide/files/home/$IDE_DATA_DIR_NAME"
const val ANDROIDIDE_HOME = "/data/data/org.appdevforall.codeonthego/files/home/$IDE_DATA_DIR_NAME"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL: Fresh installs still get a bootstrap built for /data/data/com.itsaky.androidide.

The bootstrap is fetched from unversioned dev-assets URLs, and dev-assets builds it with APP_PACKAGE defaulting to com.itsaky.androidide (scripts/pipelines/build-bootstrap.sh:21, which sets NATIVE_PREFIX at :95; verify-bootstrap-candidate.sh:57 expects the same). After this flip, the binaries and scripts unpacked under this path point at the old prefix, so the terminal, java and every Gradle build fail on a new install. ADFA-6792 covers the rebuild but is still To Do.

List ADFA-6792 as a merge blocker, and key the bootstrap asset URLs by app id so old-id builds of stage and main keep working once dev-assets publishes the new bootstrap.


/** AndroidIDE's package name. */
const val PACKAGE_NAME = "com.itsaky.androidide"
const val PACKAGE_NAME = "org.appdevforall.codeonthego"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMPORTANT: The new application id gets a fresh debug.keystore, so users can't update apps they built with the old IDE.

The cause is common/.../utils/Environment.java:221, outside this diff: ANDROID_USER_HOME lives inside the private HOME, so the new id starts with a new ~/.android/debug.keystore, and the templates sign debug builds with it. Running an existing project whose app was installed from the old IDE then fails with a signature conflict, which InstallationResultHandler reports as a generic failure, and the only way out is uninstalling the app and losing its data. Neither the PR nor ADR 0017 mentions it.

Carry the keystore over from the old app, or at least turn the conflict into a prompt that says why and offers to uninstall.


/** AndroidIDE's package name. */
const val PACKAGE_NAME = "com.itsaky.androidide"
const val PACKAGE_NAME = "org.appdevforall.codeonthego"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMPORTANT: Share-Your-Apps refuses the new IDE.

The cause is in addons, outside this diff: plugins/Share-Your-Apps/server/.../Shared.kt:74 sets CALLER = "com.itsaky.androidide", and LaunchActivity.kt:44 refuses any other calling package. After this flip the server launch is refused and sharing breaks.

Accept both ids in the server, and ship that update before this merges.

*/
const val SYNC_META_VERSION = "2"
const val SYNC_META_VERSION = "3"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMPORTANT: This bump to "3" stops forcing a resync once stage is merged in.

Stage already set SYNC_META_VERSION to "3" in aad1af4 (ADFA-7115, #2266), and a trial merge resolves this line to "3" with no conflict. Old-id builds of stage and main then write version-3 caches pointing into the old data dir, and the new app accepts them, so carried-over projects lose kotlin-stdlib and AndroidX in code intelligence. SyncMetaVersionTest seeds "2", so it stays green.

Bump to "4" when merging stage and seed the test with "3". Sturdier: store the app id or data dir in the sync meta and resync when it differs.


@Suppress("SdCardPath")
const val ANDROIDIDE_HOME = "/data/data/com.itsaky.androidide/files/home/$IDE_DATA_DIR_NAME"
const val ANDROIDIDE_HOME = "/data/data/org.appdevforall.codeonthego/files/home/$IDE_DATA_DIR_NAME"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NITPICK: The id is hard-coded here instead of derived from the build's PACKAGE_NAME, as in about a dozen other places (constants.kt:64, TermuxConstants, starter.cpp, LogSender, QuickBuildClient, the <queries> blocks, WebServer, GenerateInitScriptTask). They're all correct today, but the next rename has to find every one of them again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants