@nx/gradle 19.4.0-rc.1 → 19.4.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/migrations.json +6 -0
- package/package.json +2 -2
- package/src/generators/init/init.d.ts +1 -0
- package/src/generators/init/init.js +3 -2
- package/src/migrations/19-4-1/change-regex-test-production.d.ts +2 -0
- package/src/migrations/19-4-1/change-regex-test-production.js +21 -0
- package/src/utils/exec-gradle.js +1 -0
package/migrations.json
CHANGED
@@ -5,6 +5,12 @@
|
|
5
5
|
"cli": "nx",
|
6
6
|
"description": "Add task projectReportAll to build.gradle file",
|
7
7
|
"factory": "./src/migrations/19-4-0/add-project-report-all"
|
8
|
+
},
|
9
|
+
"change-regex-production-test": {
|
10
|
+
"version": "19.4.1-beta.0",
|
11
|
+
"cli": "nx",
|
12
|
+
"description": "This function changes !{projectRoot}/test/**/* in nx.json for production to !{projectRoot}/src/test/**/*",
|
13
|
+
"factory": "./src/migrations/19-4-1/change-regex-test-production"
|
8
14
|
}
|
9
15
|
},
|
10
16
|
"packageJsonUpdates": {}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nx/gradle",
|
3
|
-
"version": "19.4.
|
3
|
+
"version": "19.4.1",
|
4
4
|
"private": false,
|
5
5
|
"description": "The Nx Plugin for Gradle allows Gradle tasks to be run through Nx",
|
6
6
|
"repository": {
|
@@ -34,7 +34,7 @@
|
|
34
34
|
"migrations": "./migrations.json"
|
35
35
|
},
|
36
36
|
"dependencies": {
|
37
|
-
"@nx/devkit": "19.4.
|
37
|
+
"@nx/devkit": "19.4.1"
|
38
38
|
},
|
39
39
|
"publishConfig": {
|
40
40
|
"access": "public"
|
@@ -5,4 +5,5 @@ export declare function initGenerator(tree: Tree, options: InitGeneratorSchema):
|
|
5
5
|
* This function creates and populate build.gradle file next to the settings.gradle file.
|
6
6
|
*/
|
7
7
|
export declare function addBuildGradleFileNextToSettingsGradle(tree: Tree): Promise<void>;
|
8
|
+
export declare function updateNxJsonConfiguration(tree: Tree): void;
|
8
9
|
export default initGenerator;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.addBuildGradleFileNextToSettingsGradle = exports.initGenerator = void 0;
|
3
|
+
exports.updateNxJsonConfiguration = exports.addBuildGradleFileNextToSettingsGradle = exports.initGenerator = void 0;
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
5
5
|
const child_process_1 = require("child_process");
|
6
6
|
const versions_1 = require("../../utils/versions");
|
@@ -131,7 +131,8 @@ function updateNxJsonConfiguration(tree) {
|
|
131
131
|
const defaultFilesSet = nxJson.namedInputs.default ?? [];
|
132
132
|
nxJson.namedInputs.default = Array.from(new Set([...defaultFilesSet, '{projectRoot}/**/*']));
|
133
133
|
const productionFileSet = nxJson.namedInputs.production ?? [];
|
134
|
-
nxJson.namedInputs.production = Array.from(new Set([...productionFileSet, 'default', '!{projectRoot}/test/**/*']));
|
134
|
+
nxJson.namedInputs.production = Array.from(new Set([...productionFileSet, 'default', '!{projectRoot}/src/test/**/*']));
|
135
135
|
(0, devkit_1.updateNxJson)(tree, nxJson);
|
136
136
|
}
|
137
|
+
exports.updateNxJsonConfiguration = updateNxJsonConfiguration;
|
137
138
|
exports.default = initGenerator;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const devkit_1 = require("@nx/devkit");
|
4
|
+
const has_gradle_plugin_1 = require("../../utils/has-gradle-plugin");
|
5
|
+
// This function changes !{projectRoot}/test/**/* in nx.json for production to !{projectRoot}/src/test/**/*
|
6
|
+
function update(tree) {
|
7
|
+
if (!(0, has_gradle_plugin_1.hasGradlePlugin)(tree)) {
|
8
|
+
return;
|
9
|
+
}
|
10
|
+
const nxJson = (0, devkit_1.readNxJson)(tree);
|
11
|
+
if (!nxJson) {
|
12
|
+
return;
|
13
|
+
}
|
14
|
+
const production = nxJson.namedInputs?.production;
|
15
|
+
if (production?.includes('!{projectRoot}/test/**/*')) {
|
16
|
+
production[production.indexOf('!{projectRoot}/test/**/*')] =
|
17
|
+
'!{projectRoot}/src/test/**/*';
|
18
|
+
(0, devkit_1.updateNxJson)(tree, nxJson);
|
19
|
+
}
|
20
|
+
}
|
21
|
+
exports.default = update;
|