@@ -2,7 +2,10 @@ import { withAppBuildGradle, withProjectBuildGradle } from '@expo/config-plugins
22
33import { warnOnce } from '../../plugin/src/utils' ;
44import type { SentryAndroidGradlePluginOptions } from '../../plugin/src/withSentryAndroidGradlePlugin' ;
5- import { withSentryAndroidGradlePlugin } from '../../plugin/src/withSentryAndroidGradlePlugin' ;
5+ import {
6+ sentryAndroidGradlePluginVersion ,
7+ withSentryAndroidGradlePlugin ,
8+ } from '../../plugin/src/withSentryAndroidGradlePlugin' ;
69
710jest . mock ( '@expo/config-plugins' , ( ) => ( {
811 withProjectBuildGradle : jest . fn ( ) ,
@@ -43,7 +46,6 @@ describe('withSentryAndroidGradlePlugin', () => {
4346 } ) ;
4447
4548 it ( 'adds the Sentry plugin to build.gradle when enableAndroidGradlePlugin is enabled' , ( ) => {
46- const version = '4.14.1' ;
4749 const options : SentryAndroidGradlePluginOptions = { enableAndroidGradlePlugin : true } ;
4850
4951 ( withProjectBuildGradle as jest . Mock ) . mockImplementation ( ( config , callback ) => {
@@ -65,13 +67,12 @@ describe('withSentryAndroidGradlePlugin', () => {
6567 } ) ;
6668
6769 expect ( modifiedGradle . modResults . contents ) . toContain (
68- `classpath("io.sentry:sentry-android-gradle-plugin:${ version } ")` ,
70+ `classpath("io.sentry:sentry-android-gradle-plugin:${ sentryAndroidGradlePluginVersion } ")` ,
6971 ) ;
7072 } ) ;
7173
7274 it ( 'warnOnce if the Sentry plugin is already included in build.gradle' , ( ) => {
73- const version = '4.14.1' ;
74- const includedBuildGradle = `dependencies { classpath("io.sentry:sentry-android-gradle-plugin:${ version } ")}` ;
75+ const includedBuildGradle = `dependencies { classpath("io.sentry:sentry-android-gradle-plugin:${ sentryAndroidGradlePluginVersion } ")}` ;
7576 const options : SentryAndroidGradlePluginOptions = { enableAndroidGradlePlugin : true } ;
7677
7778 ( withProjectBuildGradle as jest . Mock ) . mockImplementation ( ( config , callback ) => {
0 commit comments