0

Facing issue while build on BitRise.io

I have a React Native Project which builds successfully on local. Using BitRise.io for CI CD. Added App and provided all the essential information and keystore file as well. Followed their getting started guide and everything they'll need is in place.

Tried to build multiple times but getting this error :

Failed to open project, error: no build.gradle or build.gradle.kts file found in (/Users/vagrant/git)
| x | android-build@0 (exit code: 1)

Not sure why they are not able to find build.gradle.

  • Do you think there *is* a `build.gradle` in the root of your repo? Give a [mre]. – jonrsharpe Apr 16 '20 at 14:49
  • Not at the root of the repo. It's inside "android" directory as well as module build gradle inside "android/app". – Mayur Patanvadiya Apr 16 '20 at 14:51
  • Then that explains the error, no? They're looking in the root, which *isn't* where that file is in your repo. Did you let them scan your repo to find the locations of those files? See https://devcenter.bitrise.io/getting-started/getting-started-with-react-native-apps/ – jonrsharpe Apr 16 '20 at 14:52
  • No really, They are not looking inside root folder. As I mentioned in the question, they have asked and I have specified all the required project locations, app location and BitRise knows where to scan.. – Mayur Patanvadiya Apr 16 '20 at 14:55
  • this is a react native project, and in a react native project, we don't have build.gradle at the root of project.. I am following their Getting Started Guide since last 4 days. – Mayur Patanvadiya Apr 16 '20 at 14:57
  • Yes, I am familiar with that layout. When I used Bitrise to scan a React Native project it found and configured those non-root directories. But you haven't shared your project configuration here so there's nothing to go on. – jonrsharpe Apr 16 '20 at 14:58
  • Well what's the content of your `bitrise.yml`, for example? Does that set a directory for the Android project root? – jonrsharpe Apr 16 '20 at 15:04

1 Answers1

3

There was an issue with BitRise App Setup & Configuration while adding React Native App. Although I provided Android Project Path, Module & Variant, It only added in their variables and did not add it to inputs of Build Step, I had to manually add this inside BitRise.Yml to make it work.

- android-build@0.10.0:
     inputs:
        - project_location: "$PROJECT_LOCATION"
        - module: "$MODULE"
        - variant: "$VARIANT"