2013-06-20 12:40:54 -04:00
|
|
|
buildscript {
|
2015-03-23 12:14:26 -04:00
|
|
|
repositories {
|
|
|
|
maven { url "https://repo.spring.io/plugins-release" }
|
2017-01-04 10:51:16 -05:00
|
|
|
maven { url "https://repo.spring.io/plugins-snapshot" }
|
2015-03-23 12:14:26 -04:00
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
classpath("org.springframework.build.gradle:propdeps-plugin:0.0.7")
|
2017-01-04 10:51:16 -05:00
|
|
|
classpath("io.spring.gradle:spring-io-plugin:0.0.6.RELEASE")
|
2016-03-14 21:20:25 -04:00
|
|
|
classpath("com.bmuschko:gradle-tomcat-plugin:2.2.4")
|
2015-03-23 12:14:26 -04:00
|
|
|
classpath('me.champeau.gradle:gradle-javadoc-hotfix-plugin:0.1')
|
|
|
|
classpath('org.asciidoctor:asciidoctor-gradle-plugin:1.5.1')
|
2015-04-07 10:17:48 -04:00
|
|
|
classpath("io.spring.gradle:docbook-reference-plugin:0.3.1")
|
2017-01-04 10:51:16 -05:00
|
|
|
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.0.BUILD-SNAPSHOT")
|
2015-03-23 12:14:26 -04:00
|
|
|
}
|
2013-06-20 12:40:54 -04:00
|
|
|
}
|
|
|
|
|
2016-03-14 02:38:42 -04:00
|
|
|
plugins {
|
2016-09-19 15:02:20 -04:00
|
|
|
id "org.sonarqube" version "2.1-rc1"
|
2016-03-14 02:38:42 -04:00
|
|
|
}
|
|
|
|
|
2010-03-28 18:54:41 -04:00
|
|
|
apply plugin: 'base'
|
2010-01-19 23:14:48 -05:00
|
|
|
|
2011-04-21 06:57:18 -04:00
|
|
|
description = 'Spring Security'
|
|
|
|
|
2009-12-04 16:33:17 -05:00
|
|
|
allprojects {
|
2015-03-23 12:14:26 -04:00
|
|
|
apply plugin: 'idea'
|
|
|
|
apply plugin: 'eclipse'
|
2013-08-08 17:29:43 -04:00
|
|
|
|
2015-03-23 12:14:26 -04:00
|
|
|
ext.releaseBuild = version.endsWith('RELEASE')
|
|
|
|
ext.snapshotBuild = version.endsWith('SNAPSHOT')
|
2016-12-21 09:54:09 -05:00
|
|
|
ext.springVersion = '4.3.5.RELEASE'
|
2016-11-09 17:54:10 -05:00
|
|
|
ext.springLdapVersion = '2.2.0.RELEASE'
|
2010-01-21 00:28:17 -05:00
|
|
|
|
2015-03-23 12:14:26 -04:00
|
|
|
group = 'org.springframework.security'
|
2010-01-12 19:44:05 -05:00
|
|
|
|
2015-03-23 12:14:26 -04:00
|
|
|
repositories {
|
2015-03-25 16:18:59 -04:00
|
|
|
mavenCentral()
|
|
|
|
maven { url "https://repo.spring.io/libs-snapshot" }
|
|
|
|
maven { url "https://repo.spring.io/plugins-release" }
|
|
|
|
maven { url "http://repo.terracotta.org/maven2/" }
|
2015-03-23 12:14:26 -04:00
|
|
|
}
|
2013-08-08 17:29:43 -04:00
|
|
|
|
2009-12-04 16:33:17 -05:00
|
|
|
}
|
|
|
|
|
2016-03-14 02:38:42 -04:00
|
|
|
sonarqube {
|
|
|
|
properties {
|
2015-03-23 12:14:26 -04:00
|
|
|
property "sonar.java.coveragePlugin", "jacoco"
|
|
|
|
property "sonar.projectName", "Spring Security"
|
|
|
|
property "sonar.jacoco.reportPath", "${buildDir.name}/jacoco.exec"
|
|
|
|
property "sonar.links.homepage", 'https://www.springsource.org/spring-security'
|
|
|
|
property "sonar.links.ci", 'https://build.springsource.org/browse/SEC-B32X'
|
|
|
|
property "sonar.links.issue", 'https://jira.springsource.org/browse/SEC'
|
|
|
|
property "sonar.links.scm", 'https://github.com/SpringSource/spring-security'
|
|
|
|
property "sonar.links.scm_dev", 'https://github.com/SpringSource/spring-security.git'
|
|
|
|
property "sonar.java.coveragePlugin", "jacoco"
|
|
|
|
}
|
2013-07-15 12:00:01 -04:00
|
|
|
}
|
|
|
|
|
2010-08-04 16:35:57 -04:00
|
|
|
// Set up different subproject lists for individual configuration
|
2013-12-09 16:51:49 -05:00
|
|
|
ext.javaProjects = subprojects.findAll { project -> project.name != 'docs' && project.name != 'manual' && project.name != 'guides' && project.name != 'spring-security-bom' }
|
2012-06-29 13:59:22 -04:00
|
|
|
ext.sampleProjects = subprojects.findAll { project -> project.name.startsWith('spring-security-samples') }
|
|
|
|
ext.itestProjects = subprojects.findAll { project -> project.name.startsWith('itest') }
|
|
|
|
ext.coreModuleProjects = javaProjects - sampleProjects - itestProjects
|
2016-04-11 10:47:06 -04:00
|
|
|
ext.aspectjProjects = [project(':spring-security-aspects'), project(':spring-security-samples-xml-aspectj'), project(':spring-security-samples-javaconfig-aspectj')]
|
2010-08-03 21:04:40 -04:00
|
|
|
|
2013-08-05 11:37:37 -04:00
|
|
|
configure(allprojects - javaProjects) {
|
2015-03-23 12:14:26 -04:00
|
|
|
task afterEclipseImport {
|
|
|
|
ext.srcFile = file('.classpath')
|
|
|
|
inputs.file srcFile
|
|
|
|
outputs.dir srcFile
|
2013-08-05 11:37:37 -04:00
|
|
|
|
2015-03-23 12:14:26 -04:00
|
|
|
onlyIf { !srcFile.exists() }
|
2013-08-05 11:37:37 -04:00
|
|
|
|
2015-03-23 12:14:26 -04:00
|
|
|
doLast {
|
|
|
|
srcFile << """<?xml version="1.0" encoding="UTF-8"?>
|
2013-08-05 11:37:37 -04:00
|
|
|
<classpath>
|
2015-03-23 12:14:26 -04:00
|
|
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
|
|
|
<classpathentry kind="output" path="bin"/>
|
2013-08-05 11:37:37 -04:00
|
|
|
</classpath>
|
|
|
|
"""
|
2015-03-23 12:14:26 -04:00
|
|
|
}
|
|
|
|
}
|
2013-08-05 11:37:37 -04:00
|
|
|
}
|
|
|
|
|
2016-04-11 10:47:06 -04:00
|
|
|
configure(subprojects - coreModuleProjects - project(':spring-security-samples-javaconfig-messages') - project(':spring-security-bom')) {
|
2015-03-23 12:14:26 -04:00
|
|
|
tasks.findByPath("artifactoryPublish")?.enabled = false
|
2016-03-14 02:38:42 -04:00
|
|
|
sonarqube {
|
2015-03-23 12:14:26 -04:00
|
|
|
skipProject = true
|
|
|
|
}
|
2012-12-12 19:04:10 -05:00
|
|
|
}
|
|
|
|
|
2010-08-03 21:04:40 -04:00
|
|
|
configure(javaProjects) {
|
2015-03-23 12:14:26 -04:00
|
|
|
ext.TOMCAT_GRADLE = "$rootDir/gradle/tomcat.gradle"
|
|
|
|
ext.WAR_SAMPLE_GRADLE = "$rootDir/gradle/war-sample.gradle"
|
2016-04-28 13:25:52 -04:00
|
|
|
ext.BOOT_SAMPLE_GRADLE = "$rootDir/gradle/boot-sample.gradle"
|
2015-03-23 12:14:26 -04:00
|
|
|
apply from: "$rootDir/gradle/javaprojects.gradle"
|
2016-03-14 01:02:07 -04:00
|
|
|
if(!project.name.contains('gae')) {
|
|
|
|
apply from: "$rootDir/gradle/checkstyle.gradle"
|
|
|
|
}
|
2016-03-14 01:03:54 -04:00
|
|
|
apply from: "$rootDir/gradle/ide.gradle"
|
2015-03-23 12:14:26 -04:00
|
|
|
apply from: "$rootDir/gradle/release-checks.gradle"
|
|
|
|
apply from: "$rootDir/gradle/maven-deployment.gradle"
|
2010-08-03 21:04:40 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
configure(coreModuleProjects) {
|
2015-03-23 12:14:26 -04:00
|
|
|
apply plugin: 'emma'
|
|
|
|
apply plugin: 'spring-io'
|
|
|
|
|
2016-07-12 11:07:49 -04:00
|
|
|
ext.springIoVersion = project.hasProperty('platformVersion') ? platformVersion : 'Athens-BUILD-SNAPSHOT'
|
2015-03-23 12:14:26 -04:00
|
|
|
|
|
|
|
configurations {
|
|
|
|
jacoco //Configuration Group used by Sonar to provide Code Coverage using JaCoCo
|
|
|
|
}
|
|
|
|
|
2015-07-08 06:39:09 -04:00
|
|
|
dependencyManagement {
|
|
|
|
springIoTestRuntime {
|
|
|
|
imports {
|
2017-01-09 16:30:50 -05:00
|
|
|
mavenBom("io.spring.platform:platform-bom:${springIoVersion}") {
|
|
|
|
bomProperties([
|
|
|
|
'mockito.version': '1.10.19'
|
|
|
|
])
|
|
|
|
}
|
2015-07-08 06:39:09 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-03-23 12:14:26 -04:00
|
|
|
dependencies {
|
2015-08-03 10:45:42 -04:00
|
|
|
jacoco "org.jacoco:org.jacoco.agent:0.7.5.201505241946:runtime"
|
2015-03-23 12:14:26 -04:00
|
|
|
}
|
|
|
|
test {
|
|
|
|
jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=${project.group}.*"
|
|
|
|
}
|
|
|
|
integrationTest {
|
|
|
|
jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=${project.group}.*"
|
|
|
|
}
|
2010-08-24 13:27:44 -04:00
|
|
|
}
|
|
|
|
|
2010-08-03 21:04:40 -04:00
|
|
|
configure (aspectjProjects) {
|
2015-03-23 12:14:26 -04:00
|
|
|
apply plugin: 'java'
|
|
|
|
apply plugin: 'aspectj'
|
2010-08-03 21:04:40 -04:00
|
|
|
}
|
|
|
|
|
2013-06-20 12:40:54 -04:00
|
|
|
task coreBuild {
|
2015-03-23 12:14:26 -04:00
|
|
|
dependsOn coreModuleProjects*.tasks*.matching { task -> task.name == 'build' }
|
2013-06-20 12:40:54 -04:00
|
|
|
}
|
|
|
|
|
2015-09-02 00:19:13 -04:00
|
|
|
task coreInstall {
|
|
|
|
dependsOn coreModuleProjects*.tasks*.matching { task -> task.name == 'install' }
|
|
|
|
}
|
|
|
|
|
2011-04-21 06:57:18 -04:00
|
|
|
// Task for creating the distro zip
|
2010-08-03 21:04:40 -04:00
|
|
|
|
2011-04-21 06:57:18 -04:00
|
|
|
task dist(type: Zip) {
|
2015-10-26 15:04:17 -04:00
|
|
|
dependsOn { subprojects*.tasks*.matching { task -> task.name.endsWith('generatePom') } }
|
2015-03-23 12:14:26 -04:00
|
|
|
classifier = 'dist'
|
|
|
|
|
|
|
|
evaluationDependsOn(':docs')
|
|
|
|
evaluationDependsOn(':docs:manual')
|
|
|
|
|
|
|
|
def zipRootDir = "${project.name}-$version"
|
|
|
|
into(zipRootDir) {
|
|
|
|
from(rootDir) {
|
|
|
|
include '*.adoc'
|
2015-10-26 15:04:17 -04:00
|
|
|
include '*.txt'
|
2015-03-23 12:14:26 -04:00
|
|
|
}
|
|
|
|
into('docs') {
|
|
|
|
with(project(':docs').apiSpec)
|
|
|
|
with(project(':docs:manual').spec)
|
|
|
|
with(project(':docs:guides').spec)
|
|
|
|
}
|
2015-10-26 15:04:17 -04:00
|
|
|
project.coreModuleProjects*.tasks*.withType(AbstractArchiveTask).flatten().each{ archiveTask ->
|
|
|
|
if(archiveTask!=dist){
|
|
|
|
into("$zipRootDir/dist") {
|
|
|
|
from archiveTask.outputs.files
|
|
|
|
}
|
|
|
|
}
|
2015-03-23 12:14:26 -04:00
|
|
|
}
|
|
|
|
sampleProjects.each { project->
|
|
|
|
into("$zipRootDir/samples/$project.name") {
|
|
|
|
from(project.projectDir) {
|
|
|
|
include "src/main/**"
|
|
|
|
include "pom.xml"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2010-07-07 17:40:17 -04:00
|
|
|
}
|
|
|
|
|
2012-08-08 15:16:37 -04:00
|
|
|
artifacts {
|
2015-03-23 12:14:26 -04:00
|
|
|
archives dist
|
|
|
|
archives project(':docs').docsZip
|
|
|
|
archives project(':docs').schemaZip
|
2010-07-07 17:40:17 -04:00
|
|
|
}
|