build.gradle 2.3 KB

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