build.gradle 2.3 KB

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