Skip to content

Commit

Permalink
cli assemble support
Browse files Browse the repository at this point in the history
Summary:
Call our wrapper to assemble an Android build of helloworld.

Changelog: [Internal]

Differential Revision: D58287785
  • Loading branch information
blakef authored and facebook-github-bot committed Jun 12, 2024
1 parent 5cb9e8f commit 429cf33
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/helloworld/cli.flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
launchApp,
launchSimulator,
} from './lib/ios';
import {app, apple} from '@react-native/core-cli-utils';
import {android, app, apple} from '@react-native/core-cli-utils';
import {Option, program} from 'commander';
import {readFileSync} from 'fs';
import {Listr} from 'listr2';
Expand Down Expand Up @@ -110,6 +110,16 @@ const getBuildSettings = (mode: 'Debug' | 'Release'): BuildSettings => {

const build = program.command('build');

build.command('android').action(async () => {
const {build, assemble} = android({
name: 'app',
cwd: cwd.android,
mode: 'Debug',
sdk: process.env.ANDROID_HOME ?? env.ANDROID_SDK ?? '',
});
await run(assemble());
});

build
.command('ios')
.description('Builds your app for iOS')
Expand Down

0 comments on commit 429cf33

Please sign in to comment.