Use filePermissions and dirPermissions instead of fileMode and dirMode

MSAL

CopyProcessingSpec.fileMode and dirMode are deprecated since Gradle 8.8 and removed in Gradle 9, where setting them fails. filePermissions { unix(..) } and dirPermissions { unix(..) } exist since Gradle 8.3. Integer literals inside Copy, Sync, archive task and copy spec blocks are moved as they are written, so Groovy's octal 0644 stays 0644 and Kotlin's decimal 420 stays 420, both the same permission bits. Computed values such as "755".toInt(8), reads, details.mode, unknown task types and Nebula's packaging tasks are left alone. See the Gradle upgrade guide for more information.

org.openrewrite.gradle.migrate.tasks.UseFilePermissions
mod run . --recipe=org.openrewrite.gradle.migrate.tasks.UseFilePermissions

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.