@nx/gradle 19.2.0-beta.3 → 19.2.0-beta.5

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.2.0-beta.3",
3
+ "version": "19.2.0-beta.5",
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.2.0-beta.3"
37
+ "@nx/devkit": "19.2.0-beta.5"
38
38
  },
39
39
  "publishConfig": {
40
40
  "access": "public"
package/plugin.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export { createDependencies } from './src/plugin/dependencies';
2
- export { createNodes } from './src/plugin/nodes';
2
+ export { createNodes, createNodesV2 } from './src/plugin/nodes';
package/plugin.js CHANGED
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createNodes = exports.createDependencies = void 0;
3
+ exports.createNodesV2 = exports.createNodes = exports.createDependencies = void 0;
4
4
  var dependencies_1 = require("./src/plugin/dependencies");
5
5
  Object.defineProperty(exports, "createDependencies", { enumerable: true, get: function () { return dependencies_1.createDependencies; } });
6
6
  var nodes_1 = require("./src/plugin/nodes");
7
7
  Object.defineProperty(exports, "createNodes", { enumerable: true, get: function () { return nodes_1.createNodes; } });
8
+ Object.defineProperty(exports, "createNodesV2", { enumerable: true, get: function () { return nodes_1.createNodesV2; } });
@@ -15,7 +15,8 @@ export declare function writeTargetsToCache(cachePath: string, results: GradleTa
15
15
  export declare const createNodesV2: CreateNodesV2<GradlePluginOptions>;
16
16
  export declare const makeCreateNodes: (gradleReport: GradleReport, targetsCache: GradleTargets) => CreateNodesFunction;
17
17
  /**
18
- * @deprecated `{@link createNodesV2} is replacing this. Update your plugin to export its own `createNodesV2` function that wraps this one instead.`
18
+ @deprecated This is replaced with {@link createNodesV2}. Update your plugin to export its own `createNodesV2` function that wraps this one instead.
19
+ This function will change to the v2 function in Nx 20.
19
20
  */
20
21
  export declare const createNodes: CreateNodes<GradlePluginOptions>;
21
22
  export {};
@@ -54,12 +54,13 @@ const makeCreateNodes = (gradleReport, targetsCache) => (gradleFilePath, options
54
54
  };
55
55
  exports.makeCreateNodes = makeCreateNodes;
56
56
  /**
57
- * @deprecated `{@link createNodesV2} is replacing this. Update your plugin to export its own `createNodesV2` function that wraps this one instead.`
57
+ @deprecated This is replaced with {@link createNodesV2}. Update your plugin to export its own `createNodesV2` function that wraps this one instead.
58
+ This function will change to the v2 function in Nx 20.
58
59
  */
59
60
  exports.createNodes = [
60
61
  get_gradle_report_1.gradleConfigGlob,
61
62
  (configFile, options, context) => {
62
- devkit_1.logger.warn('`createNodes` is deprecated. Update your plugin to utilize createNodesV2 instead. In Nx 20, this will error.');
63
+ devkit_1.logger.warn('`createNodes` is deprecated. Update your plugin to utilize createNodesV2 instead. In Nx 20, this will change to the createNodesV2 API.');
63
64
  (0, get_gradle_report_1.populateGradleReport)(context.workspaceRoot);
64
65
  const gradleReport = (0, get_gradle_report_1.getCurrentGradleReport)();
65
66
  const internalCreateNodes = (0, exports.makeCreateNodes)(gradleReport, {});
@@ -110,12 +111,14 @@ function createGradleTargets(tasks, options, context, outputDirs, gradleProject)
110
111
  command: `${(0, exec_gradle_1.getGradleExecFile)()} ${gradleProject ? gradleProject + ':' : ''}${task.name}`,
111
112
  cache: cacheableTaskType.has(task.type),
112
113
  inputs: inputsMap[task.name],
113
- outputs: outputs ? [outputs] : undefined,
114
114
  dependsOn: dependsOnMap[task.name],
115
115
  metadata: {
116
116
  technologies: ['gradle'],
117
117
  },
118
118
  };
119
+ if (outputs) {
120
+ targets[targetName].outputs = [outputs];
121
+ }
119
122
  if (!targetGroups[task.type]) {
120
123
  targetGroups[task.type] = [];
121
124
  }