At present, generated Gradle build scripts that use Groovy DSL configure
tasks eagerly. This is both suboptimal and actually not aligned with the
generated build scripts that use Kotlin DSL, which configures tasks
lazily.
This commit updates `GroovyDslGradleBuildWriter` to ensure tasks are
configured lazily.
See gh-1292
This commit improves the handling of repositories with Maven.
Previously, the writer wrongly assumed that the default for releases
and snapshots are true and false respectively. However, both defaults
are true which means that snapshots repository are considered for
releases, and releases repositories are considered for snapshots.
MavenRepository has now separate flags for those and the writer makes
sure to only update the `enabled` flag if the chosen value is not
true. This doesn't increase the content for repository definitions
while offering better performance for dependencies resolution.
Closes gh-1226
This commit also upgrades the test suite to use a more recent version as
removing support for JUnit4 effectively removes support for those as
well.
Closes gh-1219
Using Spring Boot DevTools requires customizers for both the Maven and
the Gradle build. While the library can't have an opinion about the id
of the "devtools" dependency, it can provide the logic with a
configurable dependency identifier.
This commit adds such configurable customizers.
Closes gh-1135
Previously we negated the exclusions for all of src/main and src/test.
This was done to prevent any content under src/main or src/test that
matched the build output directories (build/ out/, and target/) from
being ignored. While concise, this approach has proven to be overly
broad as it undoes all exclusions and not just those for the build
output directories.
This commit switches to individual negations for each of the build
output directories that we ignore. While more verbose, this narrows
the negations to match their original intent and perhaps also makes
it easier to infer that intent from the generated .gitignore file.
Closes gh-1106
Spring Boot 2.4 has switched from providing JUnit 5 in the test starter
(JUnit Jupiter and the JUnit Vintage Engine) to only providing JUnit
Jupiter. As such, the exclusion of junit-vintage-engine is no longer
required for projects that are using Spring Boot 2.4.
Closes gh-1095