build.gradle 846 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. plugins {
  2. id "checkstyle"
  3. id "io.spring.javaformat" version "0.0.25"
  4. id 'io.spring.nohttp' version '0.0.5.RELEASE'
  5. }
  6. allprojects {
  7. apply plugin: 'checkstyle'
  8. apply plugin: 'io.spring.javaformat'
  9. dependencies {
  10. checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:0.0.25"
  11. }
  12. // Ensure every test task has at least a single test
  13. tasks.withType(Test).configureEach {
  14. afterSuite { desc, result ->
  15. if (result.testCount == 0) {
  16. throw new IllegalStateException("No tests were found. Ensure that useJUnitPlatform was used.")
  17. }
  18. }
  19. }
  20. }
  21. repositories {
  22. mavenCentral()
  23. }
  24. tasks.register('runAllTests') {
  25. var allTasks = rootProject.getAllTasks(true)
  26. var allTestsTasks = allTasks.values().collect { t ->
  27. t.findAll { it.name == 'test' || it.name == 'integrationTest' }
  28. }.flatten()
  29. it.dependsOn {
  30. allTestsTasks
  31. }
  32. }