Remove empty buildscript block

Apache 2.0

Removes a buildscript block from build.gradle(.kts) or settings.gradle(.kts) when it contributes nothing to the build. A block containing only other empty blocks, such as an empty dependencies or repositories block, is also considered empty. A block containing a comment is left alone, so that no comment is silently deleted.

org.openrewrite.gradle.RemoveEmptyBuildscriptBlock
mod run . --recipe=org.openrewrite.gradle.RemoveEmptyBuildscriptBlock

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