@sentry/react-native 4.10.0 → 4.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/android/build.gradle +1 -1
- package/dist/js/tools/ModulesCollector.d.ts +10 -1
- package/dist/js/tools/ModulesCollector.d.ts.map +1 -1
- package/dist/js/tools/ModulesCollector.js +50 -1
- package/dist/js/tools/ModulesCollector.js.map +1 -1
- package/dist/js/tools/collectModules.js +6 -27
- package/dist/js/tools/collectModules.js.map +1 -1
- package/dist/js/version.d.ts +1 -1
- package/dist/js/version.js +1 -1
- package/dist/js/version.js.map +1 -1
- package/package.json +2 -2
- package/scripts/collect-modules.sh +1 -1
- package/sentry.gradle +18 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.10.1
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
|
|
7
|
+
- Bump Wizard from v1.2.17 to v1.4.0 ([#2645](https://github.com/getsentry/sentry-react-native/pull/2645))
|
|
8
|
+
- [changelog](https://github.com/getsentry/sentry-wizard/blob/master/CHANGELOG.md#140)
|
|
9
|
+
- [diff](https://github.com/getsentry/sentry-wizard/compare/v1.2.17...v1.4.0)
|
|
10
|
+
- Android builds without ext config, auto create assets dir for modules ([#2652](https://github.com/getsentry/sentry-react-native/pull/2652))
|
|
11
|
+
- Exit gracefully if source map file for collecting modules doesn't exist ([#2655](https://github.com/getsentry/sentry-react-native/pull/2655))
|
|
12
|
+
- Create only one clean-up tasks for modules collection ([#2657](https://github.com/getsentry/sentry-react-native/pull/2657))
|
|
13
|
+
|
|
14
|
+
### Dependencies
|
|
15
|
+
|
|
16
|
+
- Bump Android SDK from v6.8.0 to v6.9.1 ([#2653](https://github.com/getsentry/sentry-react-native/pull/2653))
|
|
17
|
+
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#691)
|
|
18
|
+
- [diff](https://github.com/getsentry/sentry-java/compare/6.8.0...6.9.1)
|
|
19
|
+
|
|
3
20
|
## 4.10.0
|
|
4
21
|
|
|
5
22
|
### Features
|
package/android/build.gradle
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export default class ModulesCollector {
|
|
5
5
|
/** Collect method */
|
|
6
|
-
static collect(sources:
|
|
6
|
+
static collect(sources: unknown[], modulesPaths: string[]): Record<string, string>;
|
|
7
|
+
/**
|
|
8
|
+
* Runs collection of modules.
|
|
9
|
+
*/
|
|
10
|
+
static run({ sourceMapPath, outputModulesPath, modulesPaths, collect, }: Partial<{
|
|
11
|
+
sourceMapPath: string;
|
|
12
|
+
outputModulesPath: string;
|
|
13
|
+
modulesPaths: string[];
|
|
14
|
+
collect: (sources: unknown[], modulesPaths: string[]) => Record<string, string>;
|
|
15
|
+
}>): void;
|
|
7
16
|
}
|
|
8
17
|
//# sourceMappingURL=ModulesCollector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModulesCollector.d.ts","sourceRoot":"","sources":["../../../src/js/tools/ModulesCollector.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ModulesCollector.d.ts","sourceRoot":"","sources":["../../../src/js/tools/ModulesCollector.ts"],"names":[],"mappings":"AAaA;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAgB;IAEnC,qBAAqB;WACP,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IA8DzF;;OAEG;WACW,GAAG,CAAC,EAChB,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,OAAO,GACR,EAAE,OAAO,CAAC;QACT,aAAa,EAAE,MAAM,CAAC;QACtB,iBAAiB,EAAE,MAAM,CAAC;QAC1B,YAAY,EAAE,MAAM,EAAE,CAAC;QACvB,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACjF,CAAC,GAAG,IAAI;CAgDV"}
|
|
@@ -2,6 +2,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
2
2
|
const utils_1 = require("@sentry/utils");
|
|
3
3
|
const fs_1 = require("fs");
|
|
4
4
|
const path_1 = require("path");
|
|
5
|
+
utils_1.logger.enable();
|
|
5
6
|
const { dirname, join, resolve, sep: posixSep } = path_1.posix;
|
|
6
7
|
/**
|
|
7
8
|
* Collects JS modules from source paths.
|
|
@@ -13,6 +14,9 @@ class ModulesCollector {
|
|
|
13
14
|
const infos = {};
|
|
14
15
|
const seen = {};
|
|
15
16
|
sources.forEach((path) => {
|
|
17
|
+
if (typeof path !== 'string') {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
16
20
|
let dir = path; // included source file path
|
|
17
21
|
let candidate = null;
|
|
18
22
|
/** Traverse directories upward in the search of all package.json files */
|
|
@@ -47,7 +51,7 @@ class ModulesCollector {
|
|
|
47
51
|
};
|
|
48
52
|
}
|
|
49
53
|
catch (error) {
|
|
50
|
-
utils_1.logger.
|
|
54
|
+
utils_1.logger.error(`Failed to read ${pkgPath}`);
|
|
51
55
|
}
|
|
52
56
|
return upDirSearch(); // processed package.json file, continue up search
|
|
53
57
|
};
|
|
@@ -55,6 +59,51 @@ class ModulesCollector {
|
|
|
55
59
|
});
|
|
56
60
|
return infos;
|
|
57
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Runs collection of modules.
|
|
64
|
+
*/
|
|
65
|
+
static run({ sourceMapPath, outputModulesPath, modulesPaths, collect, }) {
|
|
66
|
+
if (!sourceMapPath) {
|
|
67
|
+
utils_1.logger.error('First argument `source-map-path` is missing!');
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (!outputModulesPath) {
|
|
71
|
+
utils_1.logger.error('Second argument `modules-output-path` is missing!');
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (!modulesPaths || modulesPaths.length === 0) {
|
|
75
|
+
utils_1.logger.error('Third argument `modules-paths` is missing!');
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
utils_1.logger.info('Reading source map from', sourceMapPath);
|
|
79
|
+
utils_1.logger.info('Saving modules to', outputModulesPath);
|
|
80
|
+
utils_1.logger.info('Resolving modules from paths', outputModulesPath);
|
|
81
|
+
if (!fs_1.existsSync(sourceMapPath)) {
|
|
82
|
+
utils_1.logger.error(`Source map file does not exist at ${sourceMapPath}`);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
for (const modulesPath of modulesPaths) {
|
|
86
|
+
if (!fs_1.existsSync(modulesPath)) {
|
|
87
|
+
utils_1.logger.error(`Modules path does not exist at ${modulesPath}`);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
const map = JSON.parse(fs_1.readFileSync(sourceMapPath, 'utf8'));
|
|
92
|
+
if (!map.sources || !Array.isArray(map.sources)) {
|
|
93
|
+
utils_1.logger.error(`Modules not collected. No sources found in the source map (${sourceMapPath})!`);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const sources = map.sources;
|
|
97
|
+
const modules = collect
|
|
98
|
+
? collect(sources, modulesPaths)
|
|
99
|
+
: ModulesCollector.collect(sources, modulesPaths);
|
|
100
|
+
const outputModulesDirPath = dirname(outputModulesPath);
|
|
101
|
+
if (!fs_1.existsSync(outputModulesDirPath)) {
|
|
102
|
+
fs_1.mkdirSync(outputModulesDirPath, { recursive: true });
|
|
103
|
+
}
|
|
104
|
+
fs_1.writeFileSync(outputModulesPath, JSON.stringify(modules, null, 2));
|
|
105
|
+
utils_1.logger.info(`Modules collected and saved to: ${outputModulesPath}`);
|
|
106
|
+
}
|
|
58
107
|
}
|
|
59
108
|
exports.default = ModulesCollector;
|
|
60
109
|
//# sourceMappingURL=ModulesCollector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModulesCollector.js","sourceRoot":"","sources":["../../../src/js/tools/ModulesCollector.ts"],"names":[],"mappings":";AAAA,yCAAuC;AACvC,
|
|
1
|
+
{"version":3,"file":"ModulesCollector.js","sourceRoot":"","sources":["../../../src/js/tools/ModulesCollector.ts"],"names":[],"mappings":";AAAA,yCAAuC;AACvC,2BAAwE;AACxE,+BAAkC;AAElC,cAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,YAAK,CAAC;AAOxD;;GAEG;AACH,MAAqB,gBAAgB;IAEnC,qBAAqB;IACd,MAAM,CAAC,OAAO,CAAC,OAAkB,EAAE,YAAsB;QAC9D,MAAM,sBAAsB,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,UAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAEjH,MAAM,KAAK,GAA2B,EAAE,CAAC;QACzC,MAAM,IAAI,GAAyB,EAAE,CAAC;QAEtC,OAAO,CAAC,OAAO,CAAC,CAAC,IAAa,EAAE,EAAE;YAChC,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;gBAC5B,OAAO;aACR;YAED,IAAI,GAAG,GAAG,IAAI,CAAC,CAAC,4BAA4B;YAC5C,IAAI,SAAS,GAAmB,IAAI,CAAC;YAErC,0EAA0E;YAC1E,MAAM,WAAW,GAAG,GAAS,EAAE;gBAC7B,MAAM,SAAS,GAAG,GAAG,CAAC;gBACtB,GAAG,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;gBAEzB,IAAI,sBAAsB,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE;oBACjD,IAAI,CAAA,SAAS,aAAT,SAAS,uBAAT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,CAAC,OAAO,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAEpD,MAAM,oBAAoB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACxD,IAAI,CAAC,eAAU,CAAC,oBAAoB,CAAC,EAAE;YACrC,cAAS,CAAC,oBAAoB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;SACtD;QACD,kBAAa,CAAC,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QACnE,cAAM,CAAC,IAAI,CAAC,mCAAmC,iBAAiB,EAAE,CAAC,CAAC;IACtE,CAAC;CAEF;AA9HD,mCA8HC","sourcesContent":["import { logger } from '@sentry/utils';\nimport { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';\nimport { posix, sep } from 'path';\n\nlogger.enable();\n\nconst { dirname, join, resolve, sep: posixSep } = posix;\n\ninterface Package {\n name?: string,\n version?: string,\n}\n\n/**\n * Collects JS modules from source paths.\n */\nexport default class ModulesCollector {\n\n /** Collect method */\n public static collect(sources: unknown[], modulesPaths: string[]): Record<string, string> {\n const normalizedModulesPaths = modulesPaths.map((modulesPath) => resolve(modulesPath.split(sep).join(posixSep)));\n\n const infos: Record<string, string> = {};\n const seen: Record<string, true> = {};\n\n sources.forEach((path: unknown) => {\n if (typeof path !== 'string') {\n return;\n }\n\n let dir = path; // included source file path\n let candidate: Package | null = null;\n\n /** Traverse directories upward in the search of all package.json files */\n const upDirSearch = (): void => {\n const parentDir = dir;\n dir = dirname(parentDir);\n\n if (normalizedModulesPaths.includes(resolve(dir))) {\n if (candidate?.name && candidate?.version) {\n infos[candidate.name] = candidate.version;\n } else if (candidate?.name) {\n infos[candidate.name] = 'unknown';\n }\n return;\n }\n\n if (\n !dir ||\n parentDir === dir ||\n seen[dir]\n ) {\n return;\n }\n seen[dir] = true;\n\n const pkgPath = join(dir, 'package.json');\n if (!existsSync(pkgPath)) {\n // fast-forward if the package.json doesn't exist\n return upDirSearch();\n }\n\n try {\n const info: Package = JSON.parse(readFileSync(pkgPath, 'utf8'));\n candidate = {\n name: info.name,\n version: info.version,\n };\n } catch (error) {\n logger.error(`Failed to read ${pkgPath}`);\n }\n\n return upDirSearch(); // processed package.json file, continue up search\n };\n\n upDirSearch();\n });\n\n return infos;\n }\n\n /**\n * Runs collection of modules.\n */\n public static run({\n sourceMapPath,\n outputModulesPath,\n modulesPaths,\n collect,\n }: Partial<{\n sourceMapPath: string,\n outputModulesPath: string,\n modulesPaths: string[],\n collect: (sources: unknown[], modulesPaths: string[]) => Record<string, string>,\n }>): void {\n if (!sourceMapPath) {\n logger.error('First argument `source-map-path` is missing!');\n return;\n }\n if (!outputModulesPath) {\n logger.error('Second argument `modules-output-path` is missing!');\n return;\n }\n if (!modulesPaths || modulesPaths.length === 0) {\n logger.error('Third argument `modules-paths` is missing!');\n return;\n }\n\n logger.info('Reading source map from', sourceMapPath);\n logger.info('Saving modules to', outputModulesPath);\n logger.info('Resolving modules from paths', outputModulesPath);\n\n if (!existsSync(sourceMapPath)) {\n logger.error(`Source map file does not exist at ${sourceMapPath}`);\n return;\n }\n for (const modulesPath of modulesPaths) {\n if (!existsSync(modulesPath)) {\n logger.error(`Modules path does not exist at ${modulesPath}`);\n return;\n }\n }\n\n const map: { sources?: unknown } = JSON.parse(readFileSync(sourceMapPath, 'utf8'));\n if (!map.sources || !Array.isArray(map.sources)) {\n logger.error(`Modules not collected. No sources found in the source map (${sourceMapPath})!`);\n return;\n }\n\n const sources: unknown[] = map.sources;\n const modules = collect\n ? collect(sources, modulesPaths)\n : ModulesCollector.collect(sources, modulesPaths);\n\n const outputModulesDirPath = dirname(outputModulesPath);\n if (!existsSync(outputModulesDirPath)) {\n mkdirSync(outputModulesDirPath, { recursive: true });\n }\n writeFileSync(outputModulesPath, JSON.stringify(modules, null, 2));\n logger.info(`Modules collected and saved to: ${outputModulesPath}`);\n }\n\n}\n"]}
|
|
@@ -1,32 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
|
|
3
|
-
const fs_1 = require("fs");
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
4
3
|
const process_1 = require("process");
|
|
5
4
|
const ModulesCollector_1 = require("./ModulesCollector");
|
|
6
|
-
const sourceMapPath = process_1.argv[2];
|
|
7
|
-
const outputModulesPath = process_1.argv[3];
|
|
8
|
-
const modulesPaths = process_1.argv[4]
|
|
9
|
-
? process_1.argv[4].split(',')
|
|
5
|
+
const sourceMapPath = process_1.argv[2];
|
|
6
|
+
const outputModulesPath = process_1.argv[3];
|
|
7
|
+
const modulesPaths = process_1.argv[4]
|
|
8
|
+
? process_1.argv[4].split(',')
|
|
10
9
|
: [];
|
|
11
|
-
|
|
12
|
-
exitGracefully('First argument `source-map-path` is missing!');
|
|
13
|
-
}
|
|
14
|
-
if (!outputModulesPath) {
|
|
15
|
-
exitGracefully('Second argument `modules-output-path` is missing!');
|
|
16
|
-
}
|
|
17
|
-
if (modulesPaths.length === 0) {
|
|
18
|
-
exitGracefully('Third argument `modules-paths` is missing!');
|
|
19
|
-
}
|
|
20
|
-
const map = JSON.parse(fs_1.readFileSync(sourceMapPath, 'utf8'));
|
|
21
|
-
if (!map.sources) {
|
|
22
|
-
exitGracefully(`Modules not collected. No sources found in the source map (${sourceMapPath})!`);
|
|
23
|
-
}
|
|
24
|
-
const sources = map.sources;
|
|
25
|
-
const modules = ModulesCollector_1.default.collect(sources, modulesPaths);
|
|
26
|
-
fs_1.writeFileSync(outputModulesPath, JSON.stringify(modules, null, 2));
|
|
27
|
-
function exitGracefully(message) {
|
|
28
|
-
utils_1.logger.error(message);
|
|
29
|
-
process_1.exit(0);
|
|
30
|
-
}
|
|
31
|
-
;
|
|
10
|
+
ModulesCollector_1.default.run({ sourceMapPath, outputModulesPath, modulesPaths });
|
|
32
11
|
//# sourceMappingURL=collectModules.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collectModules.js","sourceRoot":"","sources":["../../../src/js/tools/collectModules.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"collectModules.js","sourceRoot":"","sources":["../../../src/js/tools/collectModules.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,qCAA+B;AAE/B,yDAAkD;AAElD,MAAM,aAAa,GAAuB,cAAI,CAAC,CAAC,CAAC,CAAC;AAClD,MAAM,iBAAiB,GAAuB,cAAI,CAAC,CAAC,CAAC,CAAC;AACtD,MAAM,YAAY,GAAa,cAAI,CAAC,CAAC,CAAC;IACpC,CAAC,CAAC,cAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;IACpB,CAAC,CAAC,EAAE,CAAC;AAEP,0BAAgB,CAAC,GAAG,CAAC,EAAE,aAAa,EAAE,iBAAiB,EAAE,YAAY,EAAE,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-unsafe-member-access */\nimport { argv } from 'process';\n\nimport ModulesCollector from './ModulesCollector';\n\nconst sourceMapPath: string | undefined = argv[2];\nconst outputModulesPath: string | undefined = argv[3];\nconst modulesPaths: string[] = argv[4]\n ? argv[4].split(',')\n : [];\n\nModulesCollector.run({ sourceMapPath, outputModulesPath, modulesPaths });\n"]}
|
package/dist/js/version.d.ts
CHANGED
package/dist/js/version.js
CHANGED
package/dist/js/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,0BAA0B,CAAC;AAC3D,MAAM,CAAC,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AACzD,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';\nexport const SDK_NAME = 'sentry.javascript.react-native';\nexport const SDK_VERSION = '4.10.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/js/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,0BAA0B,CAAC;AAC3D,MAAM,CAAC,MAAM,QAAQ,GAAG,gCAAgC,CAAC;AACzD,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';\nexport const SDK_NAME = 'sentry.javascript.react-native';\nexport const SDK_VERSION = '4.10.1';\n"]}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@sentry/react-native",
|
|
3
3
|
"homepage": "https://github.com/getsentry/sentry-react-native",
|
|
4
4
|
"repository": "https://github.com/getsentry/sentry-react-native",
|
|
5
|
-
"version": "4.10.
|
|
5
|
+
"version": "4.10.1",
|
|
6
6
|
"description": "Official Sentry SDK for react-native",
|
|
7
7
|
"typings": "dist/js/index.d.ts",
|
|
8
8
|
"types": "dist/js/index.d.ts",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@sentry/tracing": "7.21.1",
|
|
52
52
|
"@sentry/types": "7.21.1",
|
|
53
53
|
"@sentry/utils": "7.21.1",
|
|
54
|
-
"@sentry/wizard": "1.
|
|
54
|
+
"@sentry/wizard": "1.4.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@sentry-internal/eslint-config-sdk": "7.21.1",
|
package/sentry.gradle
CHANGED
|
@@ -163,10 +163,10 @@ gradle.projectsEvaluated {
|
|
|
163
163
|
|
|
164
164
|
workingDir reactRoot
|
|
165
165
|
|
|
166
|
-
def collectModulesScript = config.
|
|
166
|
+
def collectModulesScript = config.collectModulesScript
|
|
167
167
|
? file(config.collectModulesScript).getAbsolutePath()
|
|
168
168
|
: "$reactRoot/node_modules/@sentry/react-native/dist/js/tools/collectModules.js"
|
|
169
|
-
def modulesPaths = config.
|
|
169
|
+
def modulesPaths = config.modulesPaths
|
|
170
170
|
? config.modulesPaths.join(',')
|
|
171
171
|
: "$reactRoot/node_modules"
|
|
172
172
|
def args = ["node",
|
|
@@ -179,7 +179,7 @@ gradle.projectsEvaluated {
|
|
|
179
179
|
project.logger.info("Sentry-CollectModules arguments: ${args}")
|
|
180
180
|
commandLine(*args)
|
|
181
181
|
|
|
182
|
-
def skip = config.
|
|
182
|
+
def skip = config.skipCollectModules
|
|
183
183
|
? config.skipCollectModules == true
|
|
184
184
|
: false
|
|
185
185
|
enabled !skip
|
|
@@ -194,19 +194,24 @@ gradle.projectsEvaluated {
|
|
|
194
194
|
}
|
|
195
195
|
previousCliTask = cliTask
|
|
196
196
|
cliTask.finalizedBy modulesTask
|
|
197
|
+
}
|
|
197
198
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
199
|
+
def modulesCleanUpTask = tasks.create(name: nameModulesCleanup, type: Delete) {
|
|
200
|
+
description = "clean up collected modules generated file"
|
|
201
|
+
group = 'sentry.io'
|
|
201
202
|
|
|
202
|
-
|
|
203
|
-
|
|
203
|
+
delete modulesOutput
|
|
204
|
+
}
|
|
204
205
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}
|
|
206
|
+
def variantTaskName = variant.replaceAll("[\\s\\-()]", "") // variant is dev-release beta-release etc.
|
|
207
|
+
// task.name could be packageDev-debugRelease but in that case currentVariants == null
|
|
208
|
+
// because of the regex in `extractCurrentVariants` and this code doesn't run
|
|
209
|
+
def packageTasks = tasks.findAll {
|
|
210
|
+
task -> "package${variantTaskName}".equalsIgnoreCase(task.name) && task.enabled
|
|
211
|
+
}
|
|
212
|
+
packageTasks.each { packageTask ->
|
|
213
|
+
packageTask.dependsOn modulesTask
|
|
214
|
+
packageTask.finalizedBy modulesCleanUpTask
|
|
210
215
|
}
|
|
211
216
|
|
|
212
217
|
/** Delete sourcemap files */
|