Skip to content

Commit d4d1a1d

Browse files
antonisclaude
andauthored
build(android): Update dependency script to handle sentry-spotlight (#5672)
The update-android.sh script now updates both sentry-android and sentry-spotlight dependencies to the same version. This ensures version synchronization when automated dependency updates run. Since Sentry Android SDK 8.32.0, spotlight was separated into a different module. The script now uses sed to update both dependencies, maintaining backwards compatibility when spotlight is not present. Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent c38ccce commit d4d1a1d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

scripts/update-android.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,13 @@ get-repo)
1818
echo "https://github.com/getsentry/sentry-java.git"
1919
;;
2020
set-version)
21-
newValue="${BASH_REMATCH[1]}$2"
22-
echo "${content/${BASH_REMATCH[0]}/$newValue}" >$file
21+
# Update all io.sentry dependencies to the same version
22+
newContent="$content"
23+
# Update sentry-android
24+
newContent=$(echo "$newContent" | sed -E "s/(io\.sentry:sentry-android:)([0-9\.]+)/\1$2/g")
25+
# Update sentry-spotlight
26+
newContent=$(echo "$newContent" | sed -E "s/(io\.sentry:sentry-spotlight:)([0-9\.]+)/\1$2/g")
27+
echo "$newContent" >$file
2328
;;
2429
*)
2530
echo "Unknown argument $1"

0 commit comments

Comments
 (0)