spring-security/build.gradle

129 lines
4.1 KiB
Groovy
Raw Normal View History

2013-06-20 12:40:54 -04:00
import groovy.text.SimpleTemplateEngine
buildscript {
repositories {
maven { url "http://repo.springsource.org/plugins-release" }
}
dependencies {
classpath("org.springframework.build.gradle:bundlor-plugin:0.1.2")
}
}
2013-07-15 12:00:01 -04:00
apply plugin: 'sonar-runner'
2010-03-28 18:54:41 -04:00
apply plugin: 'base'
description = 'Spring Security'
allprojects {
2012-06-29 13:59:22 -04:00
ext.releaseBuild = version.endsWith('RELEASE')
ext.snapshotBuild = version.endsWith('SNAPSHOT')
group = 'org.springframework.security'
repositories {
2013-06-20 12:40:54 -04:00
maven { url "http://repo.springsource.org/plugins-release" }
}
}
2013-07-15 12:00:01 -04:00
sonarRunner {
sonarProperties {
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"
}
}
2010-08-04 16:35:57 -04:00
// Set up different subproject lists for individual configuration
2012-06-29 13:59:22 -04:00
ext.javaProjects = subprojects.findAll { project -> project.name != 'docs' && project.name != 'faq' && project.name != 'manual' }
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
ext.aspectjProjects = [project(':spring-security-aspects'), project(':spring-security-samples-aspectj')]
2010-08-03 21:04:40 -04:00
configure(subprojects - coreModuleProjects) {
tasks.findByPath("artifactoryPublish")?.enabled = false
2013-07-15 12:00:01 -04:00
sonarRunner {
skipProject = true
}
}
2010-08-03 21:04:40 -04:00
configure(javaProjects) {
apply from: "$rootDir/gradle/javaprojects.gradle"
2012-12-13 11:04:52 -05:00
apply from: "$rootDir/gradle/release-checks.gradle"
2010-08-03 21:04:40 -04:00
}
configure(coreModuleProjects) {
apply plugin: 'bundlor'
apply from: "$rootDir/gradle/maven-deployment.gradle"
apply plugin: 'emma'
2010-08-03 21:04:40 -04:00
2013-06-20 12:40:54 -04:00
bundlor.doFirst {
def templateText = file("template.mf").text
bundlor.manifestTemplate = new SimpleTemplateEngine().createTemplate(templateText).make(bundlorProperties).toString()
}
2013-07-15 12:00:01 -04:00
configurations {
jacoco //Configuration Group used by Sonar to provide Code Coverage using JaCoCo
}
dependencies {
jacoco "org.jacoco:org.jacoco.agent:0.6.2.201302030002:runtime"
}
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-03 21:04:40 -04:00
configure (aspectjProjects) {
2013-06-20 12:40:54 -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 {
dependsOn coreModuleProjects*.tasks*.matching { task -> task.name == 'build' }
}
// Task for creating the distro zip
2010-08-03 21:04:40 -04:00
task dist(type: Zip) {
dependsOn subprojects*.tasks*.matching { task -> task.name == 'assemble' || task.name.endsWith('Zip') }
classifier = 'dist'
2010-08-24 17:36:42 -04:00
evaluationDependsOn(':docs')
def zipRootDir = "${project.name}-$version"
into(zipRootDir) {
from(rootDir) {
include '*.txt'
}
into('docs') {
with(project(':docs').apiSpec)
with(project(':docs:manual').spec)
}
into('dist') {
from coreModuleProjects.collect {project -> project.libsDir }
from project(':spring-security-samples-tutorial').libsDir
from project(':spring-security-samples-contacts').libsDir
}
}
2010-07-07 17:40:17 -04:00
}
artifacts {
archives dist
archives project(':docs').docsZip
archives project(':docs').schemaZip
2010-07-07 17:40:17 -04:00
}
apply from: "$rootDir/gradle/ide-integration.gradle"
2010-08-04 16:35:57 -04:00
task wrapper(type: Wrapper) {
2013-06-20 12:40:54 -04:00
gradleVersion = '1.6'
2010-08-04 16:35:57 -04:00
}