mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-03 22:48:25 +08:00
Summary: fix ci path problem on Windows pass all current ci. none [GENERAL] [INTERNAL] [CI] - fix ci path problem on Windows Pull Request resolved: https://github.com/facebook/react-native/pull/21203 Differential Revision: D9943608 Pulled By: hramos fbshipit-source-id: 66e3e196a6c0015e0472851abeee32de9fef140c
32 lines
790 B
JavaScript
32 lines
790 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
*/
|
|
|
|
const path = require('path');
|
|
const normalizeProjectName = require('./normalizeProjectName');
|
|
|
|
module.exports = function makeSettingsPatch(
|
|
name,
|
|
androidConfig,
|
|
projectConfig,
|
|
) {
|
|
var projectDir = path.relative(
|
|
path.dirname(projectConfig.settingsGradlePath),
|
|
androidConfig.sourceDir,
|
|
);
|
|
const normalizedProjectName = normalizeProjectName(name);
|
|
|
|
return {
|
|
pattern: '\n',
|
|
patch:
|
|
`include ':${normalizedProjectName}'\n` +
|
|
`project(':${normalizedProjectName}').projectDir = ` +
|
|
`new File(rootProject.projectDir, '${projectDir}')\n`,
|
|
};
|
|
};
|