isInstalled.js 860 B

1234567891011121314151617181920212223242526272829303132333435
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = isInstalled;
  6. function _fs() {
  7. const data = _interopRequireDefault(require("fs"));
  8. _fs = function () {
  9. return data;
  10. };
  11. return data;
  12. }
  13. var _makeBuildPatch = _interopRequireDefault(require("./patches/makeBuildPatch"));
  14. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  15. /**
  16. * Copyright (c) Facebook, Inc. and its affiliates.
  17. *
  18. * This source code is licensed under the MIT license found in the
  19. * LICENSE file in the root directory of this source tree.
  20. *
  21. */
  22. function isInstalled(config, name) {
  23. const buildGradle = _fs().default.readFileSync(config.buildGradlePath, 'utf8');
  24. return (0, _makeBuildPatch.default)(name).installPattern.test(buildGradle);
  25. }
  26. //# sourceMappingURL=isInstalled.js.map