build.gradle 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. buildscript {
  2. dependencies {
  3. classpath 'io.spring.gradle:spring-build-conventions:0.0.15.RELEASE'
  4. classpath "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion"
  5. }
  6. repositories {
  7. maven { url 'https://repo.spring.io/plugins-snapshot' }
  8. }
  9. }
  10. apply plugin: 'io.spring.convention.root'
  11. group = 'org.springframework.security'
  12. description = 'Spring Security'
  13. ext.snapshotBuild = version.contains("SNAPSHOT")
  14. ext.releaseBuild = version.contains("SNAPSHOT")
  15. ext.milestoneBuild = !(snapshotBuild || releaseBuild)
  16. dependencyManagementExport.projects = subprojects.findAll { !it.name.contains('-boot') }
  17. // Disable JaCoCo when not explicitly requested to enable caching of test
  18. // See https://discuss.gradle.org/t/do-not-cache-if-condition-matched-jacoco-agent-configured-with-append-true-satisfied/23504
  19. gradle.taskGraph.whenReady { graph ->
  20. def enabled = graph.allTasks.any { it instanceof JacocoReport }
  21. subprojects { project ->
  22. project.plugins.withType(JacocoPlugin) {
  23. project.tasks.withType(Test) {
  24. jacoco.enabled = enabled
  25. }
  26. }
  27. }
  28. }