AppCenter:在 Git 中构建 2 层深的 React-Native 项目

AppCenter: build React-Native project which is 2 levels deep in Git

我正在 AppCenter 中设置 react-native build。

一切都适用于测试项目,但在真实的存储库中我面临以下问题:

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

我的 package.json 有 2 层深 (/folder1/folder2/package.json),所以 build.gradle 位于 5 层深 (/folder1/folder2/android/app/build.gradle)。

因此,当我在 AppCenter 中设置构建时,我能够指定 Project 字段(指向我的 package.json),但是 Build Variant 组合框是空的。

有什么解决办法吗?我可以手动指定 Build Variant 吗?

P.S。如果我只是将项目移动到上面的一个文件夹 - 一切正常。但我不能在我的单一存储库中这样做。

我们目前使用的解决方法:我们创建了一个单独的存储库,嵌套少了 1 级,并且我在每次推送时将我的文件夹复制到另一个存储库(通过 TeamCity)。 因此,具有这样的回购结构:

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

我们设置了 git-hooks 以将 frontend 文件夹复制到另一个存储库:

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

所以我们得到了少一层深的存储库,这对 AppCenter 来说是可以的。