diff --git a/packages/cli-platform-android/README.md b/packages/cli-platform-android/README.md index d2b324b44..2145e6073 100644 --- a/packages/cli-platform-android/README.md +++ b/packages/cli-platform-android/README.md @@ -28,14 +28,6 @@ Builds your app and starts it on a connected Android emulator or device. Override the root directory for the Android build (which contains the android directory)'. -#### `--variant ` - -> **DEPRECATED** – use "mode" instead - -> default: 'debug' - -Specify your app's build variant. - #### `--appFolder ` > **DEPRECATED** – use "project.android.appName" in react-native.config.js @@ -129,6 +121,7 @@ Installs passed binary instead of building a fresh one. This command is not comp #### `--user` Id of the User Profile you want to install the app on. + ### `log-android` Usage: diff --git a/packages/cli-platform-android/src/commands/buildAndroid/index.ts b/packages/cli-platform-android/src/commands/buildAndroid/index.ts index 1e818bc61..1b7b6101b 100644 --- a/packages/cli-platform-android/src/commands/buildAndroid/index.ts +++ b/packages/cli-platform-android/src/commands/buildAndroid/index.ts @@ -16,7 +16,6 @@ import {promptForTaskSelection} from '../runAndroid/listAndroidTasks'; export interface BuildFlags { mode?: string; - variant?: string; activeArchOnly?: boolean; packager?: boolean; port: number; @@ -63,12 +62,6 @@ async function buildAndroid( ) { const androidProject = getAndroidProject(config); - if (args.variant) { - logger.warn( - '"variant" flag is deprecated and will be removed in future release. Please switch to "mode" flag.', - ); - } - if (args.tasks && args.mode) { logger.warn( 'Both "tasks" and "mode" parameters were passed to "build" command. Using "tasks" for building the app.', @@ -89,7 +82,7 @@ async function buildAndroid( let gradleArgs = getTaskNames( androidProject.appName, - args.mode || args.variant, + args.mode, tasks, 'bundle', androidProject.sourceDir, @@ -111,7 +104,7 @@ async function buildAndroid( ); if (architectures.length > 0) { logger.info(`Detected architectures ${architectures.join(', ')}`); - // `reactNativeDebugArchitectures` was renamed to `reactNativeArchitectures` in 0.68. + // `reactNativeDebugArchitectures` was renamed to `reactNativeArchitectures` in 0.68. // Can be removed when 0.67 no longer needs to be supported. gradleArgs.push( '-PreactNativeDebugArchitectures=' + architectures.join(','), @@ -144,11 +137,6 @@ export const options = [ name: '--mode ', description: "Specify your app's build variant", }, - { - name: '--variant ', - description: - "Specify your app's build variant. Deprecated! Use 'mode' instead", - }, { name: '--no-packager', description: 'Do not launch packager while building', diff --git a/packages/cli-platform-android/src/commands/runAndroid/index.ts b/packages/cli-platform-android/src/commands/runAndroid/index.ts index a269cb555..2299f5b2e 100644 --- a/packages/cli-platform-android/src/commands/runAndroid/index.ts +++ b/packages/cli-platform-android/src/commands/runAndroid/index.ts @@ -188,7 +188,7 @@ function runOnSpecificDevice( if (devices.indexOf(deviceId) !== -1) { let gradleArgs = getTaskNames( androidProject.appName, - args.mode || args.variant, + args.mode, args.tasks ?? buildTask, 'install', androidProject.sourceDir, diff --git a/packages/cli-platform-android/src/commands/runAndroid/runOnAllDevices.ts b/packages/cli-platform-android/src/commands/runAndroid/runOnAllDevices.ts index d223197bf..2f568fc75 100644 --- a/packages/cli-platform-android/src/commands/runAndroid/runOnAllDevices.ts +++ b/packages/cli-platform-android/src/commands/runAndroid/runOnAllDevices.ts @@ -47,17 +47,12 @@ async function runOnAllDevices( ); } } - if (args.variant) { - logger.warn( - '"variant" flag is deprecated and will be removed in future release. Please switch to "mode" flag.', - ); - } try { if (!args.binaryPath) { let gradleArgs = getTaskNames( androidProject.appName, - args.mode || args.variant, + args.mode, args.tasks, 'install', androidProject.sourceDir,