build.gradle 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. maven { url "http://repo.springsource.org/libs-snapshot" }
  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(subprojects - coreModuleProjects) {
  18. tasks.findByPath("artifactoryPublish")?.enabled = false
  19. }
  20. configure(javaProjects) {
  21. apply from: "$rootDir/gradle/javaprojects.gradle"
  22. }
  23. configure(coreModuleProjects) {
  24. // Gives better names in structure101 jar diagram
  25. sourceSets.main.output.classesDir = new File(buildDir, "classes/" + project.name.substring("spring-security".length() + 1))
  26. apply plugin: 'bundlor'
  27. bundlor.expansions = bundlorProperties
  28. apply from: "$rootDir/gradle/maven-deployment.gradle"
  29. apply plugin: 'emma'
  30. }
  31. task coreBuild {
  32. dependsOn coreModuleProjects*.tasks*.matching { task -> task.name == 'build' }
  33. }
  34. configure (aspectjProjects) {
  35. apply plugin: 'aspectj'
  36. }
  37. // Task for creating the distro zip
  38. task dist(type: Zip) {
  39. dependsOn subprojects*.tasks*.matching { task -> task.name == 'assemble' || task.name.endsWith('Zip') }
  40. classifier = 'dist'
  41. evaluationDependsOn(':docs')
  42. def zipRootDir = "${project.name}-$version"
  43. into(zipRootDir) {
  44. from(rootDir) {
  45. include '*.txt'
  46. }
  47. into('docs') {
  48. with(project(':docs').apiSpec)
  49. with(project(':docs:manual').spec)
  50. }
  51. into('dist') {
  52. from coreModuleProjects.collect {project -> project.libsDir }
  53. from project(':spring-security-samples-tutorial').libsDir
  54. from project(':spring-security-samples-contacts').libsDir
  55. }
  56. }
  57. }
  58. artifacts {
  59. archives dist
  60. archives project(':docs').docsZip
  61. archives project(':docs').schemaZip
  62. }
  63. apply from: "$rootDir/gradle/ide-integration.gradle"
  64. task wrapper(type: Wrapper) {
  65. gradleVersion = '1.3'
  66. }