@nx/gradle 19.0.0-beta.10 → 19.0.0-beta.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/gradle",
3
- "version": "19.0.0-beta.10",
3
+ "version": "19.0.0-beta.11",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Gradle allows Gradle tasks to be run through Nx",
6
6
  "repository": {
@@ -33,7 +33,7 @@
33
33
  "migrations": "./migrations.json"
34
34
  },
35
35
  "dependencies": {
36
- "@nx/devkit": "19.0.0-beta.10"
36
+ "@nx/devkit": "19.0.0-beta.11"
37
37
  },
38
38
  "publishConfig": {
39
39
  "access": "public"
@@ -34,7 +34,5 @@ jobs:
34
34
 
35
35
  - uses: nrwl/nx-set-shas@v4
36
36
 
37
- - run: git branch --track main origin/main
38
- if: ${{ github.event_name == 'pull_request' }}
39
37
  <% for (const command of commands) { %>
40
38
  - run: <%= command %><% } %>
@@ -12,6 +12,7 @@ async function initGenerator(tree, options) {
12
12
  }, undefined, options.keepExistingVersions));
13
13
  }
14
14
  addPlugin(tree);
15
+ updateNxJsonConfiguration(tree);
15
16
  addProjectReportToBuildGradle(tree);
16
17
  if (!options.skipFormat) {
17
18
  await (0, devkit_1.formatFiles)(tree);
@@ -71,4 +72,15 @@ allprojects {
71
72
  tree.write(buildGradleFile, buildGradleContent);
72
73
  }
73
74
  }
75
+ function updateNxJsonConfiguration(tree) {
76
+ const nxJson = (0, devkit_1.readNxJson)(tree);
77
+ if (!nxJson.namedInputs) {
78
+ nxJson.namedInputs = {};
79
+ }
80
+ const defaultFilesSet = nxJson.namedInputs.default ?? [];
81
+ nxJson.namedInputs.default = Array.from(new Set([...defaultFilesSet, '{projectRoot}/**/*']));
82
+ const productionFileSet = nxJson.namedInputs.production ?? [];
83
+ nxJson.namedInputs.production = Array.from(new Set([...productionFileSet, 'default', '!{projectRoot}/test/**/*']));
84
+ (0, devkit_1.updateNxJson)(tree, nxJson);
85
+ }
74
86
  exports.default = initGenerator;
@@ -106,6 +106,8 @@ function createInputsMap(context) {
106
106
  ? ['production', '^production']
107
107
  : ['default', '^default'],
108
108
  test: ['default', namedInputs?.production ? '^production' : '^default'],
109
- classes: ['default', '^default'],
109
+ classes: namedInputs?.production
110
+ ? ['production', '^production']
111
+ : ['default', '^default'],
110
112
  };
111
113
  }