spring-security/gradle/javaprojects.gradle

141 lines
5.1 KiB
Groovy
Raw Permalink Normal View History

2010-03-28 23:54:41 +01:00
apply plugin: 'java'
2013-09-11 15:42:53 -07:00
apply plugin: 'javadocHotfix'
2010-03-28 23:54:41 +01:00
apply plugin: 'eclipse'
2010-03-05 23:20:15 +00:00
2012-10-01 14:46:37 -05:00
sourceCompatibility = 1.5
targetCompatibility = 1.5
ext.springVersion = '3.0.7.RELEASE'
ext.springLdapVersion = '1.3.1.RELEASE'
ext.ehcacheVersion = '1.6.2'
ext.aspectjVersion = '1.6.10'
ext.apacheDsVersion = '1.5.5'
ext.jstlVersion = '1.2'
ext.jettyVersion = '6.1.26'
ext.hsqlVersion = '1.8.0.10'
ext.slf4jVersion = '1.6.1'
ext.logbackVersion = '0.9.29'
ext.cglibVersion = '2.2'
ext.powerMockVersion = '1.5.1'
2010-03-05 23:20:15 +00:00
2012-10-01 14:46:37 -05:00
ext.bundlorProperties = [
version: version,
secRange: "[$version, 3.1.0)",
springRange: "[$springVersion, 3.1.0)",
aspectjRange: '[1.6.0, 1.7.0)',
casRange: '[3.1.1, 3.2.0)',
cloggingRange: '[1.0.4, 2.0.0)',
ehcacheRange: '[1.4.1, 2.5.0)',
openid4javaRange: '[0.9.5, 1.0.0)',
springLdapRange: '[1.3.0,1.4.0)',
apacheDSRange: '[1.5.5, 1.6)',
apacheDSSharedRange: '[0.9.15, 1.0)',
ldapSdkRange: '[4.1, 5.0)',
aopAllianceRange: '[1.0.0, 2.0.0)'
]
2010-03-05 23:20:15 +00:00
configurations {
2012-10-01 14:46:37 -05:00
// Configuration which is ONLY used for compileJava and will not be inherited by any others
// Revisit post Gradle 1.0
compileOnly
// Used to identify deps which should be marked as "provided" in maven poms
2010-03-05 23:20:15 +00:00
provided
2012-10-01 14:46:37 -05:00
testCompile.extendsFrom provided
compile.transitive = false
testCompile.transitive = false
2010-03-05 23:20:15 +00:00
}
2012-10-01 14:46:37 -05:00
// Integration test setup
configurations {
integrationTestCompile {
extendsFrom testCompile
}
integrationTestRuntime {
extendsFrom integrationTestCompile, testRuntime
}
}
sourceSets {
integrationTest {
java.srcDir file('src/integration-test/java')
resources.srcDir file('src/integration-test/resources')
compileClasspath = sourceSets.main.output + sourceSets.test.output + configurations.integrationTestCompile
runtimeClasspath = output + compileClasspath + configurations.integrationTestRuntime
}
}
task integrationTest(type: Test, dependsOn: jar) {
testClassesDir = sourceSets.integrationTest.output.classesDir
logging.captureStandardOutput(LogLevel.INFO)
classpath = sourceSets.integrationTest.runtimeClasspath
maxParallelForks = 1
// testReport = false
}
2010-03-05 23:20:15 +00:00
dependencies {
2012-10-01 14:46:37 -05:00
compileOnly 'commons-logging:commons-logging:1.1.1'
2010-03-05 23:20:15 +00:00
compile ("org.springframework:spring-core:$springVersion") {
exclude(group: 'commons-logging', module: 'commons-logging')
}
testCompile 'junit:junit-dep:4.10',
'org.mockito:mockito-core:1.9.5',
'org.jmock:jmock:2.6.0',
'org.jmock:jmock-junit4:2.6.0',
'org.hamcrest:hamcrest-core:1.3',
'org.hamcrest:hamcrest-library:1.3',
2010-03-05 23:20:15 +00:00
"org.springframework:spring-test:$springVersion"
2012-10-01 14:46:37 -05:00
// Use slf4j/logback for logging
testRuntime "org.slf4j:jcl-over-slf4j:$slf4jVersion",
"ch.qos.logback:logback-classic:$logbackVersion"
2010-03-05 23:20:15 +00:00
}
2012-10-01 14:46:37 -05:00
[configurations.runtime, configurations.default]*.exclude(module: 'commons-logging')
sourceSets.main.compileClasspath += configurations.compileOnly
sourceSets.main.compileClasspath += configurations.provided
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
2010-03-05 23:20:15 +00:00
test {
2012-10-01 14:46:37 -05:00
jvmArgs = ['-ea', '-Xmx500m']
maxParallelForks = guessMaxForks()
logging.captureStandardOutput(LogLevel.INFO)
//testReport = false
2012-10-01 14:46:37 -05:00
}
def guessMaxForks() {
int processors = Runtime.runtime.availableProcessors()
return Math.max(2, (int) (processors / 2))
}
javadoc {
title = "Spring Security $version API"
source = sourceSets.main.allJava
classpath += configurations.compileOnly + configurations.provided
options {
memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
author = true
header = project.name
outputLevel = org.gradle.external.javadoc.JavadocOutputLevel.QUIET
links = [
"http://static.springframework.org/spring/docs/3.0.x/javadoc-api",
"http://static.springsource.org/spring-ldap/docs/1.3.x/apidocs/",
"http://download.oracle.com/javase/6/docs/api/"
]
groups = [
'Spring Security Core':[
'org.springframework.security.core*',
'org.springframework.security.authentication*',
'org.springframework.security.access*',
'org.springframework.security.remoting*',
'org.springframework.security.provisioning*',
'org.springframework.security.util*'],
'Spring Security Web':['org.springframework.security.web*'],
'Spring Security LDAP':['org.springframework.security.ldap*'],
'Spring Security Crypto':['org.springframework.security.crypto*'],
'Spring Security OpenID':['org.springframework.security.openid*'],
'Spring Security CAS':['org.springframework.security.cas*'],
'Spring Security ACL':['org.springframework.security.acls*'],
'Spring Security Config':['org.springframework.security.config*'],
'Spring Security Taglibs':['org.springframework.security.taglibs*'],
]
2010-03-05 23:20:15 +00:00
}
}
2012-10-01 14:46:37 -05:00
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}