Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PLAT-13442] Remove BAGP from the React Native CLI #2346

Merged
merged 11 commits into from
Feb 24, 2025
8 changes: 6 additions & 2 deletions .buildkite/full/react-native-cli-pipeline.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ steps:
- "bundle install"
- "bundle exec maze-runner features/build-app-tests/build-android-app.feature"
matrix:
- "0.74"
- "0.77"
- "0.76"
- "0.75"
retry:
automatic:
- exit_status: "*"
Expand Down Expand Up @@ -88,7 +90,9 @@ steps:
concurrency_group: "browserstack-app"
concurrency_method: eager
matrix:
- "0.74"
- "0.77"
- "0.76"
- "0.75"

- label: ":browserstack: :mac: RN CLI - {{matrix}} iOS end-to-end tests"
depends_on: "build-react-native-cli-ios-fixture"
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ This release adds support for React Native 0.77 to `@bugsnag/react-native`
- (plugin-angular) Added a null check so BugsnagErrorHandler fails silently when misconfigured [#2295](https://github.com/bugsnag/bugsnag-js/pull/2295)
- (react-native) Fix no such module error when importing Bugsnag from Swift [#2335](https://github.com/bugsnag/bugsnag-js/pull/2335)

### Changed

- (react-native-cli) Remove the installation of the BugSnag Android Gradle Plugin [#2346](https://github.com/bugsnag/bugsnag-js/pull/2346)

## [8.2.0] - 2025-01-27

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import logger from '../Logger'
import { updateXcodeProject } from '../lib/Xcode'
import { install, detectInstalledVersion, detectInstalled, guessPackageManager } from '../lib/Npm'
import onCancel from '../lib/OnCancel'
import { checkReactNativeMappings, addUploadEndpoint, addBuildEndpoint } from '../lib/Gradle'
import { UrlType, OnPremiseUrls } from '../lib/OnPremise'
import detectIndent from 'detect-indent'
import semver from 'semver'
Expand Down Expand Up @@ -101,16 +100,6 @@ export default async function run (projectRoot: string, urls: OnPremiseUrls): Pr
}

async function installBugsnagCliPackage (projectRoot: string, urls: OnPremiseUrls): Promise<void> {
await checkReactNativeMappings(projectRoot, logger)

if (urls[UrlType.BUILD]) {
await addBuildEndpoint(projectRoot, urls[UrlType.BUILD] as string, logger)
}

if (urls[UrlType.UPLOAD]) {
await addUploadEndpoint(projectRoot, urls[UrlType.UPLOAD] as string, logger)
}

const alreadyInstalled = await detectInstalled('@bugsnag/cli', projectRoot)

if (alreadyInstalled) {
Expand Down
18 changes: 0 additions & 18 deletions packages/react-native-cli/src/commands/InstallCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ import logger from '../Logger'
import { install as npmInstall, detectInstalled, guessPackageManager } from '../lib/Npm'
import { install as podInstall } from '../lib/Pod'
import onCancel from '../lib/OnCancel'
import { getSuggestedBugsnagGradleVersion, modifyRootBuildGradle, modifyAppBuildGradle } from '../lib/Gradle'

export default async function run (argv: string[], projectRoot: string, opts: Record<string, unknown>): Promise<boolean> {
try {
await installJavaScriptPackage(projectRoot)
await addGradlePluginDependency(projectRoot)

logger.info('Installing CocoaPods')
await podInstall(projectRoot, logger)
Expand Down Expand Up @@ -40,19 +38,3 @@ async function installJavaScriptPackage (projectRoot: string): Promise<void> {

await npmInstall(packageManager, '@bugsnag/react-native', version, false, projectRoot)
}

async function addGradlePluginDependency (projectRoot: string): Promise<void> {
logger.info('Adding the Bugsnag Android Gradle Plugin')

const suggestedPluginVersion = await getSuggestedBugsnagGradleVersion(projectRoot, logger)

const { gradlePluginVersion } = await prompts({
type: 'text',
name: 'gradlePluginVersion',
message: 'Enter version of the Bugsnag Android Gradle plugin you want to use',
initial: suggestedPluginVersion
}, { onCancel })

await modifyRootBuildGradle(projectRoot, gradlePluginVersion, logger)
await modifyAppBuildGradle(projectRoot, logger)
}
283 changes: 0 additions & 283 deletions packages/react-native-cli/src/lib/Gradle.ts

This file was deleted.

Loading