-
Notifications
You must be signed in to change notification settings - Fork 31
feat: brownfield unified CLI #176
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
Merged
Changes from 28 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
72d2d96
chore: squashed rework of repo
artus9033 d8b1dfe
ci: consolidate per-platform jobs to reduce cache entry count
artus9033 000e9ef
feat: brownfield CLI
artus9033 2b833a1
chore: add missing dependencies
artus9033 0d3ab19
chore: add build:watch script
artus9033 9032ffa
feat: android CLI
artus9033 7a6764e
feat: iOS CLI
artus9033 71a2aa8
ci: update CI to use the new iOS CLI
artus9033 ece6f68
chore: update Podfile for RNApp
artus9033 d39ddea
chore: move CLI files to new package
artus9033 cd85740
chore: config files for new packages
artus9033 c7a723e
chore: react-native-brownfield package to depend on the CLI
artus9033 174b585
chore: update CONTRIBUTING.md
artus9033 1365628
fix: problems with imports and scripts
artus9033 c7733f3
docs: add CLI docs
artus9033 23f3cb9
Merge branch 'main' into feat/cli
artus9033 0081a93
ci: adjust paths to CLI
artus9033 a5750e1
fix: iOS build error from brownie PR
artus9033 c53583a
fix: linting
artus9033 6eae08c
feat: unified CLI
artus9033 22cca6a
ci: use brownie CLI in CI
artus9033 3513646
feat: adjust to new Rock API
artus9033 fbb2a2e
docs: add CLI documentation
artus9033 80ccb79
fix: make Rock iOS packaging logic work in non-Rock projects
artus9033 ee88f55
chore: depend on production rock packages
artus9033 7f96502
fix: brownie CLI iOS - pass packageDir to Rock helpers and use .brown…
artus9033 a9ff914
Merge branch 'main' into feat/cli
artus9033 7d8f023
chore: bump up Rock to 0.12.5
artus9033 9126bb0
chore: rename build:watch scripts to dev
artus9033 54286cd
WIP
artus9033 c911168
feat: migrate to vitest
okwasniewski eb668db
refactor: changes after CR
artus9033 fde8697
fix: problems after migration to vitest
artus9033 b1579b2
refactor: rename brownie CLI to brownfield to resolve ambiguity
artus9033 ad826da
refactor: changes after CR
artus9033 a387b3c
Merge branch 'main' into feat/cli
artus9033 b988d86
fix(docs): typo & dead link
artus9033 1bfaf2a
feat: new package name for brownfield CLI
artus9033 d7393de
fix: retrieve proper RN version for iOS build
artus9033 d901d48
docs: improve CLI docs
artus9033 854c135
chore: add verbose logging to RNApp package scripts
artus9033 1677268
chore: target iOS 15.6 in RNApp to match CI environment
artus9033 1791b7f
chore: depend on CLI package in brownie
artus9033 7ab29e2
Merge branch 'main' into feat/cli
artus9033 635b973
fix(ci): typo in step name
artus9033 26af12f
fix(ci): workaround for ENOSPC and leftover character in iOS command
artus9033 0c5b60a
docs: updated docs
artus9033 2babf1e
feat: rename CLI output directory to .brownfield
artus9033 8afb513
fix(demo): use new path to iOS artifacts
artus9033 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "root": true, | ||
| "extends": ["@react-native", "prettier"], | ||
| "extends": ["prettier"], | ||
| "plugins": ["prettier"], | ||
| "ignorePatterns": ["node_modules/", "lib/"] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,3 +79,6 @@ lib/ | |
|
|
||
| # Gradle | ||
| secring.gpg | ||
|
|
||
| # Typescript | ||
| **/*.tsbuildinfo | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,3 @@ | ||
| node_modules | ||
| lib | ||
| dist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "extends": ["@react-native", "prettier"], | ||
| "plugins": ["prettier"], | ||
| "ignorePatterns": ["node_modules/", "lib/"] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| out | ||
| .brownie |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ["introduction", "brownfield", "brownie"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| # Usage with Brownfield package | ||
|
|
||
| The `brownie` CLI provides utilities for building & packaging artifacts for brownfield projects that use the `@callstack/react-native-brownfield` library. | ||
|
|
||
| ## Usage | ||
|
|
||
| ```bash | ||
| brownie package:android --module-name :BrownfieldLib --variant release # Package AAR with BrownfieldLib module in release variant | ||
| brownie publish:android --module-name :BrownfieldLib # Publish all build variants of BrownfieldLib module to Maven local | ||
| brownie package:ios --scheme BrownfieldLib --configuration Release # Package XCFramework for BrownfieldLib scheme in Release configuration | ||
| brownie codegen --help # Show help | ||
| brownie --version # Show version | ||
| ``` | ||
|
|
||
| ## iOS | ||
|
|
||
| ### Build for iOS | ||
|
|
||
| Simply run `npx brownie package:ios` to create an XCFramework that you can later integrate into your native iOS app according to other instruction sections below. | ||
|
|
||
| Available arguments: | ||
|
|
||
| | Argument | Description | | ||
| | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | --verbose | Enable verbose logging | | ||
| | --configuration | Explicitly set the scheme configuration to use. This option is case sensitive. | | ||
| | --scheme | Explicitly set Xcode scheme to use | | ||
| | --target | Explicitly set Xcode target to use | | ||
| | --extra-params | Custom params that will be passed to xcodebuild command | | ||
| | --export-extra-params | Custom params that will be passed to xcodebuild export archive command. Example: `--export-extra-params "-allowProvisioningUpdates"` | | ||
| | --export-options-plist | Name of the export options file for archiving. Defaults to: `ExportOptions.plist` | | ||
| | --build-folder | Location for iOS build artifacts. Corresponds to Xcode's "-derivedDataPath". By default, the '\<iOS project folder>/build' path will be used. | | ||
| | --destination | Define destination(s) for the build. You can pass multiple destinations as separate values or repeated use of the flag. Values: "simulator", "device", or xcodebuild destinations | | ||
| | --archive | Create an Xcode archive (IPA) of the build, required for uploading to App Store Connect or distributing to TestFlight | | ||
| | --no-install-pods | Skip automatic CocoaPods installation | | ||
| | --no-new-arch | Run React Native in legacy async architecture | | ||
| | --local | Force local build with xcodebuild | | ||
| | --verbose | Enable verbose logging | | ||
|
|
||
| ## Android | ||
|
|
||
| For Android, building happens in two steps: first, you build (`brownie package:android`) the AAR artifact(s) with your module, in the appropriate build variant(s), and then you `brownie publish:android` them to Maven local. | ||
| From there, native applications can consume your library from the local Maven repository. | ||
|
|
||
| ### Build for Android | ||
|
|
||
| To build the artifact for Android without publishing, run `npx brownie package:android --module-name app`. | ||
|
|
||
| Available arguments: | ||
|
|
||
| | Argument | Description | | ||
| | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | --variant | Specify your app's build variant, which is constructed from build type and product flavor, e.g. 'debug' or 'freeRelease'. (default: "debug") | | ||
| | --module-name | AAR module name | | ||
| | --verbose | Enable verbose logging | | ||
|
|
||
| ### Publish locally for Android | ||
|
|
||
| To publish the `.aar`(s) built beforehand with `npx brownie publish:android` to Maven local, which will allow Gradle to be able to load it from Maven local repository, run: | ||
|
|
||
| `npx brownie publish:android --module-name app` | ||
|
|
||
| | Argument | Description | | ||
| | ------------- | ---------------------- | | ||
| | --module-name | AAR module name | | ||
| | --verbose | Enable verbose logging | |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.