build.gradle 1.2 KB

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