build.gradle 1.7 KB

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