@nx/gradle 21.6.1-beta.1 → 21.6.1-beta.3

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.
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "gradle-batch-runner",
3
- "$schema": "node_modules/nx/schemas/project-schema.json",
4
- "projectRoot": "packages/gradle/batch-runner",
3
+ "$schema": "../../../node_modules/nx/schemas/project-schema.json",
5
4
  "sourceRoot": "packages/gradle/batch-runner/src",
5
+ "projectType": "library",
6
+ "tags": [],
6
7
  "targets": {
7
8
  "assemble": {
8
9
  "executor": "@nx/gradle:gradle",
package/migrations.json CHANGED
@@ -65,6 +65,12 @@
65
65
  "cli": "nx",
66
66
  "description": "Change dev.nx.gradle.project-graph to version 0.1.7 in build file",
67
67
  "factory": "./src/migrations/21-5-1/change-plugin-version-0-1-7"
68
+ },
69
+ "change-plugin-version-0-1-8": {
70
+ "version": "21.6.1-beta.2",
71
+ "cli": "nx",
72
+ "description": "Change dev.nx.gradle.project-graph to version 0.1.8 in build file",
73
+ "factory": "./src/migrations/21-6-1/change-plugin-version-0-1-8"
68
74
  }
69
75
  },
70
76
  "packageJsonUpdates": {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/gradle",
3
- "version": "21.6.1-beta.1",
3
+ "version": "21.6.1-beta.3",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Gradle allows Gradle tasks to be run through Nx",
6
6
  "repository": {
@@ -35,11 +35,11 @@
35
35
  "migrations": "./migrations.json"
36
36
  },
37
37
  "dependencies": {
38
- "@nx/devkit": "21.6.1-beta.1",
38
+ "@nx/devkit": "21.6.1-beta.3",
39
39
  "toml-eslint-parser": "^0.10.0"
40
40
  },
41
41
  "devDependencies": {
42
- "nx": "21.6.1-beta.1"
42
+ "nx": "21.6.1-beta.3"
43
43
  },
44
44
  "publishConfig": {
45
45
  "access": "public"
@@ -0,0 +1,3 @@
1
+ import { Tree } from '@nx/devkit';
2
+ export default function update(tree: Tree): Promise<void>;
3
+ //# sourceMappingURL=change-plugin-version-0-1-8.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"change-plugin-version-0-1-8.d.ts","sourceRoot":"","sources":["../../../../../../packages/gradle/src/migrations/21-6-1/change-plugin-version-0-1-8.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAc,MAAM,YAAY,CAAC;AAO9C,wBAA8B,MAAM,CAAC,IAAI,EAAE,IAAI,iBAgB9C"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = update;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const has_gradle_plugin_1 = require("../../utils/has-gradle-plugin");
6
+ const gradle_project_graph_plugin_utils_1 = require("../../generators/init/gradle-project-graph-plugin-utils");
7
+ const version_catalog_ast_utils_1 = require("../../utils/version-catalog-ast-utils");
8
+ /* Change the plugin version to 0.1.8
9
+ */
10
+ async function update(tree) {
11
+ const nxJson = (0, devkit_1.readNxJson)(tree);
12
+ if (!nxJson) {
13
+ return;
14
+ }
15
+ if (!(0, has_gradle_plugin_1.hasGradlePlugin)(tree)) {
16
+ return;
17
+ }
18
+ const gradlePluginVersionToUpdate = '0.1.8';
19
+ // Update version in version catalogs using AST-based approach to preserve formatting
20
+ await (0, version_catalog_ast_utils_1.updateNxPluginVersionInCatalogsAst)(tree, gradlePluginVersionToUpdate);
21
+ // Then update in build.gradle(.kts) files
22
+ await (0, gradle_project_graph_plugin_utils_1.addNxProjectGraphPlugin)(tree, gradlePluginVersionToUpdate);
23
+ }
@@ -8,7 +8,7 @@ const split_config_files_1 = require("../utils/split-config-files");
8
8
  const workspace_context_1 = require("nx/src/utils/workspace-context");
9
9
  const node_fs_1 = require("node:fs");
10
10
  const createDependencies = async (options, context) => {
11
- const files = await (0, workspace_context_1.globWithWorkspaceContext)(devkit_1.workspaceRoot, Array.from(split_config_files_1.GRALDEW_FILES));
11
+ const files = await (0, workspace_context_1.globWithWorkspaceContext)(devkit_1.workspaceRoot, Array.from(split_config_files_1.GRADLEW_FILES));
12
12
  const { gradlewFiles } = (0, split_config_files_1.splitConfigFiles)(files);
13
13
  await (0, get_project_graph_from_gradle_plugin_1.populateProjectGraph)(context.workspaceRoot, gradlewFiles.map((file) => (0, node_path_1.join)(devkit_1.workspaceRoot, file)), options);
14
14
  const { dependencies: dependenciesFromReport } = (0, get_project_graph_from_gradle_plugin_1.getCurrentProjectGraphReport)();
@@ -1,7 +1,6 @@
1
1
  export interface GradlePluginOptions {
2
2
  testTargetName?: string;
3
3
  ciTestTargetName?: string;
4
- ciIntTestTargetName?: string;
5
4
  [taskTargetName: string]: string | undefined | boolean;
6
5
  }
7
6
  export declare function normalizeOptions(options: GradlePluginOptions): GradlePluginOptions;
@@ -1 +1 @@
1
- {"version":3,"file":"gradle-plugin-options.d.ts","sourceRoot":"","sources":["../../../../../../packages/gradle/src/plugin/utils/gradle-plugin-options.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;CACxD;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,mBAAmB,GAC3B,mBAAmB,CAIrB"}
1
+ {"version":3,"file":"gradle-plugin-options.d.ts","sourceRoot":"","sources":["../../../../../../packages/gradle/src/plugin/utils/gradle-plugin-options.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;CACxD;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,mBAAmB,GAC3B,mBAAmB,CAIrB"}
@@ -1,5 +1,5 @@
1
1
  export declare const GRADLE_BUILD_FILES: Set<string>;
2
- export declare const GRALDEW_FILES: Set<string>;
2
+ export declare const GRADLEW_FILES: Set<string>;
3
3
  export declare const GRADLE_TEST_FILES: string[];
4
4
  export declare const gradleConfigGlob: string;
5
5
  export declare const gradleConfigAndTestGlob: string;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.gradleConfigAndTestGlob = exports.gradleConfigGlob = exports.GRADLE_TEST_FILES = exports.GRALDEW_FILES = exports.GRADLE_BUILD_FILES = void 0;
3
+ exports.gradleConfigAndTestGlob = exports.gradleConfigGlob = exports.GRADLE_TEST_FILES = exports.GRADLEW_FILES = exports.GRADLE_BUILD_FILES = void 0;
4
4
  exports.splitConfigFiles = splitConfigFiles;
5
5
  const globs_1 = require("nx/src/utils/globs");
6
6
  const node_path_1 = require("node:path");
7
7
  exports.GRADLE_BUILD_FILES = new Set(['build.gradle', 'build.gradle.kts']);
8
- exports.GRALDEW_FILES = new Set(['gradlew', 'gradlew.bat']);
8
+ exports.GRADLEW_FILES = new Set(['gradlew', 'gradlew.bat']);
9
9
  exports.GRADLE_TEST_FILES = [
10
10
  '**/src/test/java/**/*Test.java',
11
11
  '**/src/test/kotlin/**/*Test.kt',
@@ -15,7 +15,7 @@ exports.GRADLE_TEST_FILES = [
15
15
  '**/src/test/groovy/**/*Tests.groovy',
16
16
  ];
17
17
  exports.gradleConfigGlob = (0, globs_1.combineGlobPatterns)(...Array.from(exports.GRADLE_BUILD_FILES).map((file) => `**/${file}`));
18
- exports.gradleConfigAndTestGlob = (0, globs_1.combineGlobPatterns)(...Array.from(exports.GRADLE_BUILD_FILES), ...Array.from(exports.GRALDEW_FILES), ...Array.from(exports.GRADLE_BUILD_FILES).map((file) => `**/${file}`), ...Array.from(exports.GRALDEW_FILES).map((file) => `**/${file}`), ...exports.GRADLE_TEST_FILES);
18
+ exports.gradleConfigAndTestGlob = (0, globs_1.combineGlobPatterns)(...Array.from(exports.GRADLE_BUILD_FILES), ...Array.from(exports.GRADLEW_FILES), ...Array.from(exports.GRADLE_BUILD_FILES).map((file) => `**/${file}`), ...Array.from(exports.GRADLEW_FILES).map((file) => `**/${file}`), ...exports.GRADLE_TEST_FILES);
19
19
  /**
20
20
  * This function split config files into build files, settings files, test files and project roots
21
21
  * @param files list of files to split
@@ -34,7 +34,7 @@ function splitConfigFiles(files) {
34
34
  buildFiles.push(file);
35
35
  projectRoots.add(fileDirectory);
36
36
  }
37
- else if (exports.GRALDEW_FILES.has(filename)) {
37
+ else if (exports.GRADLEW_FILES.has(filename)) {
38
38
  if (process.platform.startsWith('win')) {
39
39
  if (filename === 'gradlew.bat') {
40
40
  gradlewFiles.push(file);
@@ -1,4 +1,4 @@
1
1
  export declare const nxVersion: any;
2
2
  export declare const gradleProjectGraphPluginName = "dev.nx.gradle.project-graph";
3
- export declare const gradleProjectGraphVersion = "0.1.4";
3
+ export declare const gradleProjectGraphVersion = "0.1.7";
4
4
  //# sourceMappingURL=versions.d.ts.map
@@ -3,4 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.gradleProjectGraphVersion = exports.gradleProjectGraphPluginName = exports.nxVersion = void 0;
4
4
  exports.nxVersion = require('../../package.json').version;
5
5
  exports.gradleProjectGraphPluginName = 'dev.nx.gradle.project-graph';
6
- exports.gradleProjectGraphVersion = '0.1.4';
6
+ exports.gradleProjectGraphVersion = '0.1.7';