Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/gradle/migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,12 @@
"cli": "nx",
"description": "Change dev.nx.gradle.project-graph to version 0.1.19 in build file",
"factory": "./src/migrations/22-7-0/change-plugin-version-0-1-19"
},
"change-plugin-version-0-1-20": {
"version": "22.7.0-beta.16",
"cli": "nx",
"description": "Change dev.nx.gradle.project-graph to version 0.1.20 in build file",
"factory": "./src/migrations/22-7-0/change-plugin-version-0-1-20"
}
},
"packageJsonUpdates": {}
Expand Down
2 changes: 1 addition & 1 deletion packages/gradle/project-graph/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {

group = "dev.nx.gradle"

version = "0.1.19"
version = "0.1.20"

repositories { mavenCentral() }

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#### Change dev.nx.gradle.project-graph to version 0.1.20

Change dev.nx.gradle.project-graph to version 0.1.20 in build file

#### Sample Code Changes

##### Before

```text title="build.gradle"
plugins {
id "dev.nx.gradle.project-graph" version "0.1.19"
}
```

##### After

```text title="build.gradle"
plugins {
id "dev.nx.gradle.project-graph" version "0.1.20"
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { Tree, readNxJson } from '@nx/devkit';
import { hasGradlePlugin } from '../../utils/has-gradle-plugin';
import { addNxProjectGraphPlugin } from '../../generators/init/gradle-project-graph-plugin-utils';
import { updateNxPluginVersionInCatalogsAst } from '../../utils/version-catalog-ast-utils';

/* Change the plugin version to 0.1.20
*/
export default async function update(tree: Tree) {
const nxJson = readNxJson(tree);
if (!nxJson) {
return;
}
if (!hasGradlePlugin(tree)) {
return;
}

const gradlePluginVersionToUpdate = '0.1.20';

// Update version in version catalogs using AST-based approach to preserve formatting
await updateNxPluginVersionInCatalogsAst(tree, gradlePluginVersionToUpdate);

// Then update in build.gradle(.kts) files
await addNxProjectGraphPlugin(tree, gradlePluginVersionToUpdate);
}
2 changes: 1 addition & 1 deletion packages/gradle/src/utils/versions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const nxVersion = require('../../package.json').version;

export const gradleProjectGraphPluginName = 'dev.nx.gradle.project-graph';
export const gradleProjectGraphVersion = '0.1.19';
export const gradleProjectGraphVersion = '0.1.20';
Loading