Skip to content

Commit

Permalink
fix: prefer buildGradlePath from cli instead of path.join
Browse files Browse the repository at this point in the history
Somehow RN cli app name may be undefined, causing exceptions
on the path join call, to mitigate this, I've added a preference
to use the cli's buildGradlePath
  • Loading branch information
Grohden committed Apr 8, 2021
1 parent 82111f8 commit 0b22170
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# 1.2.0

Made the cli prefer using the `buildGradlePath` from RN cli, this probably doesn't
break any existing project, but for safety I'm doing a minor here.

# 1.1.0

Changed `--version` flag to `--semver` due to issues with react-native
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-cli-bump-version",
"version": "1.1.0",
"version": "1.2.0",
"main": "src/index.ts",
"types": "lib/index.d.ts",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion react-native.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
return
}

const appGradlePath = path.join(
const appGradlePath = config.project.android.buildGradlePath || path.join(
config.project.android.sourceDir,
config.project.android.appName,
'build.gradle'
Expand Down

0 comments on commit 0b22170

Please sign in to comment.