build.gradle 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. buildscript {
  2. dependencies {
  3. classpath 'io.spring.gradle:spring-build-conventions:0.0.23.RELEASE'
  4. classpath "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion"
  5. classpath 'io.spring.nohttp:nohttp-gradle:0.0.5.RELEASE'
  6. classpath "io.freefair.gradle:aspectj-plugin:4.0.2"
  7. }
  8. repositories {
  9. maven {
  10. url = 'https://repo.spring.io/plugins-snapshot'
  11. if (project.hasProperty('artifactoryUsername')) {
  12. credentials {
  13. username "$artifactoryUsername"
  14. password "$artifactoryPassword"
  15. }
  16. }
  17. }
  18. maven { url 'https://plugins.gradle.org/m2/' }
  19. }
  20. }
  21. apply plugin: 'io.spring.nohttp'
  22. apply plugin: 'io.spring.convention.root'
  23. group = 'org.springframework.security'
  24. description = 'Spring Security'
  25. ext.snapshotBuild = version.contains("SNAPSHOT")
  26. ext.releaseBuild = version.contains("SNAPSHOT")
  27. ext.milestoneBuild = !(snapshotBuild || releaseBuild)
  28. dependencyManagementExport.projects = subprojects.findAll { !it.name.contains('-boot') }
  29. repositories {
  30. mavenCentral()
  31. }
  32. subprojects {
  33. plugins.withType(JavaPlugin) {
  34. project.sourceCompatibility='1.8'
  35. }
  36. tasks.withType(JavaCompile) {
  37. options.encoding = "UTF-8"
  38. }
  39. }
  40. if (project.hasProperty('artifactoryUsername')) {
  41. allprojects { project ->
  42. project.repositories { repos ->
  43. all { repo ->
  44. if (!repo.url.toString().startsWith("https://repo.spring.io/")) {
  45. return;
  46. }
  47. repo.credentials {
  48. username = artifactoryUsername
  49. password = artifactoryPassword
  50. }
  51. }
  52. }
  53. }
  54. }