Repository: openrewrite/rewrite (2026-04-06T11:02:45Z)

Issue:
Gradle recipe to fix "Properties should be assigned using the 'propName = value' syntax"
## What problem are you trying to solve?

My organization's proprietary repo uses Gradle 8.14 and a `build.gradle` script which reportedly uses a deprecated Gradle syntax:
```
Build file '/Users/greg/git/logic/build.gradle': line 2
Properties should be assigned using the 'propName = value' syntax. Setting a property via the Gradle-generated 'propName value' or 'propName(value)' syntax in Groovy DSL has been deprecated. This is scheduled to be removed in Gradle 10.0. Use assignment ('description = <value>') instead. Consult the upgrading guide for further information: https://docs.gradle.org/8.14/userguide/upgrading_version_8.html#groovy_space_assignment_syntax
        at build_auwq4nl5ktk75k9u2000ejmc0$_run_closure2.doCall$original(/Users/greg/git/logic/build.gradle:2)
        (Run with --stacktrace to get the full stack trace of this deprecation warning.)
```
It triggers a noisy warning whenever I build something.

## Describe the situation before applying the recipe
<!-- Ideally as a self-contained code example, as a start to the recipe unit tests. -->
```gradle
tasks.register('runLogic', JavaExec) {
    description 'My precious logic'
    classpath sourceSets.main.runtimeClasspath
    mainClass = 'my.org.logic.Logic'
}
```

## Describe the situation after applying the recipe
<!-- Ideally as a self-contained code example, as a start to the recipe unit tests. -->
```gradle
tasks.register('runLogic', JavaExec) {
    description = 'My precious logic'
    classpath sourceSets.main.runtimeClasspath
    mainClass = 'my.org.logic.Logic'
}
```



Discussion:

Patch:
diff --git a/rewrite-gradle/src/main/java/org/openrewrite/gradle/UsePropertyAssignmentSyntax.java b/rewrite-gradle/src/main/java/org/openrewrite/gradle/UsePropertyAssignmentSyntax.java
new file mode 100644
index 00000000000..b6c9f83234b
--- /dev/null
+++ b/rewrite-gradle/src/main/java/org/openrewrite/gradle/UsePropertyAssignmentSyntax.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2026 the original author or authors.
+ * <p>
+ * Licensed under the Moderne Source Available License (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * https://docs.moderne.io/licensing/moderne-source-available-license
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.openrewrite.gradle;
+
+import lombok.EqualsAndHashCode;
+import lombok.Value;
+import org.openrewrite.*;
+import org.openrewrite.groovy.GroovyTemplate;
+import org.openrewrite.java.JavaVisitor;
+import org.openrewrite.java.tree.J;
+
+@Value
+@EqualsAndHashCode(callSuper = false)
+public class UsePropertyAssignmentSyntax extends Recipe {
+
+    @Option(displayName = "Property name",
+            description = "The name of the property whose method-call or space-separated syntax should be converted to assignment syntax using `=`.",
+            example = "description")
+    String propertyName;
+
+    @Override
+    public String getDisplayName() {
+        return "Use `=` assignment syntax for Gradle properties";
+    }
+
+    @Override
+    public String getDescription() {
+        return "Converts deprecated Groovy DSL property assignment syntax from space/method-call form " +
+               "(e.g., `description 'text'` or `description('text')`) to assignment form (`description = 'text'`). " +
+               "Addresses Gradle 8.14 deprecation: " +
+               "\"Properties should be assigned using the 'propName = value' syntax.\".";
+    }
+
+    @Override
+    public String getInstanceNameSuffix() {
+        return String.format("`%s`", propertyName);
+    }
+
+    @Override
+    public TreeVisitor<?, ExecutionContext> getVisitor() {
+        return Preconditions.check(new FindSourceFiles("**/*.gradle"), new JavaVisitor<ExecutionContext>() {
+            @Override
+            public J visitMethodInvocation(J.MethodInvocation method, ExecutionContext ctx) {
+                J.MethodInvocation m = (J.MethodInvocation) super.visitMethodInvocation(method, ctx);
+
+                if (m.getArguments().size() != 1 || m.getArguments().get(0) instanceof J.Empty) {
+                    return m;
+                }
+
+                if (!propertyName.equals(m.getSimpleName())) {
+                    return m;
+                }
+
+                if (m.getSelect() != null) {
+                    return GroovyTemplate.apply("#{any()}." + propertyName + " = #{any()}",
+                            getCursor(), m.getCoordinates().replace(),
+                            m.getSelect(), m.getArguments().get(0));
+                }
+                return GroovyTemplate.apply(propertyName + " = #{any()}",
+                        getCursor(), m.getCoordinates().replace(),
+                        m.getArguments().get(0));
+            }
+        });
+    }
+}
diff --git a/rewrite-gradle/src/main/resources/META-INF/rewrite/gradle-8.yml b/rewrite-gradle/src/main/resources/META-INF/rewrite/gradle-8.yml
index 1d0516c67d0..59db32b3af6 100644
--- a/rewrite-gradle/src/main/resources/META-INF/rewrite/gradle-8.yml
+++ b/rewrite-gradle/src/main/resources/META-INF/rewrite/gradle-8.yml
@@ -37,6 +37,45 @@ recipeList:
       previewFeatureName: VERSION_ORDERING_V2
   - org.openrewrite.gradle.RemoveEnableFeaturePreview:
       previewFeatureName: VERSION_CATALOGS
+
+  # https://docs.gradle.org/8.14/userguide/upgrading_version_8.html#groovy_space_assignment_syntax
+  - org.openrewrite.gradle.UseAssignmentForPropertySyntax
+---
+type: specs.openrewrite.org/v1beta/recipe
+name: org.openrewrite.gradle.UseAssignmentForPropertySyntax
+displayName: Use `=` assignment syntax for well-known Gradle properties
+description: >
+  Converts deprecated Groovy DSL property assignment syntax from space/method-call form
+  (e.g., `description 'text'` or `description('text')`) to assignment form (`description = 'text'`)
+  for well-known Gradle project and task properties.
+  See the [Gradle 8.14 upgrade guide](https://docs.gradle.org/8.14/userguide/upgrading_version_8.html#groovy_space_assignment_syntax) for more information.
+recipeList:
+  - org.openrewrite.gradle.UsePropertyAssignmentSyntax:
+      propertyName: description
+  - org.openrewrite.gradle.UsePropertyAssignmentSyntax:
+      propertyName: group
+  - org.openrewrite.gradle.UsePropertyAssignmentSyntax:
+      propertyName: version
+  - org.openrewrite.gradle.UsePropertyAssignmentSyntax:
+      propertyName: sourceCompatibility
+  - org.openrewrite.gradle.UsePropertyAssignmentSyntax:
+      propertyName: targetCompatibility
+  - org.openrewrite.gradle.UsePropertyAssignmentSyntax:
+      propertyName: archivesBaseName
+  - org.openrewrite.gradle.UsePropertyAssignmentSyntax:
+      propertyName: encoding
+  - org.openrewrite.gradle.UsePropertyAssignmentSyntax:
+      propertyName: destinationDirectory
+  - org.openrewrite.gradle.UsePropertyAssignmentSyntax:
+      propertyName: archiveClassifier
+  - org.openrewrite.gradle.UsePropertyAssignmentSyntax:
+      propertyName: archiveBaseName
+  - org.openrewrite.gradle.UsePropertyAssignmentSyntax:
+      propertyName: archiveVersion
+  - org.openrewrite.gradle.UsePropertyAssignmentSyntax:
+      propertyName: archiveExtension
+  - org.openrewrite.gradle.UsePropertyAssignmentSyntax:
+      propertyName: archiveFileName
 ---
 type: specs.openrewrite.org/v1beta/recipe
 name: org.openrewrite.gradle.AddJUnitPlatformLauncher
diff --git a/rewrite-gradle/src/main/resources/META-INF/rewrite/recipes.csv b/rewrite-gradle/src/main/resources/META-INF/rewrite/recipes.csv
index c90379aedf8..9008b3883f6 100644
--- a/rewrite-gradle/src/main/resources/META-INF/rewrite/recipes.csv
+++ b/rewrite-gradle/src/main/resources/META-INF/rewrite/recipes.csv
@@ -21,6 +21,7 @@ maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.RemoveRepository,Rem
 maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.SortDependencies,Sort Gradle dependencies,"Sort dependencies in `build.gradle` and `build.gradle.kts` files. Dependencies are sorted alphabetically by configuration name (e.g. `api`, `implementation`), then by groupId, then by artifactId.",1,,Gradle,,
 maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.SyncGradleExtPropertiesWithBom,Sync Gradle ext properties with BOM,"Downloads a BOM and compares its properties against Gradle ext properties. When the BOM defines a higher version for a property, the ext property is updated to match (or removed if `removeRedundantOverrides` is enabled).",1,,Gradle,"[{""name"":""groupId"",""type"":""String"",""displayName"":""Group ID"",""description"":""The groupId of the BOM to sync with."",""example"":""org.springframework.boot"",""required"":true},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact ID"",""description"":""The artifactId of the BOM to sync with."",""example"":""spring-boot-dependencies"",""required"":true},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the BOM to sync with."",""example"":""3.4.0"",""required"":true},{""name"":""removeRedundantOverrides"",""type"":""Boolean"",""displayName"":""Remove redundant overrides"",""description"":""When enabled, ext properties whose value is lower than or equal to the BOM version will be removed entirely instead of updated, since the BOM default is now sufficient.""}]",
 maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.UpdateJavaCompatibility,Update Gradle project Java compatibility,Find and updates the Java compatibility for the Gradle project.,1,,Gradle,"[{""name"":""version"",""type"":""Integer"",""displayName"":""Java version"",""description"":""The Java version to upgrade to."",""example"":""11"",""required"":true},{""name"":""compatibilityType"",""type"":""CompatibilityType"",""displayName"":""Compatibility type"",""description"":""The compatibility type to change"",""valid"":[""source"",""target""]},{""name"":""declarationStyle"",""type"":""DeclarationStyle"",""displayName"":""Declaration style"",""description"":""The desired style to write the new version as when being written to the `sourceCompatibility` or `targetCompatibility` variables. Default, match current source style. (ex. Enum: `JavaVersion.VERSION_11`, Number: 11, or String: \""11\"")"",""valid"":[""Enum"",""Number"",""String""]},{""name"":""allowDowngrade"",""type"":""Boolean"",""displayName"":""Allow downgrade"",""description"":""Allow downgrading the Java version.""},{""name"":""addIfMissing"",""type"":""Boolean"",""displayName"":""Add compatibility type if missing"",""description"":""Adds the specified compatibility type if one is not found.""}]",
+maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.UsePropertyAssignmentSyntax,Use `=` assignment syntax for Gradle properties,"Converts deprecated Groovy DSL property assignment syntax from space/method-call form (e.g., `description 'text'` or `description('text')`) to assignment form (`description = 'text'`). Addresses Gradle 8.14 deprecation: ""Properties should be assigned using the 'propName = value' syntax."".",1,,Gradle,"[{""name"":""propertyName"",""type"":""String"",""displayName"":""Property name"",""description"":""The name of the property whose method-call or space-separated syntax should be converted to assignment syntax using `=`."",""example"":""description"",""required"":true}]",
 maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.AddDependency,Add Gradle dependency,Add a gradle dependency to a `build.gradle` file in the correct configuration based on where it is used.,1,,Gradle,"[{""name"":""groupId"",""type"":""String"",""displayName"":""Group"",""description"":""The first part of a dependency coordinate 'com.google.guava:guava:VERSION'."",""example"":""com.google.guava"",""required"":true},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact"",""description"":""The second part of a dependency coordinate 'com.google.guava:guava:VERSION'"",""example"":""guava"",""required"":true},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""An exact version number or node-style semver selector used to select the version number. You can also use `latest.release` for the latest available version and `latest.patch` if the current version is a valid semantic version. For more details, you can look at the documentation page of [version selectors](https://docs.openrewrite.org/reference/dependency-version-selectors)."",""example"":""29.X""},{""name"":""versionPattern"",""type"":""String"",""displayName"":""Version pattern"",""description"":""Allows version selection to be extended beyond the original Node Semver semantics. So for example, Setting 'version' to \""25-29\"" can be paired with a metadata pattern of \""-jre\"" to select Guava 29.0-jre"",""example"":""-jre""},{""name"":""configuration"",""type"":""String"",""displayName"":""Configuration"",""description"":""A configuration to use when it is not what can be inferred from usage. Most of the time this will be left empty, but is used when adding a new as of yet unused dependency."",""example"":""implementation""},{""name"":""onlyIfUsing"",""type"":""String"",""displayName"":""Only if using"",""description"":""Used to determine if the dependency will be added and in which scope it should be placed."",""example"":""org.junit.jupiter.api.*""},{""name"":""classifier"",""type"":""String"",""displayName"":""Classifier"",""description"":""A classifier to add. Commonly used to select variants of a library."",""example"":""test""},{""name"":""extension"",""type"":""String"",""displayName"":""Extension"",""description"":""The extension of the dependency to add. If omitted Gradle defaults to assuming the type is \""jar\""."",""example"":""jar""},{""name"":""familyPattern"",""type"":""String"",""displayName"":""Family pattern"",""description"":""A pattern, applied to groupIds, used to determine which other dependencies should have aligned version numbers. Accepts '*' as a wildcard character."",""example"":""com.fasterxml.jackson*""},{""name"":""acceptTransitive"",""type"":""Boolean"",""displayName"":""Accept transitive"",""description"":""Default false. If enabled, the dependency will not be added if it is already on the classpath as a transitive dependency."",""example"":""true""}]","[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]"
 maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.AddPlatformDependency,Add Gradle platform dependency,Add a gradle platform dependency to a `build.gradle` file in the correct configuration based on where it is used.,1,,Gradle,"[{""name"":""groupId"",""type"":""String"",""displayName"":""Group"",""description"":""The first part of a dependency coordinate 'com.google.guava:guava:VERSION'."",""example"":""com.google.guava"",""required"":true},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact"",""description"":""The second part of a dependency coordinate 'com.google.guava:guava:VERSION'"",""example"":""guava"",""required"":true},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""An exact version number or node-style semver selector used to select the version number. You can also use `latest.release` for the latest available version and `latest.patch` if the current version is a valid semantic version. For more details, you can look at the documentation page of [version selectors](https://docs.openrewrite.org/reference/dependency-version-selectors)."",""example"":""29.X""},{""name"":""versionPattern"",""type"":""String"",""displayName"":""Version pattern"",""description"":""Allows version selection to be extended beyond the original Node Semver semantics. So for example, Setting 'version' to \""25-29\"" can be paired with a metadata pattern of \""-jre\"" to select Guava 29.0-jre"",""example"":""-jre""},{""name"":""configuration"",""type"":""String"",""displayName"":""Configuration"",""description"":""A configuration to use when it is not what can be inferred from usage. Most of the time this will be left empty, but is used when adding a new, as yet unused, dependency."",""example"":""implementation""},{""name"":""enforced"",""type"":""Boolean"",""displayName"":""Enforced"",""description"":""Used to determine whether the platform dependency should be enforcedPlatform."",""example"":""true""}]","[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]"
 maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.AddProperty,Add Gradle property,Add a property to the `gradle.properties` file.,1,,Gradle,"[{""name"":""key"",""type"":""String"",""displayName"":""Property name"",""description"":""The name of the property to add."",""example"":""org.gradle.caching"",""required"":true},{""name"":""value"",""type"":""String"",""displayName"":""Property value"",""description"":""The value of the property to add."",""example"":""true"",""required"":true},{""name"":""overwrite"",""type"":""Boolean"",""displayName"":""Overwrite if exists"",""description"":""If a property with the same key exists, overwrite."",""example"":""true"",""required"":true},{""name"":""filePattern"",""type"":""String"",""displayName"":""File pattern"",""description"":""A glob expression that can be used to constrain which directories or source files should be searched. When not set, all source files are searched."",""example"":""**/*.properties""}]",
@@ -46,10 +47,11 @@ maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.UpgradeTransitiveDep
 maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.MigrateToGradle5,Migrate to Gradle 5 from Gradle 4,Migrate to version 5.x. See the Gradle upgrade guide from [version 4.x to 5.0](https://docs.gradle.org/current/userguide/upgrading_version_4.html) for more information.,2,,Gradle,,
 maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.MigrateToGradle6,Migrate to Gradle 6 from Gradle 5,Migrate to version 6.x. See the Gradle upgrade guide from [version 5.x to 6.0](https://docs.gradle.org/current/userguide/upgrading_version_5.html) for more information.,10,,Gradle,,
 maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.MigrateToGradle7,Migrate to Gradle 7 from Gradle 6,Migrate to version 7.x. See the Gradle upgrade guide from [version 6.x to 7.0](https://docs.gradle.org/current/userguide/upgrading_version_6.html) for more information.,13,,Gradle,,
-maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.MigrateToGradle8,Migrate to Gradle 8 from Gradle 7,Migrate to version 8.x. See the Gradle upgrade guide from [version 7.x to 8.0](https://docs.gradle.org/current/userguide/upgrading_version_7.html) and [version 8.x to latest](https://docs.gradle.org/current/userguide/upgrading_version_8.html) for more information.,21,,Gradle,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]"
+maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.MigrateToGradle8,Migrate to Gradle 8 from Gradle 7,Migrate to version 8.x. See the Gradle upgrade guide from [version 7.x to 8.0](https://docs.gradle.org/current/userguide/upgrading_version_7.html) and [version 8.x to latest](https://docs.gradle.org/current/userguide/upgrading_version_8.html) for more information.,35,,Gradle,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]"
+maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.UseAssignmentForPropertySyntax,Use `=` assignment syntax for well-known Gradle properties,"Converts deprecated Groovy DSL property assignment syntax from space/method-call form (e.g., `description 'text'` or `description('text')`) to assignment form (`description = 'text'`) for well-known Gradle project and task properties. See the [Gradle 8.14 upgrade guide](https://docs.gradle.org/8.14/userguide/upgrading_version_8.html#groovy_space_assignment_syntax) for more information.",14,,Gradle,,
 maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.AddJUnitPlatformLauncher,Add JUnit Platform Launcher,Add the JUnit Platform Launcher to the buildscript dependencies.,2,,Gradle,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]"
-maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.MigrateToGradle9,Migrate to Gradle 9 from Gradle 8,Migrate to version 9.x. See the Gradle upgrade guide from [version 8.x to 9.0](https://docs.gradle.org/9.0.0/userguide/upgrading_major_version_9.html) for more information.,24,,Gradle,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]"
-maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.GradleBestPractices,Apply Gradle best practices,"Apply a set of [Gradle best practices](https://docs.gradle.org/current/userguide/best_practices_general.html) to the build files, for more efficient and ideomatic builds.",30,,Gradle,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]"
+maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.MigrateToGradle9,Migrate to Gradle 9 from Gradle 8,Migrate to version 9.x. See the Gradle upgrade guide from [version 8.x to 9.0](https://docs.gradle.org/9.0.0/userguide/upgrading_major_version_9.html) for more information.,38,,Gradle,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]"
+maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.GradleBestPractices,Apply Gradle best practices,"Apply a set of [Gradle best practices](https://docs.gradle.org/current/userguide/best_practices_general.html) to the build files, for more efficient and ideomatic builds.",44,,Gradle,,"[{""name"":""org.openrewrite.maven.table.MavenMetadataFailures"",""displayName"":""Maven metadata failures"",""instanceName"":""Maven metadata failures"",""description"":""Attempts to resolve maven metadata that failed."",""columns"":[{""name"":""group"",""type"":""String"",""displayName"":""Group id"",""description"":""The groupId of the artifact for which the metadata download failed.""},{""name"":""artifactId"",""type"":""String"",""displayName"":""Artifact id"",""description"":""The artifactId of the artifact for which the metadata download failed.""},{""name"":""version"",""type"":""String"",""displayName"":""Version"",""description"":""The version of the artifact for which the metadata download failed.""},{""name"":""mavenRepositoryUri"",""type"":""String"",""displayName"":""Maven repository"",""description"":""The URL of the Maven repository that the metadata download failed on.""},{""name"":""snapshots"",""type"":""String"",""displayName"":""Snapshots"",""description"":""Does the repository support snapshots.""},{""name"":""releases"",""type"":""String"",""displayName"":""Releases"",""description"":""Does the repository support releases.""},{""name"":""failure"",""type"":""String"",""displayName"":""Failure"",""description"":""The reason the metadata download failed.""}]}]"
 maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.EnableGradleBuildCache,Enable Gradle build cache,"Enable the Gradle build cache. By enabling build cache the build outputs are stored externally and fetched from the cache when it is determined that those inputs have no changed, avoiding the expensive work of regenerating them. See the [Gradle Build Cache](https://docs.gradle.org/current/userguide/build_cache.html) for more information.",2,,Gradle,,
 maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.EnableGradleParallelExecution,Enable Gradle parallel execution,"Most builds consist of more than one project and some of those projects are usually independent of one another. Yet Gradle will only run one task at a time by default, regardless of the project structure. By using the `--parallel` switch, you can force Gradle to execute tasks in parallel as long as those tasks are in different projects. See the [Gradle performance documentation](https://docs.gradle.org/current/userguide/performance.html#parallel_execution) for more information.",2,,Gradle,,
 maven,org.openrewrite:rewrite-gradle,org.openrewrite.gradle.gradle8.JacocoReportDeprecations,Replace Gradle 8 introduced deprecations in JaCoCo report task,Set the `enabled` to `required` and the `destination` to `outputLocation` for Reports deprecations that were removed in gradle 8. See [the gradle docs on this topic](https://docs.gradle.org/current/userguide/upgrading_version_7.html#report_and_testreport_api_cleanup).,1,Gradle8,Gradle,,


Test patch:
diff --git a/rewrite-gradle/src/test/java/org/openrewrite/gradle/UsePropertyAssignmentSyntaxTest.java b/rewrite-gradle/src/test/java/org/openrewrite/gradle/UsePropertyAssignmentSyntaxTest.java
new file mode 100644
index 00000000000..6fa79e9fc44
--- /dev/null
+++ b/rewrite-gradle/src/test/java/org/openrewrite/gradle/UsePropertyAssignmentSyntaxTest.java
@@ -0,0 +1,185 @@
+/*
+ * Copyright 2025 the original author or authors.
+ * <p>
+ * Licensed under the Moderne Source Available License (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * https://docs.moderne.io/licensing/moderne-source-available-license
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.openrewrite.gradle;
+
+import org.junit.jupiter.api.Test;
+import org.openrewrite.DocumentExample;
+import org.openrewrite.test.RecipeSpec;
+import org.openrewrite.test.RewriteTest;
+
+import static org.openrewrite.gradle.Assertions.buildGradle;
+import static org.openrewrite.gradle.Assertions.buildGradleKts;
+
+class UsePropertyAssignmentSyntaxTest implements RewriteTest {
+
+    @Override
+    public void defaults(RecipeSpec spec) {
+        spec.recipe(new UsePropertyAssignmentSyntax("description"));
+    }
+
+    @DocumentExample
+    @Test
+    void spaceSyntaxConvertedToAssignment() {
+        rewriteRun(
+          buildGradle(
+            """
+              tasks.register('runLogic', JavaExec) {
+                  description 'My precious logic'
+                  classpath sourceSets.main.runtimeClasspath
+                  mainClass = 'my.org.logic.Logic'
+              }
+              """,
+            """
+              tasks.register('runLogic', JavaExec) {
+                  description = 'My precious logic'
+                  classpath sourceSets.main.runtimeClasspath
+                  mainClass = 'my.org.logic.Logic'
+              }
+              """
+          )
+        );
+    }
+
+    @Test
+    void parenthesizedSyntaxConvertedToAssignment() {
+        rewriteRun(
+          buildGradle(
+            """
+              tasks.register('runLogic', JavaExec) {
+                  description('My precious logic')
+              }
+              """,
+            """
+              tasks.register('runLogic', JavaExec) {
+                  description = 'My precious logic'
+              }
+              """
+          )
+        );
+    }
+
+    @Test
+    void alreadyAssignmentSyntaxUnchanged() {
+        rewriteRun(
+          buildGradle(
+            """
+              tasks.register('runLogic', JavaExec) {
+                  description = 'My precious logic'
+              }
+              """
+          )
+        );
+    }
+
+    @Test
+    void differentMethodNameUnchanged() {
+        rewriteRun(
+          buildGradle(
+            """
+              tasks.register('runLogic', JavaExec) {
+                  classpath sourceSets.main.runtimeClasspath
+              }
+              """
+          )
+        );
+    }
+
+    @Test
+    void nestedInClosure() {
+        rewriteRun(
+          buildGradle(
+            """
+              jar {
+                  description 'Build the jar'
+              }
+              """,
+            """
+              jar {
+                  description = 'Build the jar'
+              }
+              """
+          )
+        );
+    }
+
+    @Test
+    void doubleQuotedString() {
+        rewriteRun(
+          buildGradle(
+            """
+              jar {
+                  description "Build the jar"
+              }
+              """,
+            """
+              jar {
+                  description = "Build the jar"
+              }
+              """
+          )
+        );
+    }
+
+    @Test
+    void multipleOccurrences() {
+        rewriteRun(
+          buildGradle(
+            """
+              tasks.register('a', JavaExec) {
+                  description 'First'
+              }
+              tasks.register('b', JavaExec) {
+                  description 'Second'
+              }
+              """,
+            """
+              tasks.register('a', JavaExec) {
+                  description = 'First'
+              }
+              tasks.register('b', JavaExec) {
+                  description = 'Second'
+              }
+              """
+          )
+        );
+    }
+
+    @Test
+    void kotlinDslMethodCallUnchanged() {
+        rewriteRun(
+          buildGradleKts(
+            """
+              tasks.register<JavaExec>("runLogic") {
+                  description("My precious logic")
+              }
+              """
+          )
+        );
+    }
+
+    @Test
+    void noArgMethodCallUnchanged() {
+        rewriteRun(
+          buildGradle(
+            """
+              tasks.register('runLogic', JavaExec) {
+                  description()
+              }
+              """
+          )
+        );
+    }
+}