Repository navigation
ADFA-174: Flip application id and namespace to org.appdevforall.codeonthego (Phase 3) - #2179
jimturner-adfa wants to merge 6 commits into
Conversation
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>
…DFA-174-phase3-application-id
…DFA-174-phase3-application-id
|
Filed ADFA-6792 (subtask of ADFA-174): rebuild appdevforall/dev-assets bootstraps and the plugin template for the new application id. |
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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-200emits and validates a singlepackage_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.mdandinfra/well-known-worker/README.mdstill usecom.itsaky.androididein 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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
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.codeonthegobaked 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
org.appdevforall.codeonthegoand update thegoogle-services.jsonCI uses. Without it,process…GoogleServicesfails the build, and the app crashes inAnalyticsManageron first use.com.itsaky.androidideapp that tells users to install the new one. It goes in a separate PR onstage, and is waiting on the wording and on where users get the new app.apt/codeonthego-main, rebuildingtermux-toolsfirst so itssources.listpoints there.Review by commit
9be0a165aspotlessApplyon the 35 files the rename touches that were still identical tostage- formatting only1a0b5adc1f681108969488ecd24SYNC_META_VERSION2 -> 3, so projects carried over from the old app re-sync onceb2ff0485b,d5c84d377apiCheckand doc-path fixes; the namespace flip leaves the API dump unchangedNotes 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 scriptGenerateInitScriptTaskwrites differs only in indentation, andTermuxConstantsis whitespace-only, with its constants in the same order.1a0b5adc1:BuildConfig.PACKAGE_NAMEdrives the application id, every namespace, the Gradle plugin ids and the Maven group. The script moves everything tied to it:R,BuildConfig, data binding, the eventbus indexes and the generated lexers;gradle-plugin's package declarations, the init-script template and theQuickBuildPluginclass-name string;TermuxConstants.TERMUX_PACKAGE_NAME, the data-dir constantsANDROIDIDE_HOME/MAVEN_LOCAL_REPOSITORY, the Shizuku starter, the logsender / quickbuild IDE package, and the/data/datapaths in code, tests and strings.These keep
com.itsaky.androidideon purpose:composite-builds;buildinfotemplate package;android-tree-sitter;gradle-tooling-apiartifact.The offline Maven repos need no republishing:
localMvnRepository.ziphas no artifacts under the app's group, andplugin-maven-repo.zipalready usesorg/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.checkSyncNeededcompared 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 (nokotlin-stdlib, no AndroidX) for code intelligence. The new testa cache synced under the old application id is resyncedfails without the bump.Verification
testV8DebugUnitTestin every module,:plugin-api:testDebugUnitTest, the JVM modules, and:gradle-plugin:test.spotlessCheckand:plugin-api:apiCheckpass.bash,git,python3andjava/javac21 (javac --release 17) run from the new prefix;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.apt installinside the terminal, which needs the new repository published;🤖 Generated with Claude Code