build.gradle 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. apply plugin: 'base'
  2. description = 'Spring Security'
  3. allprojects {
  4. version = '3.1.2.CI-SNAPSHOT'
  5. ext.releaseBuild = version.endsWith('RELEASE')
  6. ext.snapshotBuild = version.endsWith('SNAPSHOT')
  7. group = 'org.springframework.security'
  8. repositories {
  9. mavenCentral()
  10. }
  11. }
  12. // Set up different subproject lists for individual configuration
  13. ext.javaProjects = subprojects.findAll { project -> project.name != 'docs' && project.name != 'faq' && project.name != 'manual' }
  14. ext.sampleProjects = subprojects.findAll { project -> project.name.startsWith('spring-security-samples') }
  15. ext.itestProjects = subprojects.findAll { project -> project.name.startsWith('itest') }
  16. ext.coreModuleProjects = javaProjects - sampleProjects - itestProjects
  17. ext.aspectjProjects = [project(':spring-security-aspects'), project(':spring-security-samples-aspectj')]
  18. configure(javaProjects) {
  19. apply from: "$rootDir/gradle/javaprojects.gradle"
  20. }
  21. configure(coreModuleProjects) {
  22. // Gives better names in structure101 jar diagram
  23. sourceSets.main.output.classesDir = new File(buildDir, "classes/" + project.name.substring("spring-security".length() + 1))
  24. apply plugin: 'bundlor'
  25. bundlor.expansions = bundlorProperties
  26. apply from: "$rootDir/gradle/maven-deployment.gradle"
  27. apply plugin: 'emma'
  28. }
  29. task coreBuild {
  30. dependsOn coreModuleProjects*.tasks*.matching { task -> task.name == 'build' }
  31. }
  32. configure (aspectjProjects) {
  33. apply plugin: 'aspectj'
  34. }
  35. // Task for creating the distro zip
  36. task dist(type: Zip) {
  37. dependsOn subprojects*.tasks*.matching { task -> task.name == 'assemble' }
  38. evaluationDependsOn(':docs')
  39. def zipRootDir = "${project.name}-$version"
  40. into(zipRootDir) {
  41. from(rootDir) {
  42. include '*.txt'
  43. }
  44. into('docs') {
  45. with(project(':docs').apiSpec)
  46. with(project(':docs:manual').spec)
  47. }
  48. into('dist') {
  49. from coreModuleProjects.collect {project -> project.libsDir }
  50. from project(':spring-security-samples-tutorial').libsDir
  51. from project(':spring-security-samples-contacts').libsDir
  52. }
  53. }
  54. }
  55. task uploadDist(type: S3DistroUpload) {
  56. archiveFile = dist.archivePath
  57. projectKey = 'SEC'
  58. }
  59. apply from: "$rootDir/gradle/ide-integration.gradle"
  60. task wrapper(type: Wrapper) {
  61. gradleVersion = '1.0'
  62. }