Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions android/SherpaOnnx/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId "com.k2fsa.sherpa.onnx"
minSdk 21
targetSdk 32
versionCode 1
versionName "1.0"
versionCode 20250817
versionName "1.12.9"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
4 changes: 2 additions & 2 deletions android/SherpaOnnx2Pass/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId "com.k2fsa.sherpa.onnx"
minSdk 21
targetSdk 32
versionCode 1
versionName "1.0"
versionCode 20250817
versionName "1.12.9"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
4 changes: 2 additions & 2 deletions android/SherpaOnnxAudioTagging/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId = "com.k2fsa.sherpa.onnx.audio.tagging"
minSdk = 21
targetSdk = 34
versionCode = 1
versionName = "1.0"
versionCode = 20250817
versionName = "1.12.9"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
4 changes: 2 additions & 2 deletions android/SherpaOnnxAudioTaggingWearOs/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId = "com.k2fsa.sherpa.onnx.audio.tagging.wear.os"
minSdk = 26
targetSdk = 34
versionCode = 1
versionName = "1.0"
versionCode = 20250817
versionName = "1.12.9"
vectorDrawables {
useSupportLibrary = true
}
Expand Down
4 changes: 2 additions & 2 deletions android/SherpaOnnxJavaDemo/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "com.k2fsa.sherpa.onnx"
minSdk 28
targetSdk 34
versionCode 1
versionName "1.0"
versionCode 20250817
versionName "1.12.9"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
4 changes: 2 additions & 2 deletions android/SherpaOnnxKws/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId "com.k2fsa.sherpa.onnx"
minSdk 21
targetSdk 32
versionCode 1
versionName "1.0"
versionCode 20250817
versionName "1.12.9"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
4 changes: 2 additions & 2 deletions android/SherpaOnnxSimulateStreamingAsr/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId = "com.k2fsa.sherpa.onnx.simulate.streaming.asr"
minSdk = 21
targetSdk = 34
versionCode = 1
versionName = "1.0"
versionCode = 20250817
versionName = "1.12.9"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId = "com.k2fsa.sherpa.onnx.simulate.streaming.asr.wear.os"
minSdk = 28
targetSdk = 34
versionCode = 1
versionName = "1.0"
versionCode = 20250817
versionName = "1.12.9"
vectorDrawables {
useSupportLibrary = true
}
Expand Down
4 changes: 2 additions & 2 deletions android/SherpaOnnxSpeakerDiarization/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId = "com.k2fsa.sherpa.onnx.speaker.diarization"
minSdk = 21
targetSdk = 34
versionCode = 1
versionName = "1.0"
versionCode = 20250817
versionName = "1.12.9"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
4 changes: 2 additions & 2 deletions android/SherpaOnnxSpeakerIdentification/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId = "com.k2fsa.sherpa.onnx.speaker.identification"
minSdk = 21
targetSdk = 34
versionCode = 1
versionName = "1.0"
versionCode = 20250817
versionName = "1.12.9"
Comment on lines +14 to +15
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).


testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId = "com.k2fsa.sherpa.onnx.slid"
minSdk = 21
targetSdk = 34
versionCode = 1
versionName = "1.0"
versionCode = 20250817
versionName = "1.12.9"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
4 changes: 2 additions & 2 deletions android/SherpaOnnxTts/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId "com.k2fsa.sherpa.onnx"
minSdk 21
targetSdk 32
versionCode 1
versionName "1.0"
versionCode 20250817
versionName "1.12.9"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
4 changes: 2 additions & 2 deletions android/SherpaOnnxTtsEngine/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId = "com.k2fsa.sherpa.onnx.tts.engine"
minSdk = 21
targetSdk = 34
versionCode = 1
versionName = "1.0"
versionCode = 20250817
versionName = "1.12.9"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
4 changes: 2 additions & 2 deletions android/SherpaOnnxVad/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId "com.k2fsa.sherpa.onnx"
minSdk 21
targetSdk 33
versionCode 1
versionName "1.0"
versionCode 20250817
versionName "1.12.9"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
4 changes: 2 additions & 2 deletions android/SherpaOnnxVadAsr/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId "com.k2fsa.sherpa.onnx"
minSdk 21
targetSdk 33
versionCode 1
versionName "1.0"
versionCode 20250817
versionName "1.12.9"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
4 changes: 2 additions & 2 deletions android/SherpaOnnxWebSocket/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId "com.k2fsa.sherpa.onnx"
minSdk 21
targetSdk 32
versionCode 1
versionName "1.0"
versionCode 20250817
versionName "1.12.9"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
10 changes: 10 additions & 0 deletions new-release.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/usr/bin/env bash

set -ex

old_version_code=20250816
new_version_code=20250817

old_version="1\.12\.8"
new_version="1\.12\.9"
replace_str="s/$old_version/$new_version/g"
Expand All @@ -9,6 +13,12 @@ sed -i.bak "$replace_str" ./sherpa-onnx/csrc/version.cc
sha1=$(git describe --match=NeVeRmAtCh --always --abbrev=8)
date=$(git log -1 --format=%ad --date=local)

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 -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" {} \;

sed -i.bak "s/ static const char \*sha1.*/ static const char \*sha1 = \"$sha1\";/g" ./sherpa-onnx/csrc/version.cc
sed -i.bak "s/ static const char \*date.*/ static const char \*date = \"$date\";/g" ./sherpa-onnx/csrc/version.cc

Expand Down