build.gradle 2.6 KB

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