1

I'm setting up react-native build in AppCenter.

Everything works on test projects, but in a real repository I'm facing the following issue:

For best performance, the analysis is currently limited to four directory levels including the root of your repository. (Quote from official docs)

My package.json is 2 levels deep (/folder1/folder2/package.json), so build.gradle is located 5 levels deep (/folder1/folder2/android/app/build.gradle).

So when I set up the build in AppCenter I'm able to specify the Project field (pointing to my package.json), but Build Variant combobox is empty.

Is there any solution for that? Can I specify Build Variant manually?

P.S. If I simply move the project one folder above - everything works fine. But I can't do that in my monorepository.

Shaddix
  • 5,901
  • 8
  • 45
  • 86
  • I am having a very similar issue https://stackoverflow.com/questions/56570961/app-center-shows-no-build-variants-for-react-native-android. Did you get this resolved? – Simon Clough Jul 04 '19 at 13:40
  • 1
    I worked around it. Basically, I created a separate repo with 1-level less nesting, and I'm copying my folder to another repo on each push (via TeamCity). AppCenter is configured against this 'flat' repo. – Shaddix Jul 05 '19 at 02:26

1 Answers1

0

The workaround we are currently using: we created a separate repo with 1-level less nesting, and I'm copying my folder to another repo on each push (via TeamCity). So, having a repo structure like this:

project
│───frontend
│   └───shared
│   └───web
│   └───react-native
│       │   package.json  --> this is the folder we want to build in AppCenter
│       │   ...
│   
└───backend
    └── somefile.cs

We set up git-hooks to copy the frontend folder to another repo:

root
└───shared
└───web
└───react-native
    │   package.json  --> this is the folder we want to build in AppCenter
    │   ...

So we got one level less deep repository which is ok for AppCenter.

Shaddix
  • 5,901
  • 8
  • 45
  • 86