From dab76249db943d5c88efac6028bc48284f1dc152 Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Fri, 4 Dec 2009 21:33:17 +0000 Subject: [PATCH] Added gradle build files (experimental) --- acl/build.gradle | 14 ++++++++++++++ build.gradle | 34 ++++++++++++++++++++++++++++++++++ config/build.gradle | 27 +++++++++++++++++++++++++++ core/build.gradle | 25 +++++++++++++++++++++++++ docs/faq/build.gradle | 14 ++++++++++++++ docs/manual/build.gradle | 19 +++++++++++++++++++ ldap/build.gradle | 21 +++++++++++++++++++++ openid/build.gradle | 16 ++++++++++++++++ settings.gradle | 1 + web/build.gradle | 18 ++++++++++++++++++ 10 files changed, 189 insertions(+) create mode 100644 acl/build.gradle create mode 100644 build.gradle create mode 100644 config/build.gradle create mode 100644 core/build.gradle create mode 100644 docs/faq/build.gradle create mode 100644 docs/manual/build.gradle create mode 100644 ldap/build.gradle create mode 100644 openid/build.gradle create mode 100644 settings.gradle create mode 100644 web/build.gradle diff --git a/acl/build.gradle b/acl/build.gradle new file mode 100644 index 0000000000..af8e7cbc78 --- /dev/null +++ b/acl/build.gradle @@ -0,0 +1,14 @@ +// Acl Module build file + +dependencies { + compile project(':core'), + 'net.sf.ehcache:ehcache:1.4.1', + "org.springframework:spring-context:$springVersion", + "org.springframework:spring-core:$springVersion", + "org.springframework:spring-tx:$springVersion", + "org.springframework:spring-jdbc:$springVersion" + + testCompile "org.springframework:spring-beans:$springVersion", + "org.springframework:spring-context-support:$springVersion", + "org.springframework:spring-test:$springVersion" +} \ No newline at end of file diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000000..cd61f82788 --- /dev/null +++ b/build.gradle @@ -0,0 +1,34 @@ +usePlugin('java') + +version = '3.0.0.CI-SNAPSHOT' + +allprojects { + repositories { + mavenRepo name:'localRepo', urls:'file:///Users/luke/.m2/repository' + mavenCentral() + } +} + +subprojects { + usePlugin 'java' + springVersion = '3.0.0.RC2' + + dependencies { + compile 'commons-logging:commons-logging:1.1.1' + + testCompile 'junit:junit:4.6', + '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" + } + + test { + options.fork(forkMode: ForkMode.ONCE, jvmArgs: ["-ea", '-Xms128m', '-Xmx1g', '-XX:MaxPermSize=128m', '-XX:+HeapDumpOnOutOfMemoryError']) + } + + group = 'org.springframework.security' +} + diff --git a/config/build.gradle b/config/build.gradle new file mode 100644 index 0000000000..1f8b708741 --- /dev/null +++ b/config/build.gradle @@ -0,0 +1,27 @@ +// Config Module build file + +compileTestJava.dependsOn(':core:compileTestJava') + +dependencies { + compile project(':core'), + project(':web'), + "javax.servlet:servlet-api:2.5", + 'org.aspectj:aspectjweaver:1.6.5', + "org.springframework:spring-aop:$springVersion", + "org.springframework:spring-core:$springVersion", + "org.springframework:spring-context:$springVersion", + "org.springframework:spring-web:$springVersion", + "org.springframework:spring-beans:$springVersion", + "org.springframework:spring-tx:$springVersion" + + testCompile project(':ldap'), + project(':openid'), + files(this.project(':core').sourceSets.test.classesDir), + 'aopalliance:aopalliance:1.0', + 'org.springframework.ldap:spring-ldap-core:1.3.0.RELEASE', + "org.springframework:spring-jdbc:$springVersion" +} + +task show << { + println dependencies +} \ No newline at end of file diff --git a/core/build.gradle b/core/build.gradle new file mode 100644 index 0000000000..1ce7a6470b --- /dev/null +++ b/core/build.gradle @@ -0,0 +1,25 @@ +// Core build file + +dependencies { + compile 'aopalliance:aopalliance:1.0', + 'commons-codec:commons-codec:1.3', + 'jaxen:jaxen:1.1.1', + 'net.sf.ehcache:ehcache:1.4.1', + "org.springframework:spring-aop:$springVersion", + "org.springframework:spring-beans:$springVersion", + "org.springframework:spring-core:$springVersion", + "org.springframework:spring-context:$springVersion", + "org.springframework:spring-expression:$springVersion", + "org.springframework:spring-jdbc:$springVersion", + "org.springframework:spring-tx:$springVersion", + "org.springframework:spring-web:$springVersion", + 'org.aspectj:aspectjrt:1.6.5', + 'org.aspectj:aspectjweaver:1.6.5', + 'org.apache.tomcat:annotations-api:6.0.14' + + runtime 'hsqldb:hsqldb:1.8.0.7' + //'asm:asm-all:2.2.3', + + testCompile 'commons-collections:commons-collections:3.2', + "org.springframework:spring-test:$springVersion" +} diff --git a/docs/faq/build.gradle b/docs/faq/build.gradle new file mode 100644 index 0000000000..984db9a094 --- /dev/null +++ b/docs/faq/build.gradle @@ -0,0 +1,14 @@ +usePlugin('docbook') + +defaultTasks 'docbookHtmlSingle' + +docbookSrcFileName = 'faq.xml' +docbookHtmlSingle.stylesheet = new File(projectDir, 'src/xsl/html-single-custom.xsl') + +docbookHtmlSingle.doLast { + resourcesDir = new File(projectDir, 'src/resources') + ant { + docsDir = new File(buildDir, 'docs') + copy(toDir: docsDir) {fileset(dir: resourcesDir)} + } +} diff --git a/docs/manual/build.gradle b/docs/manual/build.gradle new file mode 100644 index 0000000000..cbaa08a650 --- /dev/null +++ b/docs/manual/build.gradle @@ -0,0 +1,19 @@ +usePlugin 'docbook' + +defaultTasks 'docbookHtml' + +docbookSrcFileName = 'springsecurity.xml' +docbookHtml.stylesheet = new File(projectDir, 'src/xsl/html-custom.xsl') +docbookFoPdf.stylesheet = new File(projectDir, 'src/xsl/pdf-custom.xsl') + +docbookHtml.doLast { + resourcesDir = new File(projectDir, 'src/resources') + ant { + docsDir = new File(buildDir, 'docs') + copy(toDir: docsDir) {fileset(dir: resourcesDir)} + copy(toDir: new File(docsDir, 'images')) {fileset(dir: new File(projectDir, 'src/docbook/images'))} + } +} + +/*docbookSrc = new File(project.buildDir, 'docbook/src') +docbookDir = new File(project.buildDir, 'docbook/stylesheets')*/ \ No newline at end of file diff --git a/ldap/build.gradle b/ldap/build.gradle new file mode 100644 index 0000000000..b767e40e53 --- /dev/null +++ b/ldap/build.gradle @@ -0,0 +1,21 @@ +// Ldap build file + +test.exclude('**/OpenLDAPIntegrationTestSuite.class') + +dependencies { + compile project(':core'), + "org.springframework:spring-core:$springVersion", + "org.springframework:spring-beans:$springVersion", + "org.springframework:spring-context:$springVersion", + "org.springframework:spring-tx:$springVersion", + 'org.springframework.ldap:spring-ldap-core:1.3.0.RELEASE', + 'org.apache.directory.server:apacheds-core:1.5.5', + 'org.apache.directory.server:apacheds-core-entry:1.5.5', + 'org.apache.directory.server:apacheds-protocol-shared:1.5.5', + 'org.apache.directory.server:apacheds-protocol-ldap:1.5.5', + 'org.apache.directory.server:apacheds-server-jndi:1.5.5', + 'org.apache.directory.shared:shared-ldap:0.9.15', + 'ldapsdk:ldapsdk:4.1' + + runtime 'org.slf4j:slf4j-log4j12:1.4.3' +} \ No newline at end of file diff --git a/openid/build.gradle b/openid/build.gradle new file mode 100644 index 0000000000..0bcd139694 --- /dev/null +++ b/openid/build.gradle @@ -0,0 +1,16 @@ +// OpenID Module build file + +dependencies { + compile project(':core'), + project(':web'), + "javax.servlet:servlet-api:2.5", + 'org.openid4java:openid4java-nodeps:0.9.5', + "org.springframework:spring-aop:$springVersion", + "org.springframework:spring-core:$springVersion", + "org.springframework:spring-context:$springVersion", + "org.springframework:spring-beans:$springVersion", + "org.springframework:spring-tx:$springVersion", + "org.springframework:spring-web:$springVersion" + + runtime 'commons-httpclient:commons-httpclient:3.1' +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000000..ab970e5339 --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +include 'core', 'web', 'ldap', 'acl', 'config', 'openid' diff --git a/web/build.gradle b/web/build.gradle new file mode 100644 index 0000000000..6f8963df3b --- /dev/null +++ b/web/build.gradle @@ -0,0 +1,18 @@ +// Web module build file + +dependencies { + compile project(':core'), + 'aopalliance:aopalliance:1.0', + 'javax.servlet:servlet-api:2.5', + 'commons-codec:commons-codec:1.3', + 'org.aspectj:aspectjweaver:1.6.5', + "org.springframework:spring-aop:$springVersion", + "org.springframework:spring-core:$springVersion", + "org.springframework:spring-beans:$springVersion", + "org.springframework:spring-context:$springVersion", + "org.springframework:spring-expression:$springVersion", + "org.springframework:spring-jdbc:$springVersion", + "org.springframework:spring-tx:$springVersion", + "org.springframework:spring-web:$springVersion", + "org.springframework:spring-test:$springVersion" +}