2010-03-28 18:54:41 -04:00
|
|
|
apply plugin: 'java'
|
|
|
|
apply plugin: 'eclipse'
|
2010-03-03 10:40:57 -05:00
|
|
|
|
2010-10-26 08:52:57 -04:00
|
|
|
springVersion = '3.0.5.RELEASE'
|
2010-03-03 10:40:57 -05:00
|
|
|
springLdapVersion = '1.3.0.RELEASE'
|
|
|
|
ehcacheVersion = '1.6.2'
|
2010-12-20 17:46:02 -05:00
|
|
|
aspectjVersion = '1.6.10'
|
2010-03-03 10:40:57 -05:00
|
|
|
apacheDsVersion = '1.5.5'
|
2010-07-20 18:45:20 -04:00
|
|
|
jstlVersion = '1.2'
|
2010-03-03 10:40:57 -05:00
|
|
|
jettyVersion = '6.1.22'
|
|
|
|
hsqlVersion = '1.8.0.10'
|
2010-07-12 07:30:21 -04:00
|
|
|
slf4jVersion = '1.6.1'
|
|
|
|
logbackVersion = '0.9.24'
|
2010-03-03 10:40:57 -05:00
|
|
|
|
2011-02-07 11:06:23 -05:00
|
|
|
bundlorProperties = [
|
|
|
|
version: version,
|
|
|
|
secRange: "[$version, 3.2.0)",
|
|
|
|
springRange: "[$springVersion, 3.2.0)",
|
|
|
|
aspectjRange: '[1.6.0, 1.7.0)',
|
|
|
|
casRange: '[3.1.1, 3.2.0)',
|
|
|
|
cloggingRange: '[1.0.4, 2.0.0)',
|
2011-03-10 14:38:04 -05:00
|
|
|
ehcacheRange: '[1.4.1, 2.5.0)',
|
2011-02-07 11:06:23 -05:00
|
|
|
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-03 10:40:57 -05:00
|
|
|
configurations {
|
2010-07-22 20:57:15 -04:00
|
|
|
// Configuration which is ONLY used for compileJava and will not be inherited by any others
|
|
|
|
// Revisit post Gradle 1.0
|
|
|
|
compileOnly
|
2010-08-19 17:41:51 -04:00
|
|
|
// Used to identify deps which should be marked as "provided" in maven poms
|
2010-03-03 10:40:57 -05:00
|
|
|
provided
|
2010-08-19 17:41:51 -04:00
|
|
|
testCompile.extendsFrom provided
|
2010-07-12 07:30:21 -04:00
|
|
|
compile.transitive = false
|
2010-07-26 21:16:39 -04:00
|
|
|
testCompile.transitive = false
|
2010-03-03 10:40:57 -05:00
|
|
|
}
|
|
|
|
|
2011-02-14 09:57:30 -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.classes + sourceSets.test.classes + configurations.integrationTestCompile
|
|
|
|
runtimeClasspath = classes + compileClasspath + configurations.integrationTestRuntime
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task integrationTest(type: Test, dependsOn: jar) {
|
|
|
|
testClassesDir = sourceSets.integrationTest.classesDir
|
|
|
|
logging.captureStandardOutput(LogLevel.INFO)
|
|
|
|
classpath = sourceSets.integrationTest.runtimeClasspath
|
2011-02-14 14:01:27 -05:00
|
|
|
maxParallelForks = 1
|
|
|
|
testReport = false
|
2011-02-14 09:57:30 -05:00
|
|
|
}
|
|
|
|
|
2010-03-03 10:40:57 -05:00
|
|
|
dependencies {
|
2010-07-22 20:57:15 -04:00
|
|
|
compileOnly 'commons-logging:commons-logging:1.1.1'
|
2010-03-03 10:40:57 -05:00
|
|
|
|
2010-03-07 16:58:25 -05:00
|
|
|
compile ("org.springframework:spring-core:$springVersion") {
|
|
|
|
exclude(group: 'commons-logging', module: 'commons-logging')
|
|
|
|
}
|
|
|
|
|
2010-03-03 10:40:57 -05:00
|
|
|
testCompile 'junit:junit:4.7',
|
2010-08-17 21:32:43 -04:00
|
|
|
'org.mockito:mockito-core:1.8.5',
|
2010-03-03 10:40:57 -05:00
|
|
|
"org.springframework:spring-test:$springVersion"
|
2010-07-12 07:30:21 -04:00
|
|
|
|
|
|
|
// Use slf4j/logback for logging
|
2010-07-26 21:16:39 -04:00
|
|
|
testRuntime "org.slf4j:jcl-over-slf4j:$slf4jVersion",
|
2010-07-12 07:30:21 -04:00
|
|
|
"ch.qos.logback:logback-classic:$logbackVersion"
|
2010-03-03 10:40:57 -05:00
|
|
|
}
|
|
|
|
|
2010-07-12 07:30:21 -04:00
|
|
|
[configurations.runtime, configurations.default]*.exclude(module: 'commons-logging')
|
|
|
|
|
2010-07-22 20:57:15 -04:00
|
|
|
sourceSets.main.compileClasspath += configurations.compileOnly
|
2010-08-19 17:41:51 -04:00
|
|
|
sourceSets.main.compileClasspath += configurations.provided
|
2010-07-22 20:57:15 -04:00
|
|
|
|
2010-08-16 21:16:12 -04:00
|
|
|
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
|
|
|
|
|
2010-03-03 10:40:57 -05:00
|
|
|
test {
|
2010-09-16 05:50:12 -04:00
|
|
|
jvmArgs = ['-ea', '-Xmx500m']
|
2010-08-04 21:11:00 -04:00
|
|
|
maxParallelForks = guessMaxForks()
|
2011-02-16 10:57:22 -05:00
|
|
|
logging.captureStandardOutput(LogLevel.INFO)
|
2010-08-04 21:11:00 -04:00
|
|
|
testReport = false
|
|
|
|
}
|
|
|
|
|
|
|
|
def guessMaxForks() {
|
|
|
|
int processors = Runtime.runtime.availableProcessors()
|
|
|
|
return Math.max(2, (int) (processors / 2))
|
2010-03-03 10:40:57 -05:00
|
|
|
}
|
|
|
|
|