Skip to content

binkley/gradle-multiple-test-roots

Repository files navigation

Public Domain

Gradle multiple test roots

A demo multi-module project for Gradle test sets

build issues vulnerabilities license

Usage

./gradlew --no-build-cache build taskTree

After building at least once, you can see the impact of the build cache:

./gradlew build taskTree

Gradle task tree pretty prints the tasks that would run.

Maintenance

To update Gradle:

$ ${EDITOR-vi} gradle.properties
# Edit the Gradle version
$ ./gradlew wrapper

Structure

  • [ab]/src/main/* - Production code and resources
  • [ab]/src/test/* - Unit test code and resources
  • [ab]/src/integrationTest/* - Integration test code and resources

Module a depends on module b.

Build features

  • All version details externalized to gradle.properties
  • Java
  • Build dashboard — top-level view of Gradle reports
  • JaCoCo — code coverage
  • Task tree — display task dependencies
  • Test sets — multiple test source roots
  • Versions — update to latest plugin/dependency versions

Notes

In a single-module project, lombok.config would normally be stored as src/lombok.config relative to the project root. However, so that this file can be shared among multiple modules, it is kept in the project root for this repository.

TODO

  • Something broke with SpotBugs Gradle plugin between Gradle 6.3 and 6.4.1

About

Example with multiple test roots using Gradle

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published