build.gradle 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. apply plugin: 'base'
  2. allprojects {
  3. version = '3.1.0.CI-SNAPSHOT'
  4. releaseBuild = version.endsWith('RELEASE')
  5. snapshotBuild = version.endsWith('SNAPSHOT')
  6. group = 'org.springframework.security'
  7. repositories {
  8. mavenRepo name:'Local', urls: "file://" + System.properties['user.home'] + "/.m2/repository"
  9. mavenCentral()
  10. mavenRepo name: 'SpringSource Milestone Repo', urls: 'http://repository.springsource.com/maven/bundles/milestone'
  11. mavenRepo name: 'SpringSource Maven Snapshot Repo', urls: 'http://maven.springframework.org/snapshot/'
  12. mavenRepo name: 'SpringSource Enterprise Release', urls: 'http://repository.springsource.com/maven/bundles/release'
  13. mavenRepo name: 'SpringSource Enterprise External', urls: 'http://repository.springsource.com/maven/bundles/external'
  14. // mavenRepo(name: 'Spock Snapshots', urls: 'http://m2repo.spockframework.org/snapshots')
  15. }
  16. }
  17. // Set up different subproject lists for individual configuration
  18. javaProjects = subprojects.findAll { project -> project.name != 'docs' && project.name != 'faq' && project.name != 'manual' }
  19. sampleProjects = subprojects.findAll { project -> project.name.startsWith('spring-security-samples') }
  20. itestProjects = subprojects.findAll { project -> project.name.startsWith('itest') }
  21. coreModuleProjects = javaProjects - sampleProjects - itestProjects
  22. aspectjProjects = [project(':spring-security-aspects'), project(':spring-security-samples-aspectj')]
  23. releaseProjects = coreModuleProjects + project(':spring-security-aspects')
  24. configure(javaProjects) {
  25. apply from: "$rootDir/gradle/javaprojects.gradle"
  26. }
  27. configure(coreModuleProjects) {
  28. apply from: "$rootDir/gradle/bundlor.gradle"
  29. apply from: "$rootDir/gradle/maven-deployment.gradle"
  30. apply from: "$rootDir/gradle/emma.gradle"
  31. // Gives better names in structure101 jar diagram
  32. sourceSets.main.classesDir = new File(buildDir, "classes/" + project.name.substring("spring-security".length() + 1))
  33. }
  34. configure (aspectjProjects) {
  35. apply from: "$rootDir/gradle/aspectj.gradle"
  36. }
  37. apply from: "$rootDir/gradle/dist.gradle"
  38. allprojects {
  39. apply plugin: 'idea'
  40. apply plugin: 'eclipse'
  41. def config = configurations.findByName('testRuntime')
  42. if (!config) {
  43. return
  44. }
  45. ideaModule {
  46. downloadJavadoc=false
  47. excludeDirs.add(buildDir)
  48. gradleCacheVariable = 'GRADLE_CACHE'
  49. outputDir = "$rootProject.projectDir/intellij/out" as File
  50. testOutputDir = "$rootProject.projectDir/intellij/testOut" as File
  51. }
  52. }
  53. ideaModule {
  54. excludeDirs += file('.gradle')
  55. excludeDirs += file('buildSrc/build')
  56. excludeDirs += file('buildSrc/.gradle')
  57. }
  58. ideaProject {
  59. javaVersion = '1.6'
  60. withXml { node ->
  61. // Use git
  62. def vcsConfig = node.component.find { it.'@name' == 'VcsDirectoryMappings' }
  63. vcsConfig.mapping[0].'@vcs' = 'Git'
  64. }
  65. }
  66. task wrapper(type: Wrapper) {
  67. gradleVersion = '0.9-rc-1'
  68. jarPath = 'gradle/wrapper'
  69. }