Commit 428f2be
ref(build): Consolidate sentry-java version into version catalog (#1245)
* ref(build): Consolidate sentry-java version into version catalog
The sentry SDK version was declared twice: once in libs.versions.toml
(7.0.0, used for the plugin's own compile dependency) and once in
gradle.properties as sdk_version (8.43.0, used as BuildConfig.SdkVersion
for auto-installation defaults and telemetry). Consolidate into a single
source of truth in libs.versions.toml and read it via libs.versions.sentry
in build.gradle.kts.
Dependabot (gradle package ecosystem, directory "/") now handles updates
to the sentry version via libs.versions.toml, making the custom
getsentry/github-workflows/updater job and scripts/update-android.sh
redundant.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* ref(build): Consolidate sentry-java version into version catalog
The sentry SDK version was declared twice: once in libs.versions.toml
(7.0.0, used for the plugin's own compile dependency) and once in
gradle.properties as sdk_version (8.43.0, used as BuildConfig.SdkVersion
for auto-installation defaults and telemetry). Consolidate into a single
source of truth in libs.versions.toml and read it via libs.versions.sentry
in build.gradle.kts.
Update scripts/update-android.sh to read/write the version from
libs.versions.toml instead of gradle.properties.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(build): Replace removed sentry-android-okhttp with sentry-okhttp
sentry-android-okhttp was removed in sentry-java 8.0.0 and replaced by
sentry-okhttp, which is a plain java-library (JAR) rather than an AAR.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(build): Fix update-android.sh regex to match full version string
[0-9\.]+ stops at the first non-numeric character, so when the current
version in libs.versions.toml has a prerelease suffix (e.g. 9.0.0-RC1),
set-version only matches the numeric prefix and leaves the suffix in
place, producing corrupt entries like sentry = "9.1.0-RC1".
Switch to [^"]+ so the entire value up to the closing quote is captured
and replaced in one shot.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test(instrumentation): Stub removed sentry-android-okhttp event listener
VisitorTest verifies instrumented bytecode against the real classes on
the test classpath. After bumping sentry to 8.43.0, the test classpath
provides sentry-okhttp instead of sentry-android-okhttp, so
io.sentry.android.okhttp.SentryOkHttpEventListener no longer resolves.
The classloader then generated an empty stub extending Object, which is
not an okhttp3.EventListener subtype, so the eventListener() call in the
legacy useSentryAndroidOkHttp path failed bytecode verification.
Generate a stub for it that extends io.sentry.okhttp.SentryOkHttpEventListener,
mirroring the real inheritance so the verifier accepts the call.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test(build): Drop redundant AAR dependency on sentry-okhttp
sentry-okhttp is a plain JVM library, so pulling it through the
testImplementationAar (.aar -> .jar) configuration is unnecessary; the
testImplementation entry already provides it on the test classpath.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* test(instrumentation): Pin sentry-android-okhttp for legacy okhttp test
Verify the legacy useSentryAndroidOkHttp instrumentation path against the
real io.sentry.android.okhttp.SentryOkHttpEventListener instead of a
hand-written stub. The module was removed from the SDK in 8.0.0, so pin
the test dependency to 7.22.6, its last release. No updater can bump it
since no newer version of the artifact exists.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 616e411 commit 428f2be
4 files changed
Lines changed: 10 additions & 7 deletions
File tree
- gradle
- plugin-build
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| |||
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
54 | | - | |
55 | 58 | | |
| 59 | + | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
62 | 63 | | |
63 | | - | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | | - | |
| 325 | + | |
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
0 commit comments