@nx/gradle 21.4.0-canary.20250805-990c6f6 → 21.4.0-canary.20250807-166a050

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.4.0-canary.20250805-990c6f6",
3
+ "version": "21.4.0-canary.20250807-166a050",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Gradle allows Gradle tasks to be run through Nx",
6
6
  "repository": {
@@ -35,8 +35,8 @@
35
35
  "migrations": "./migrations.json"
36
36
  },
37
37
  "dependencies": {
38
- "@nx/devkit": "21.4.0-canary.20250805-990c6f6",
39
- "nx": "21.4.0-canary.20250805-990c6f6"
38
+ "@nx/devkit": "21.4.0-canary.20250807-166a050",
39
+ "nx": "21.4.0-canary.20250807-166a050"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public"
@@ -137,7 +137,11 @@ async function addNxProjectGraphPluginToBuildGradle(gradleFilePath, buildGradleC
137
137
  const applyPluginPattern = new RegExp(`\\s*plugin\\(["']${versions_1.gradleProjectGraphPluginName}["']\\)`);
138
138
  if (buildGradleContent.includes('allprojects {')) {
139
139
  if (!applyPluginPattern.test(buildGradleContent)) {
140
- devkit_1.logger.warn(`Please add the ${versions_1.gradleProjectGraphPluginName} plugin to your ${gradleFilePath}:\nallprojects {\n apply {\n plugin(\"${versions_1.gradleProjectGraphPluginName}\")\n }\n}`);
140
+ // Add plugin to existing allprojects block
141
+ const applyPlugin = isKotlinDsl
142
+ ? `plugin("${versions_1.gradleProjectGraphPluginName}")`
143
+ : `plugin "${versions_1.gradleProjectGraphPluginName}"`;
144
+ buildGradleContent = buildGradleContent.replace(/allprojects\s*\{/, `allprojects {\n apply ${applyPlugin}`);
141
145
  }
142
146
  }
143
147
  else {