Skip to content

Commit 0b22170

Browse files
committed
fix: prefer buildGradlePath from cli instead of path.join
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
1 parent 82111f8 commit 0b22170

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 1.2.0
2+
3+
Made the cli prefer using the `buildGradlePath` from RN cli, this probably doesn't
4+
break any existing project, but for safety I'm doing a minor here.
5+
16
# 1.1.0
27

38
Changed `--version` flag to `--semver` due to issues with react-native

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-cli-bump-version",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"main": "src/index.ts",
55
"types": "lib/index.d.ts",
66
"license": "MIT",

react-native.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module.exports = {
1111
return
1212
}
1313

14-
const appGradlePath = path.join(
14+
const appGradlePath = config.project.android.buildGradlePath || path.join(
1515
config.project.android.sourceDir,
1616
config.project.android.appName,
1717
'build.gradle'

0 commit comments

Comments
 (0)