Skip to content

ADFA-2947 Shorten version d=debug r=release C=codeonthego#990

Open
hal-eisen-adfa wants to merge 2 commits intostagefrom
ADFA-2947-shorten-product-name
Open

ADFA-2947 Shorten version d=debug r=release C=codeonthego#990
hal-eisen-adfa wants to merge 2 commits intostagefrom
ADFA-2947-shorten-product-name

Conversation

@hal-eisen-adfa
Copy link
Collaborator

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 18, 2026

📝 Walkthrough

Release Notes

Changes

  • Shortened product version naming format from CodeOnTheGo-{debug|release}-MMDD-HHMM to C-{d|r}-MMDD-HHMM
    • Product prefix changed from "CodeOnTheGo-" to "C-"
    • Build type indicators shortened to single letters: "d" for debug, "r" for release
    • Date/time components (MMDD-HHMM) remain unchanged

Risks & Best Practice Violations

  • Mutable module-level state: The code uses mutable variables (shouldPrintVersionName, shouldPrintVersionCode) to control logging behavior. This is problematic in parallel Gradle builds and could lead to race conditions or unexpected logging behavior.
  • Locale-dependent version formatting: Version strings depend on Locale.getDefault(), which could produce different versions on different systems/locales. Version identifiers should be deterministic and locale-independent.
  • Non-deterministic time-based versioning: Version names are based on system clock time (minute granularity), meaning identical build configurations produce different version names at different times. This violates reproducible build principles.
  • Fragile build type detection: Build type determination relies on task name string matching (contains("debug"), contains("dev")), which is fragile and susceptible to false positives.

Walkthrough

The version name formatting in ProjectConfig.kt has been simplified, changing the prefix from "CodeOnTheGo-" to "C-" and the build type identifiers from full words ("debug"/"release") to single characters ("d"/"r"), resulting in a more compact version string format.

Changes

Cohort / File(s) Summary
Version name formatting
composite-builds/build-logic/common/src/main/java/com/itsaky/androidide/build/config/ProjectConfig.kt
Reworked simpleVersionName construction with prefix shortened to "C-", build type changed to single character via new buildTypeShort variable, and all formatting references updated accordingly.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

Poem

🐰 A rabbit's note on version codes,
From "CodeOnTheGo" to "C" it strode,
Debug and release, now just "d" and "r",
The format's tighter, like a rabbit's blur,
MMDD-HHMM marches on, sleek and lean! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess relevance to the changeset. Add a description explaining the purpose and impact of shortening the version format to help reviewers understand the rationale.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the main change: shortening the version string format with new abbreviations (d for debug, r for release, C for codeonthego).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ADFA-2947-shorten-product-name

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
composite-builds/build-logic/common/src/main/java/com/itsaky/androidide/build/config/ProjectConfig.kt (1)

54-79: ⚠️ Potential issue | 🟡 Minor

Maven artifact version format is changing; confirm downstream compatibility.

simpleVersionName drives both the app's versionName and publishingVersion, which is used in Maven artifact publishing coordinates (build.gradle.kts:248, MavenPublishConf.kt:84). The format changes from "CodeOnTheGo-debug-MMDD-HHMM" to "C-d-MMDD-HHMM" — a breaking change for artifact resolution if any dependencies reference the old coordinates or if repositories retain old releases.

Verify: (1) whether this Maven version change was intentional, and (2) if external consumers or build artifacts depend on the old version format for artifact downloads or resolution.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@composite-builds/build-logic/common/src/main/java/com/itsaky/androidide/build/config/ProjectConfig.kt`
around lines 54 - 79, The commit changed the Maven artifact version string by
introducing simpleVersion = "C-$buildTypeShort-$formattedDate-$formattedTime",
which will break publishing coordinates used by publishingVersion and consumers;
decide whether this was intentional and either (A) revert simpleVersion to the
previous human-readable pattern (e.g.,
"CodeOnTheGo-$buildType-$formattedDate-$formattedTime") or (B) keep the short
in-app simpleVersion but add a separate publishingVersion that preserves the old
format so publishing (MavenPublishConf.kt and build.gradle.kts publishingVersion
usage) remains backwards-compatible; update ProjectConfig.kt to expose both
simpleVersion (for app versionName) and publishingVersion (for artifact
coordinates) and ensure build.gradle.kts and MavenPublishConf.kt reference
publishingVersion for publishes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In
`@composite-builds/build-logic/common/src/main/java/com/itsaky/androidide/build/config/ProjectConfig.kt`:
- Around line 54-79: The commit changed the Maven artifact version string by
introducing simpleVersion = "C-$buildTypeShort-$formattedDate-$formattedTime",
which will break publishing coordinates used by publishingVersion and consumers;
decide whether this was intentional and either (A) revert simpleVersion to the
previous human-readable pattern (e.g.,
"CodeOnTheGo-$buildType-$formattedDate-$formattedTime") or (B) keep the short
in-app simpleVersion but add a separate publishingVersion that preserves the old
format so publishing (MavenPublishConf.kt and build.gradle.kts publishingVersion
usage) remains backwards-compatible; update ProjectConfig.kt to expose both
simpleVersion (for app versionName) and publishingVersion (for artifact
coordinates) and ensure build.gradle.kts and MavenPublishConf.kt reference
publishingVersion for publishes.

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.

1 participant