Skip to content

Conversation

@csukuangfj
Copy link
Collaborator

@csukuangfj csukuangfj commented Aug 17, 2025

Summary by CodeRabbit

  • Chores
    • Bumped app version to 1.12.9 with updated build number (20250817) across all Android apps, including Wear OS variants.
    • Updated release tooling to propagate the new version and build number consistently across supported platforms and example projects.
    • No functional, behavior, or dependency changes included in this release.

@csukuangfj csukuangfj requested a review from Copilot August 17, 2025 04:54
@coderabbitai
Copy link

coderabbitai bot commented Aug 17, 2025

Walkthrough

Bumps Android app version metadata across multiple modules to versionCode 20250817 and versionName 1.12.9. Updates new-release.sh to include old/new versionCode variables and to propagate versionName/versionCode and dependency tag updates across the repo.

Changes

Cohort / File(s) Summary of changes
Android apps (Gradle - Groovy)
android/SherpaOnnx/app/build.gradle, android/SherpaOnnx2Pass/app/build.gradle, android/SherpaOnnxJavaDemo/app/build.gradle, android/SherpaOnnxKws/app/build.gradle, android/SherpaOnnxTts/app/build.gradle, android/SherpaOnnxVad/app/build.gradle, android/SherpaOnnxVadAsr/app/build.gradle, android/SherpaOnnxWebSocket/app/build.gradle
defaultConfig: versionCode 1 → 20250817; versionName "1.0" → "1.12.9".
Android apps (Gradle - Kotlin DSL)
android/SherpaOnnxAudioTagging/app/build.gradle.kts, android/SherpaOnnxAudioTaggingWearOs/app/build.gradle.kts, android/SherpaOnnxSimulateStreamingAsr/app/build.gradle.kts, android/SherpaOnnxSimulateStreamingAsrWearOs/app/build.gradle.kts, android/SherpaOnnxSpeakerDiarization/app/build.gradle.kts, android/SherpaOnnxSpeakerIdentification/app/build.gradle.kts, android/SherpaOnnxSpokenLanguageIdentification/app/build.gradle.kts, android/SherpaOnnxTtsEngine/app/build.gradle.kts
android.defaultConfig: versionCode 1 → 20250817; versionName "1.0" → "1.12.9".
Release automation
new-release.sh
Adds old_version_code=20250816 and new_version_code=20250817; updates sed-based bumps for versionName/versionCode and sherpa-onnx dependency tag; cleans up backups.

Sequence Diagram(s)

sequenceDiagram
  participant Dev as Developer
  participant Script as new-release.sh
  participant Repo as Repo Files

  Dev->>Script: Run release script with new version
  Script->>Repo: Update versionName (1.12.9) across Gradle files
  Script->>Repo: Update versionCode (20250817) across Gradle files
  Script->>Repo: Update sherpa-onnx dependency tags
  Script->>Repo: Propagate changes to related files (iOS, Flutter, etc.)
  Script->>Repo: Remove *.bak backups
  Repo-->>Dev: Updated versioned files
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Release v1.12.5 #2368 — Similar repository-wide version bump and release script updates touching the same version constants.

Poem

Thump-thump goes my fluffy heart,
Version hops—a leaping start!
Codes ascend to one-one-two-nine,
Carrots align, the builds are fine.
With paws on scripts, I nudge, I cheer—
New release day, the hare is here! 🥕🐇

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates version information across all Android applications in the sherpa-onnx project to version 1.12.9 with version code 20250817. The changes automate version updates through a release script and apply consistent versioning across all Android app modules.

  • Updates the release script to include Android APK version management
  • Bumps all Android apps from version "1.0" (code 1) to version "1.12.9" (code 20250817)
  • Adds automated find/replace commands for both Gradle and Gradle KTS build files

Reviewed Changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

File Description
new-release.sh Adds version code variables and automated find/replace commands for Android build files
android/*/app/build.gradle Updates versionCode and versionName in Gradle build files
android/*/app/build.gradle.kts Updates versionCode and versionName in Kotlin DSL build files

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

@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.

Actionable comments posted: 1

🧹 Nitpick comments (9)
android/SherpaOnnxSpeakerIdentification/app/build.gradle.kts (1)

14-15: Optional: Centralize versionCode/versionName to avoid drift.

Consider defining versionName/versionCode once (e.g., via gradle.properties or a shared convention plugin) and referencing them here to reduce repo-wide search/replace churn in future releases.

android/SherpaOnnxTts/app/build.gradle (1)

14-15: Optional: Keep versioning DRY across modules.

If feasible, move these values to a shared source (gradle.properties or a version catalog/convention plugin) to minimize future changes.

android/SherpaOnnxWebSocket/app/build.gradle (1)

14-15: Optional: Centralize app version values.

Centralizing versionName/versionCode helps avoid mismatches across modules during releases.

android/SherpaOnnxJavaDemo/app/build.gradle (1)

12-13: Optional: Reference a shared version source.

To reduce maintenance, consider pulling versionCode/versionName from gradle.properties or a convention plugin.

android/SherpaOnnxVadAsr/app/build.gradle (1)

14-15: Optional: De-duplicate version metadata.

Centralize version values to minimize release friction.

android/SherpaOnnx/app/build.gradle (1)

14-15: Approve version bump; consider aligning SDK levels

VersionCode (20250817) and versionName ("1.12.9") are correctly updated. This module’s compileSdk 32 / targetSdk 32 now lags behind most apps, which are on 34. To avoid API mismatch and keep modules consistent, consider updating in android/SherpaOnnx/app/build.gradle:

-    compileSdk 32
+    compileSdk 34

 // …

-        targetSdk 32
+        targetSdk 34

Feel free to address this in a follow-up if it’s out of scope for this PR.

android/SherpaOnnx2Pass/app/build.gradle (1)

14-15: LGTM on metadata bump; optional follow-up to update SDK levels.

versionCode/versionName are correctly set. This module also targets/compiles 32; if consistent with the app matrix that’s fine, but consider updating to 34 to match other modules when convenient.

new-release.sh (2)

5-7: Failure auto-detecting old_version_code—please adjust the grep path/pattern

I ran the proposed verification script and saw that no versionCode was found under android/, so old_version_code is always empty. It looks like your Gradle files live in android/app; you’ll need to point the extraction at the correct file and use a more precise pattern.

Suggested update in new-release.sh (lines 5–7):

- old_version_code="$(grep -Rho 'versionCode[[:space:]]*=?[[:space:]]*[0-9]\+' android | awk '{print $NF}' | sort -nr | head -n1)"
+ # Extract the highest versionCode from the Android app’s Gradle file
+ old_version_code="$(grep -RPo '(?<=versionCode\s)\d+' android/app/build.gradle | sort -nr | head -n1 || true)"

You can keep the rest of the safety checks as-is.


16-21: Make sed patterns resilient to whitespace/quote variations (optional)

We ran a scan and confirmed there are no remaining hard-coded versionName/versionCode instances or stale sherpa-onnx tags in your Gradle files. To future-proof against formatting drift (extra spaces, single vs. double quotes, etc.), you can opt-in to the following more tolerant regex:

-find android -name "build.gradle" -type f -exec sed -i.bak "s/versionName \"$old_version\"/versionName \"$new_version\"/g" {} \;
-find android -name "build.gradle.kts" -type f -exec sed -i.bak "s/versionName = \"$old_version\"/versionName = \"$new_version\"/g" {} \;
+find android -name "build.gradle" -type f -exec sed -E -i.bak "s/versionName[[:space:]]+['\"]$old_version['\"]/versionName \"$new_version\"/g" {} \;
+find android -name "build.gradle.kts" -type f -exec sed -E -i.bak "s/versionName[[:space:]]*=[[:space:]]*\"$old_version\"/versionName = \"$new_version\"/g" {} \;

-find android -name "build.gradle" -type f -exec sed -i.bak "s/versionCode $old_version_code/versionCode $new_version_code/g" {} \;
-find android -name "build.gradle.kts" -type f -exec sed -i.bak "s/versionCode = $old_version_code/versionCode = $new_version_code/g" {} \;
+find android -name "build.gradle" -type f -exec sed -E -i.bak "s/versionCode[[:space:]]+$old_version_code/versionCode $new_version_code/g" {} \;
+find android -name "build.gradle.kts" -type f -exec sed -E -i.bak "s/versionCode[[:space:]]*=[[:space:]]*$old_version_code/versionCode = $new_version_code/g" {} \;

This is purely an optional refactor to reduce future maintenance if formatting changes.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ad8300a and baa2e0e.

📒 Files selected for processing (17)
  • android/SherpaOnnx/app/build.gradle (1 hunks)
  • android/SherpaOnnx2Pass/app/build.gradle (1 hunks)
  • android/SherpaOnnxAudioTagging/app/build.gradle.kts (1 hunks)
  • android/SherpaOnnxAudioTaggingWearOs/app/build.gradle.kts (1 hunks)
  • android/SherpaOnnxJavaDemo/app/build.gradle (1 hunks)
  • android/SherpaOnnxKws/app/build.gradle (1 hunks)
  • android/SherpaOnnxSimulateStreamingAsr/app/build.gradle.kts (1 hunks)
  • android/SherpaOnnxSimulateStreamingAsrWearOs/app/build.gradle.kts (1 hunks)
  • android/SherpaOnnxSpeakerDiarization/app/build.gradle.kts (1 hunks)
  • android/SherpaOnnxSpeakerIdentification/app/build.gradle.kts (1 hunks)
  • android/SherpaOnnxSpokenLanguageIdentification/app/build.gradle.kts (1 hunks)
  • android/SherpaOnnxTts/app/build.gradle (1 hunks)
  • android/SherpaOnnxTtsEngine/app/build.gradle.kts (1 hunks)
  • android/SherpaOnnxVad/app/build.gradle (1 hunks)
  • android/SherpaOnnxVadAsr/app/build.gradle (1 hunks)
  • android/SherpaOnnxWebSocket/app/build.gradle (1 hunks)
  • new-release.sh (2 hunks)
🔇 Additional comments (14)
android/SherpaOnnxSpeakerIdentification/app/build.gradle.kts (1)

14-15: LGTM: Version bump to code 20250817 and name 1.12.9 is correct.

Values look consistent and within the 32-bit int range for versionCode. No other concerns in this block.

android/SherpaOnnxTts/app/build.gradle (1)

14-15: LGTM: Version metadata updated as intended.

versionCode 20250817 and versionName 1.12.9 align with the release.

android/SherpaOnnxWebSocket/app/build.gradle (1)

14-15: LGTM: Correct version bump applied.

Matches the repo-wide target versions. No issues spotted.

android/SherpaOnnxJavaDemo/app/build.gradle (1)

12-13: LGTM: Version update is consistent.

Also noting dependency line already references sherpa-onnx v1.12.9, which is consistent with the app version.

android/SherpaOnnxVadAsr/app/build.gradle (1)

14-15: LGTM: Version bump matches the release target.

No additional concerns in this block.

android/SherpaOnnxTtsEngine/app/build.gradle.kts (1)

14-15: LGTM: versionCode/versionName updated consistently.

No functional changes; values match the repo-wide release. No further action needed here.

android/SherpaOnnxSimulateStreamingAsr/app/build.gradle.kts (1)

14-15: LGTM: metadata bump is correct and consistent with other modules.

Nothing else to flag.

android/SherpaOnnxAudioTagging/app/build.gradle.kts (1)

14-15: LGTM: version updates are correct.

Matches the target 20250817 / 1.12.9 values used across the repo.

android/SherpaOnnxSpeakerDiarization/app/build.gradle.kts (1)

14-15: Approve: Version bump is consistent across the repo

All versionCode and versionName entries in Android build files match 20250817 / "1.12.9", and there are no stale sherpa-onnx:v tags. Ready to merge.

android/SherpaOnnxAudioTaggingWearOs/app/build.gradle.kts (1)

14-15: LGTM: Version bump confirmed across all modules

I ran a consistency check across all Gradle Kotlin DSL files for versionCode = 20250817 and versionName = "1.12.9". Every module—including android/SherpaOnnxAudioTaggingWearOs/app/build.gradle.kts—matches this release cadence with no outliers detected.

android/SherpaOnnxKws/app/build.gradle (1)

14-15: LGTM: Correct metadata update.

No behavioral changes; version bump aligns with the release.

If this appId has been published before, ensure 20250817 > last Play Console versionCode for "com.k2fsa.sherpa.onnx" to maintain monotonicity. The provided repo-wide verification script will check local consistency; Play monotonicity must be checked in your release pipeline.

android/SherpaOnnxVad/app/build.gradle (1)

14-15: LGTM: Version bump applied as intended.

Consistent with other Android modules in this release.

Reminder: verify Play Console monotonicity for this applicationId as part of the release checklist.

android/SherpaOnnxSpokenLanguageIdentification/app/build.gradle.kts (1)

14-15: LGTM: Version fields updated to 20250817 / 1.12.9.

Change is metadata-only and safe.

Run the repo-wide verification script from the first comment to ensure no stragglers remain for versionCode/versionName or sherpa-onnx tag references.

android/SherpaOnnxSimulateStreamingAsrWearOs/app/build.gradle.kts (1)

14-15: Version bump approved and consistent
Confirmed that versionCode = 20250817 and versionName = "1.12.9" in
• android/SherpaOnnxSimulateStreamingAsrWearOs/app/build.gradle.kts (lines 14–15)
and no stale references to the previous versions remain across the codebase.

Comment on lines +14 to +15
versionCode = 20250817
versionName = "1.12.9"
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Quick repo-wide verification script for version sync.

If helpful, run this to confirm all Android modules are on versionCode 20250817 and versionName 1.12.9, and that dependencies point to v1.12.9.


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Scanning Gradle files under android/…"
mapfile -t FILES < <(fd -a -g 'build.gradle*' android)

echo "Checking versionCode=20250817 and versionName=1.12.9"
missing_code=()
missing_name=()
for f in "${FILES[@]}"; do
  rg -nP 'versionCode\s*(=)?\s*20250817\b' "$f" >/dev/null || missing_code+=("$f")
  rg -nP 'versionName\s*(=)?\s*"1\.12\.9"' "$f" >/dev/null || missing_name+=("$f")
done

if (( ${#missing_code[@]} )); then
  echo "Files missing versionCode 20250817:"
  printf ' - %s\n' "${missing_code[@]}"
else
  echo "All checked Gradle files contain versionCode 20250817 (or are not app modules)."
fi

if (( ${#missing_name[@]} )); then
  echo "Files missing versionName 1.12.9:"
  printf ' - %s\n' "${missing_name[@]}"
else
  echo "All checked Gradle files contain versionName 1.12.9 (or are not app modules)."
fi

echo "Scanning for sherpa-onnx dependency versions:"
rg -nP "sherpa-onnx:v(\d+\.\d+\.\d+)" -C0

echo "Any non-1.12.9 versions above should be reviewed."

Length of output: 268


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "Finding build.gradle and build.gradle.kts files under android/…"
find android -type f \( -name 'build.gradle' -o -name 'build.gradle.kts' \) | while IFS= read -r f; do
  echo "Checking file: $f"
  if grep -qP 'versionCode\s*=\s*20250817\b' "$f"; then
    echo "  versionCode OK"
  else
    echo "  ⚠️ MISSING or mismatched versionCode"
  fi
  if grep -qP 'versionName\s*=\s*\"1\.12\.9\"' "$f"; then
    echo "  versionName OK"
  else
    echo "  ⚠️ MISSING or mismatched versionName"
  fi
done

echo
echo "Scanning for sherpa-onnx dependency versions:"
grep -R -nP 'sherpa-onnx:.*?(\d+\.\d+\.\d+)' android || true

Length of output: 17238


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "Identifying Android application modules (com.android.application)..."
mapfile -t APP_FILES < <(grep -R -lP 'com\.android\.application' -n android | cut -d: -f1)

if (( ${#APP_FILES[@]} == 0 )); then
  echo "⚠️ No application modules found. Please verify plugin usage."
  exit 1
fi

echo "Checking versionCode=20250817 and versionName=\"1.12.9\" in these files:"
for f in "${APP_FILES[@]}"; do
  echo " - $f"
  if grep -qP 'versionCode\s*=\s*20250817\b' "$f"; then
    echo "    ✔ versionCode"
  else
    echo "    ⚠️ Missing or mismatched versionCode"
  fi
  if grep -qP 'versionName\s*=\s*\"1\.12\.9\"' "$f"; then
    echo "    ✔ versionName"
  else
    echo "    ⚠️ Missing or mismatched versionName"
  fi
done

echo
echo "Scanning for sherpa-onnx dependency versions not equal to v1.12.9:"
grep -R -nP 'sherpa-onnx:v(?!1\.12\.9)\d+\.\d+\.\d+' android || echo "✔ All sherpa-onnx dependencies are v1.12.9"

Length of output: 367


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

echo "Modules applying the Android application plugin (com.android.application):"
rg -nP 'id\s+["'\'']com\.android\.application["'\'']' -t gradle -t kotlin android

Length of output: 1664


Sync versionCode & versionName across all Groovy-DSL app modules

Our checks confirm that every Kotlin-DSL (*.kts) app module already uses

versionCode = 20250817
versionName = "1.12.9"

but the following Groovy-DSL app/build.gradle files still need to be updated:

• android/SherpaOnnx/app/build.gradle
• android/SherpaOnnx2Pass/app/build.gradle
• android/SherpaOnnxJavaDemo/app/build.gradle
• android/SherpaOnnxKws/app/build.gradle
• android/SherpaOnnxVad/app/build.gradle
• android/SherpaOnnxVadAsr/app/build.gradle
• android/SherpaOnnxTts/app/build.gradle
• android/SherpaOnnxWebSocket/app/build.gradle

Please add or update in each:

versionCode 20250817
versionName "1.12.9"

Dependencies on com.github.k2-fsa:sherpa-onnx:v1.12.9 are already consistent.

🤖 Prompt for AI Agents
In android/SherpaOnnxSpeakerIdentification/app/build.gradle.kts around lines
14-15, ensure the Groovy-DSL app modules listed in the review are updated to
match the Kotlin-DSL values: open each Groovy build file
(android/SherpaOnnx/app/build.gradle, android/SherpaOnnx2Pass/app/build.gradle,
android/SherpaOnnxJavaDemo/app/build.gradle,
android/SherpaOnnxKws/app/build.gradle, android/SherpaOnnxVad/app/build.gradle,
android/SherpaOnnxVadAsr/app/build.gradle,
android/SherpaOnnxTts/app/build.gradle,
android/SherpaOnnxWebSocket/app/build.gradle) and add or update the Android
defaultConfig entries so they contain versionCode 20250817 and versionName
"1.12.9" (place them under defaultConfig if not present, or replace existing
values).

@csukuangfj csukuangfj merged commit 896afa7 into k2-fsa:master Aug 17, 2025
1 check passed
@csukuangfj csukuangfj deleted the fix-android-version branch August 17, 2025 05:10
@coderabbitai coderabbitai bot mentioned this pull request Aug 25, 2025
@coderabbitai coderabbitai bot mentioned this pull request Sep 1, 2025
@coderabbitai coderabbitai bot mentioned this pull request Sep 18, 2025
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