slugstack-rewrite-java-definitions
openrewrite examples, samples, and definitions
uses jenv
for .java-version
management
EncapsulateData
usage
See the main openrewrite
documentation regarding Recipes
and Environment
; nobody is actually reading this except future-me, and this is really just an exercise to mentally reinforce the configuration and usage flow.
scratchpad notes
configure<nebula.plugin.release.git.base.ReleasePluginExtension> {
defaultVersionStrategy = nebula.plugin.release.NetflixOssStrategies.SNAPSHOT(project)
}
dependency locking: when adding new plugins, needed to perform --write-locks
initially for consumption.
./gradlew rewriteDiscover
./gradlew wrapper --gradle-version=7.1-20210318230057+0000
a declarative recipe shouldn't have it's class equivalent defined in the same project. as in, this will cause a stackoverflow:
---
type: specs.openrewrite.org/v1beta/recipe
name: io.slugstack.rewritejavarecipes.EncapsulateData # <-- same name
recipeList:
- io.slugstack.rewritejavarecipes.EncapsulateData # <-- same name
you shouldn't have to do this to begin with, but it's just an interesting thing to note that the error is a stackoverflow. just pointing it out in case it comes up.