@nx/gradle 22.6.0-beta.11 → 22.6.0-beta.13

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.
@@ -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-15.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"change-plugin-version-0-1-15.d.ts","sourceRoot":"","sources":["../../../../../../packages/gradle/src/migrations/22-6-0/change-plugin-version-0-1-15.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.15
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.15';
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
+ }
@@ -1,5 +1,6 @@
1
1
  export declare const GRADLE_BUILD_FILES: Set<string>;
2
2
  export declare const GRADLEW_FILES: Set<string>;
3
+ export declare const GRADLE_VERSION_CATALOG_GLOB = "**/gradle/*.versions.toml";
3
4
  export declare const GRADLE_TEST_FILES: string[];
4
5
  export declare const gradleConfigGlob: string;
5
6
  export declare const gradleConfigAndTestGlob: string;
@@ -1 +1 @@
1
- {"version":3,"file":"split-config-files.d.ts","sourceRoot":"","sources":["../../../../../packages/gradle/src/utils/split-config-files.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,aAAgD,CAAC;AAChF,eAAO,MAAM,aAAa,aAAsC,CAAC;AACjE,eAAO,MAAM,iBAAiB,UAO7B,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAE5B,CAAC;AAEF,eAAO,MAAM,uBAAuB,QAMnC,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG;IAC1D,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAiCA"}
1
+ {"version":3,"file":"split-config-files.d.ts","sourceRoot":"","sources":["../../../../../packages/gradle/src/utils/split-config-files.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,aAAgD,CAAC;AAChF,eAAO,MAAM,aAAa,aAAsC,CAAC;AACjE,eAAO,MAAM,2BAA2B,8BAA8B,CAAC;AACvE,eAAO,MAAM,iBAAiB,UAO7B,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAE5B,CAAC;AAEF,eAAO,MAAM,uBAAuB,QAOnC,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG;IAC1D,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAiCA"}
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.gradleConfigAndTestGlob = exports.gradleConfigGlob = exports.GRADLE_TEST_FILES = exports.GRADLEW_FILES = exports.GRADLE_BUILD_FILES = void 0;
3
+ exports.gradleConfigAndTestGlob = exports.gradleConfigGlob = exports.GRADLE_TEST_FILES = exports.GRADLE_VERSION_CATALOG_GLOB = 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
8
  exports.GRADLEW_FILES = new Set(['gradlew', 'gradlew.bat']);
9
+ exports.GRADLE_VERSION_CATALOG_GLOB = '**/gradle/*.versions.toml';
9
10
  exports.GRADLE_TEST_FILES = [
10
11
  '**/src/test/java/**/*Test.java',
11
12
  '**/src/test/kotlin/**/*Test.kt',
@@ -15,7 +16,7 @@ exports.GRADLE_TEST_FILES = [
15
16
  '**/src/test/groovy/**/*Tests.groovy',
16
17
  ];
17
18
  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.GRADLEW_FILES), ...Array.from(exports.GRADLE_BUILD_FILES).map((file) => `**/${file}`), ...Array.from(exports.GRADLEW_FILES).map((file) => `**/${file}`), ...exports.GRADLE_TEST_FILES);
19
+ 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, exports.GRADLE_VERSION_CATALOG_GLOB);
19
20
  /**
20
21
  * This function split config files into build files, settings files, test files and project roots
21
22
  * @param files list of files to split
@@ -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.14";
3
+ export declare const gradleProjectGraphVersion = "0.1.15";
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.14';
6
+ exports.gradleProjectGraphVersion = '0.1.15';