@nx/gradle 21.0.0-rc.2 → 21.0.0-rc.4

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": "21.0.0-rc.2",
3
+ "version": "21.0.0-rc.4",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Gradle allows Gradle tasks to be run through Nx",
6
6
  "repository": {
@@ -35,7 +35,7 @@
35
35
  "migrations": "./migrations.json"
36
36
  },
37
37
  "dependencies": {
38
- "@nx/devkit": "21.0.0-rc.2"
38
+ "@nx/devkit": "21.0.0-rc.4"
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public"
@@ -3,6 +3,9 @@ version: 2.1
3
3
  orbs:
4
4
  nx: nrwl/nx@1.6.2
5
5
 
6
+ env:
7
+ NX_BATCH_MODE: true
8
+
6
9
  jobs:
7
10
  main:
8
11
  environment:
@@ -18,13 +21,13 @@ jobs:
18
21
  # Run this command as early as possible, before dependencies are installed
19
22
  # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
20
23
  <% if (connectedToCloud) { %># Uncomment this line to enable task distribution<% } else { %># Connect your workspace by running "nx connect" and uncomment this line to enable task distribution<% } %>
21
- # - run: <%= packageManagerPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-jvm" --stop-agents-after="build"
24
+ # - run: <%= packageManagerPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-jvm" --stop-agents-after="check"
22
25
 
23
26
  - nx/set-shas:
24
27
  main-branch-name: '<%= mainBranch %>'
25
-
26
28
  <% for (const command of commands) { %>
27
- <% if (command.command) { %>- run: <%= command.command %><% } else if (command.comment) { %><%= command.comment %><% } else {%>- run: <%= command %><% } %><% } %>
29
+ <% if (command.command) { %>- run: <%= command.command %><% } else if (command.comments) { %><% for (const comment of command.comments) { %>
30
+ <%= comment %><% } %><% } else {%>- run: <%= command %><% } %><% } %>
28
31
 
29
32
  workflows:
30
33
  version: 2
@@ -10,6 +10,9 @@ permissions:
10
10
  actions: read
11
11
  contents: read
12
12
 
13
+ env:
14
+ NX_BATCH_MODE: true
15
+
13
16
  jobs:
14
17
  main:
15
18
  runs-on: ubuntu-latest
@@ -23,7 +26,7 @@ jobs:
23
26
  # Run this command as early as possible, before dependencies are installed
24
27
  # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun
25
28
  <% if (connectedToCloud) { %># Uncomment this line to enable task distribution<% } else { %># Connect your workspace by running "nx connect" and uncomment this line to enable task distribution<% } %>
26
- # - run: <%= packageManagerPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-jvm" --stop-agents-after="build"
29
+ # - run: <%= packageManagerPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-jvm" --stop-agents-after="check"
27
30
 
28
31
  - name: Set up JDK 21 for x64
29
32
  uses: actions/setup-java@v4
@@ -33,9 +36,9 @@ jobs:
33
36
  architecture: x64
34
37
 
35
38
  - name: Setup Gradle
36
- uses: gradle/gradle-build-action@v4
39
+ uses: gradle/actions/setup-gradle@v3
37
40
 
38
41
  - uses: nrwl/nx-set-shas@v4
39
-
40
42
  <% for (const command of commands) { %>
41
- <% if (command.command) { %>- run: <%= command.command %><% } else if (command.comment) { %><%= command.comment %><% } else {%>- run: <%= command %><% } %><% } %>
43
+ <% if (command.command) { %>- run: <%= command.command %><% } else if (command.comments) { %><% for (const comment of command.comments) { %>
44
+ <%= comment %><% } %><% } else {%>- run: <%= command %><% } %><% } %>
@@ -2,7 +2,7 @@ import { Tree } from '@nx/devkit';
2
2
  export type Command = {
3
3
  command: string;
4
4
  } | {
5
- comment: string;
5
+ comments: string[];
6
6
  } | string;
7
7
  export interface Schema {
8
8
  name: string;
@@ -10,19 +10,25 @@ function getCiCommands(ci) {
10
10
  case 'circleci': {
11
11
  return [
12
12
  {
13
- comment: `# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected`,
13
+ comments: [
14
+ `# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected.`,
15
+ `# Change from check to check-ci if you turn on the atomizer. Learn more: https://nx.dev/nx-api/gradle#splitting-e2e-tests.`,
16
+ ],
14
17
  },
15
18
  {
16
- command: `./nx affected --base=$NX_BASE --head=$NX_HEAD -t build`,
19
+ command: `./nx affected --base=$NX_BASE --head=$NX_HEAD -t assemble check`,
17
20
  },
18
21
  ];
19
22
  }
20
23
  default: {
21
24
  return [
22
25
  {
23
- comment: `# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected`,
26
+ comments: [
27
+ `# Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected.`,
28
+ `# Change from check to check-ci if you turn on the atomizer. Learn more: https://nx.dev/nx-api/gradle#splitting-tests`,
29
+ ],
24
30
  },
25
- { command: `./nx affected -t build` },
31
+ { command: `./nx affected -t assemble check` },
26
32
  ];
27
33
  }
28
34
  }