2010-01-11 19:35:20 -05:00
|
|
|
import java.util.jar.Manifest
|
|
|
|
import org.gradle.api.tasks.bundling.GradleManifest
|
2009-12-21 12:32:38 -05:00
|
|
|
|
2009-12-04 16:33:17 -05:00
|
|
|
allprojects {
|
2010-01-15 13:15:19 -05:00
|
|
|
version = '3.0.2.CI-SNAPSHOT'
|
2010-01-12 19:44:05 -05:00
|
|
|
group = 'org.springframework.security'
|
|
|
|
|
2009-12-04 16:33:17 -05:00
|
|
|
repositories {
|
2010-01-11 19:35:20 -05:00
|
|
|
mavenRepo name:'Local', urls:'file:///Users/luke/.m2/repository'
|
2009-12-04 16:33:17 -05:00
|
|
|
mavenCentral()
|
2010-01-11 19:35:20 -05:00
|
|
|
mavenRepo name:'SpringSource Milestone Repo', urls:'http://repository.springsource.com/maven/bundles/milestone'
|
2009-12-04 16:33:17 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
subprojects {
|
2010-01-10 18:31:23 -05:00
|
|
|
apply id: 'java'
|
|
|
|
|
2009-12-21 12:32:38 -05:00
|
|
|
springVersion = '3.0.0.RELEASE'
|
|
|
|
springLdapVersion = '1.3.0.RELEASE'
|
2009-12-07 20:54:15 -05:00
|
|
|
ehcacheVersion = '1.6.2'
|
2009-12-21 12:32:38 -05:00
|
|
|
aspectjVersion = '1.6.5'
|
2010-01-10 18:31:23 -05:00
|
|
|
apacheDsVersion = '1.5.5'
|
|
|
|
jstlVersion = '1.1.2'
|
2009-12-21 12:32:38 -05:00
|
|
|
|
2010-01-10 18:31:23 -05:00
|
|
|
configurations {
|
2010-01-11 19:35:20 -05:00
|
|
|
bundlor
|
2010-01-10 18:31:23 -05:00
|
|
|
provided
|
|
|
|
}
|
|
|
|
|
2009-12-04 16:33:17 -05:00
|
|
|
dependencies {
|
|
|
|
compile 'commons-logging:commons-logging:1.1.1'
|
|
|
|
|
2009-12-21 12:32:38 -05:00
|
|
|
testCompile 'junit:junit:4.7',
|
2009-12-04 16:33:17 -05:00
|
|
|
'org.mockito:mockito-core:1.7',
|
|
|
|
'org.jmock:jmock:2.5.1',
|
|
|
|
'org.jmock:jmock-junit4:2.5.1',
|
|
|
|
'org.hamcrest:hamcrest-core:1.1',
|
|
|
|
'org.hamcrest:hamcrest-library:1.1',
|
|
|
|
"org.springframework:spring-test:$springVersion"
|
2010-01-11 19:35:20 -05:00
|
|
|
bundlor 'com.springsource.bundlor:com.springsource.bundlor.ant:1.0.0.RC1',
|
|
|
|
'com.springsource.bundlor:com.springsource.bundlor:1.0.0.RC1',
|
|
|
|
'com.springsource.bundlor:com.springsource.bundlor.blint:1.0.0.RC1'
|
2009-12-04 16:33:17 -05:00
|
|
|
}
|
2010-01-10 18:31:23 -05:00
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
compileClasspath = compileClasspath + configurations.provided
|
|
|
|
}
|
|
|
|
test {
|
|
|
|
compileClasspath = compileClasspath + configurations.provided
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-12-04 16:33:17 -05:00
|
|
|
test {
|
|
|
|
options.fork(forkMode: ForkMode.ONCE, jvmArgs: ["-ea", '-Xms128m', '-Xmx1g', '-XX:MaxPermSize=128m', '-XX:+HeapDumpOnOutOfMemoryError'])
|
|
|
|
}
|
2010-01-11 19:35:20 -05:00
|
|
|
|
|
|
|
compileJava.doLast {
|
|
|
|
ant.taskdef(resource: 'com/springsource/bundlor/ant/antlib.xml', classpath: configurations.bundlor.asPath)
|
|
|
|
File template = new File(projectDir, 'template.mf')
|
|
|
|
if (template.exists()) {
|
2010-01-12 19:44:05 -05:00
|
|
|
ant.bundlor(inputPath: "$buildDir/classes", outputPath: "$buildDir/classes", manifestTemplatePath: "$projectDir/template.mf") {
|
|
|
|
property(name: 'version', value: "$version")
|
|
|
|
property(name: 'spring.version', value: "$springVersion")
|
2010-01-11 19:35:20 -05:00
|
|
|
}
|
|
|
|
// See GRADLE-395 for support for using an existing manifest
|
2010-01-12 19:44:05 -05:00
|
|
|
jar.manifest = new GradleManifest(new Manifest(new File("$buildDir/classes/META-INF/MANIFEST.MF").newInputStream()))
|
2010-01-11 19:35:20 -05:00
|
|
|
}
|
|
|
|
}
|
2009-12-04 16:33:17 -05:00
|
|
|
}
|
|
|
|
|
2010-01-12 19:44:05 -05:00
|
|
|
subprojects {
|
|
|
|
apply id: 'maven'
|
|
|
|
|
|
|
|
// Create a source jar for uploading
|
|
|
|
task sourceJar(type: Jar) {
|
|
|
|
classifier = 'sources'
|
|
|
|
from sourceSets.main.java
|
|
|
|
}
|
|
|
|
|
|
|
|
artifacts {
|
|
|
|
archives sourceJar
|
|
|
|
}
|
|
|
|
|
|
|
|
def deployer = null
|
|
|
|
uploadArchives {
|
|
|
|
repositories {
|
|
|
|
deployer = mavenDeployer {
|
|
|
|
repository(url: "file://localhost/${rootProject.projectDir}/pomRepo/")
|
|
|
|
snapshotRepository(url: "file://localhost/${rootProject.projectDir}/snapshotRepo/")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
installer = install.repositories.mavenInstaller
|
|
|
|
conf2ScopeMappings.addMapping(1, configurations.provided, "provided")
|
|
|
|
}
|