Skip to content

Commit 9db4dbc

Browse files
jamesnroktclaude
andcommitted
fix: bound android kit upper version in expo config plugin
The plugin emitted `implementation "com.mparticle:${kit}:+"` for each androidKit. The unbounded `+` resolves to the newest version on Maven Central (currently a 6.0.0-rc.1 pre-release), which transitively requires `com.mparticle:android-core:6.0.0-rc.1` and overrides the bridge's `[5.79.0, 6.0)` range on the app's runtime classpath. The bridge AAR is compiled against the 5.x API surface, so several referenced classes (e.g. `com.mparticle.rokt.RoktEmbeddedView`, `com.mparticle.UserAttributeListener`, `com.mparticle.MpRoktEventCallback`) are absent at runtime and the app crashes at launch with NoClassDefFoundError. Bound the kit dependency to the same `[5.79.0, 6.0)` range used for the core SDK in android/build.gradle so the pair stays in lockstep on the 5.x line. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent cd3494d commit 9db4dbc

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

plugin/src/withMParticleAndroid.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,12 @@ const withMParticleAppBuildGradle: ConfigPlugin<MParticlePluginProps> = (
364364
}
365365

366366
// Generate kit dependency lines
367-
// Use + for version to auto-match core SDK version
367+
// Bounded range matches the core SDK range in android/build.gradle so the
368+
// kit and core stay paired on a 5.x line. An unbounded `+` would resolve
369+
// to a pre-release (e.g. 6.0.0-rc.1) and transitively drag the core past
370+
// the bridge's compiled-against API surface.
368371
const kitDependencies = props.androidKits
369-
.map(kit => ` implementation "com.mparticle:${kit}:+"`)
372+
.map(kit => ` implementation "com.mparticle:${kit}:[5.79.0, 6.0)"`)
370373
.join('\n');
371374

372375
// Use mergeContents for idempotent injection

0 commit comments

Comments
 (0)