|
| 1 | +apply plugin: 'org.openrewrite.rewrite' |
| 2 | + |
| 3 | +rewrite { |
| 4 | + activeRecipe( |
| 5 | + "tech.picnic.errorprone.refasterrules.StringRulesRecipes", |
| 6 | + //"org.openrewrite.gradle.GradleBestPractices", |
| 7 | + //"org.openrewrite.java.OrderImports", |
| 8 | + //"org.openrewrite.java.RemoveUnusedImports", |
| 9 | + //"org.openrewrite.java.format.RemoveTrailingWhitespace", |
| 10 | + //"org.openrewrite.java.migrate.UpgradeToJava17", |
| 11 | + //"org.openrewrite.java.migrate.util.MigrateCollectionsSingletonList", |
| 12 | + //"org.openrewrite.java.migrate.util.MigrateCollectionsUnmodifiableList", |
| 13 | + //"org.openrewrite.java.recipes.JavaRecipeBestPractices", |
| 14 | + //"org.openrewrite.java.recipes.RecipeNullabilityBestPractices", |
| 15 | + //"org.openrewrite.java.recipes.RecipeTestingBestPractices", |
| 16 | + //"org.openrewrite.staticanalysis.CodeCleanup", |
| 17 | + //"org.openrewrite.staticanalysis.EmptyBlock", |
| 18 | + //"org.openrewrite.staticanalysis.EqualsAvoidsNull", |
| 19 | + //"org.openrewrite.staticanalysis.JavaApiBestPractices", |
| 20 | + //"org.openrewrite.staticanalysis.MissingOverrideAnnotation", |
| 21 | + //"org.openrewrite.staticanalysis.ModifierOrder", |
| 22 | + //"org.openrewrite.staticanalysis.NoFinalizer", |
| 23 | + //"org.openrewrite.staticanalysis.RemoveCallsToSystemGc", |
| 24 | + //"org.openrewrite.staticanalysis.RemoveUnneededAssertion", |
| 25 | + //"org.openrewrite.staticanalysis.RemoveUnusedLocalVariables", |
| 26 | + //"org.openrewrite.staticanalysis.RemoveUnusedPrivateFields", |
| 27 | + //"org.openrewrite.staticanalysis.RemoveUnusedPrivateMethods", |
| 28 | + //"org.openrewrite.staticanalysis.StringLiteralEquality", |
| 29 | + //"org.openrewrite.staticanalysis.UnnecessaryParentheses", |
| 30 | + //"org.openrewrite.staticanalysis.UnnecessaryThrows", |
| 31 | + //"org.openrewrite.text.EndOfLineAtEndOfFile", |
| 32 | + //"tech.picnic.errorprone.refasterrules.CollectionRulesRecipes", |
| 33 | + //"tech.picnic.errorprone.refasterrules.FileRulesRecipes", |
| 34 | + //"tech.picnic.errorprone.refasterrules.NullRulesRecipes", |
| 35 | + //"tech.picnic.errorprone.refasterrules.StreamRulesRecipes", |
| 36 | + ) |
| 37 | + // bugs |
| 38 | + exclusions.add("**package-info.java") |
| 39 | + exclusions.add("**AJacksonFormatterFunc.java") |
| 40 | + exclusions.add("**gradle/java-publish.gradle") |
| 41 | + failOnDryRunResults = true |
| 42 | +} |
| 43 | + |
| 44 | +// off switch for release: ' -x check' or ' -x rewriteDryRun' |
| 45 | +//tasks { |
| 46 | +// check.dependsOn(rewriteDryRun) |
| 47 | +//} |
| 48 | + |
| 49 | +// > Task :rewriteDryRun FAILED |
| 50 | +// |
| 51 | +//2 problems were found storing the configuration cache. |
| 52 | +//- Task `:rewriteDryRun` of type `org.openrewrite.gradle.RewriteDryRunTask`: cannot serialize object of type 'org.gradle.api.internal.project.DefaultProject', a subtype of 'org.gradle.api.Project', as these are not supported with the configuration cache. |
| 53 | +// See https://docs.gradle.org/8.14.3/userguide/configuration_cache.html#config_cache:requirements:disallowed_types |
| 54 | +//- Task `:rewriteDryRun` of type `org.openrewrite.gradle.RewriteDryRunTask`: invocation of 'Task.project' at execution time is unsupported. |
| 55 | +// See https://docs.gradle.org/8.14.3/userguide/configuration_cache.html#config_cache:requirements:use_project_during_execution |
| 56 | + |
| 57 | +// FAILURE: Build failed with an exception. |
| 58 | +// |
| 59 | +//* What went wrong: |
| 60 | +//Execution failed for task ':rewriteDryRun'. |
| 61 | +//> java.lang.RuntimeException: Applying recipes would make changes. See logs for more details. |
0 commit comments