Skip to content

Commit

Permalink
Initial pass at gradle build
Browse files Browse the repository at this point in the history
  • Loading branch information
SavvasMisaghMoayyed committed Nov 6, 2015
1 parent 39657f3 commit 160a619
Show file tree
Hide file tree
Showing 56 changed files with 208 additions and 415 deletions.
30 changes: 26 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ allprojects {

subprojects {
apply plugin: 'java'
apply from: rootProject.file("gradle/tasks.gradle")

sourceCompatibility = 1.7
targetCompatibility = 1.7
Expand All @@ -27,7 +28,22 @@ subprojects {
maven { url "http://files.couchbase.com/maven2" }
}

test {
onlyIf { task ->
return !Boolean.getBoolean("skipTests")
}
useJUnit()
scanForTestClasses false
include '**/*Tests.*'
exclude '**/*Abstract*.*'
classpath = it.classpath + files("${projectDir}/src/main/resources") +
files("${projectDir}/src/test/resources")

}

configurations {
tests

provided
provided.extendsFrom(compile)
}
Expand All @@ -40,10 +56,20 @@ subprojects {
exclude(group: "cglib", module: "cglib-full")
}

artifacts {
tests testJar

archives sourcesJar
archives javadocJar
archives testJar
}

sourceSets {
main.compileClasspath += configurations.provided
test.compileClasspath += configurations.provided
test.runtimeClasspath += configurations.provided

test.resources.srcDirs = ["${projectDir}/src/test/resources", "${projectDir}/src/test/java"]
}

dependencies {
Expand Down Expand Up @@ -74,7 +100,3 @@ subprojects {
provided group: 'javax.el', name: 'javax.el-api', version:'3.0.0'
}
}

task wrapper(type: Wrapper) {
gradleVersion = '2.8'
}
5 changes: 0 additions & 5 deletions cas-management-webapp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,3 @@ dependencies {
}
}

task packageTests(type: Jar) {
from sourceSets.test.output
classifier = 'tests'
}
artifacts.archives packageTests
5 changes: 0 additions & 5 deletions cas-server-core-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,3 @@ dependencies {
compile group: 'joda-time', name: 'joda-time', version:'2.8.2'
}

task packageTests(type: Jar) {
from sourceSets.test.output
classifier = 'tests'
}
artifacts.archives packageTests
10 changes: 3 additions & 7 deletions cas-server-core-audit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,9 @@ dependencies {
testCompile project(':cas-server-core-logout')
testCompile project(':cas-server-core-monitor')
testCompile project(':cas-server-core-util')
testCompile project(':cas-server-core-authentication')
testCompile project(':cas-server-core')
testCompile project(path: ":cas-server-core-authentication", configuration: "tests")
testCompile project(':cas-server-core')
testCompile project(path: ":cas-server-core", configuration: "tests")
}

task packageTests(type: Jar) {
from sourceSets.test.output
classifier = 'tests'
}
artifacts.archives packageTests

5 changes: 0 additions & 5 deletions cas-server-core-authentication/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,3 @@ dependencies {
}
}

task packageTests(type: Jar) {
from sourceSets.test.output
classifier = 'tests'
}
artifacts.archives packageTests
18 changes: 7 additions & 11 deletions cas-server-core-events/build.gradle
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@

description = 'Apereo CAS Core Events'
dependencies {
compile project(':cas-server-core-api')
compile(group: 'org.springframework', name: 'spring-core', version:'4.2.1.RELEASE') {
exclude(module: 'commons-logging')
}
compile group: 'org.springframework', name: 'spring-context', version:'4.2.1.RELEASE'
compile group: 'org.springframework', name: 'spring-beans', version:'4.2.1.RELEASE'
compile project(':cas-server-core-api')
compile(group: 'org.springframework', name: 'spring-core', version:'4.2.1.RELEASE') {
exclude(module: 'commons-logging')
}
compile group: 'org.springframework', name: 'spring-context', version:'4.2.1.RELEASE'
compile group: 'org.springframework', name: 'spring-beans', version:'4.2.1.RELEASE'
}

task packageTests(type: Jar) {
from sourceSets.test.output
classifier = 'tests'
}
artifacts.archives packageTests

24 changes: 10 additions & 14 deletions cas-server-core-logging/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,15 @@
description = 'Apereo CAS Core Logging'
dependencies {
compile project(':cas-server-core-api')
compile group: 'org.reflections', name: 'reflections', version:'0.9.10'
compile(group: 'org.springframework', name: 'spring-core', version:'4.2.1.RELEASE') {
exclude(module: 'commons-logging')
}
compile group: 'commons-io', name: 'commons-io', version:'2.4'
compile group: 'org.springframework', name: 'spring-beans', version:'4.2.1.RELEASE'
compile group: 'org.springframework', name: 'spring-context-support', version:'4.2.1.RELEASE'
compile group: 'org.springframework', name: 'spring-context', version:'4.2.1.RELEASE'
compile group: 'org.springframework', name: 'spring-webmvc', version:'4.2.1.RELEASE'
compile group: 'org.reflections', name: 'reflections', version:'0.9.10'
compile(group: 'org.springframework', name: 'spring-core', version:'4.2.1.RELEASE') {
exclude(module: 'commons-logging')
}
compile group: 'commons-io', name: 'commons-io', version:'2.4'
compile group: 'org.springframework', name: 'spring-beans', version:'4.2.1.RELEASE'
compile group: 'org.springframework', name: 'spring-context-support', version:'4.2.1.RELEASE'
compile group: 'org.springframework', name: 'spring-context', version:'4.2.1.RELEASE'
compile group: 'org.springframework', name: 'spring-webmvc', version:'4.2.1.RELEASE'
}

task packageTests(type: Jar) {
from sourceSets.test.output
classifier = 'tests'
}
artifacts.archives packageTests

10 changes: 3 additions & 7 deletions cas-server-core-logout/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@ dependencies {
compile project(':cas-server-core-api')
compile project(':cas-server-core-util')
compile project(':cas-server-core-tickets')
testCompile project(':cas-server-core-tickets')
testCompile project(':cas-server-core-services')
testCompile project(path: ":cas-server-core-tickets", configuration: "tests")
testCompile project(':cas-server-core-services')
testCompile project(path: ":cas-server-core-services", configuration: "tests")
testCompile project(':cas-server-core-util')
}

task packageTests(type: Jar) {
from sourceSets.test.output
classifier = 'tests'
}
artifacts.archives packageTests

27 changes: 11 additions & 16 deletions cas-server-core-monitor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,17 @@
description = 'Apereo CAS Core Monitor Support'
dependencies {
compile project(':cas-server-core-api')
compile group: 'com.google.guava', name: 'guava', version:'18.0'
compile group: 'org.reflections', name: 'reflections', version:'0.9.10'
compile(group: 'org.springframework', name: 'spring-core', version:'4.2.1.RELEASE') {
exclude(module: 'commons-logging')
}
compile group: 'org.springframework', name: 'spring-beans', version:'4.2.1.RELEASE'
compile group: 'org.springframework', name: 'spring-webmvc', version:'4.2.1.RELEASE'
compile group: 'org.springframework', name: 'spring-context-support', version:'4.2.1.RELEASE'
compile group: 'org.springframework', name: 'spring-context', version:'4.2.1.RELEASE'
compile group: 'com.google.guava', name: 'guava', version:'18.0'
compile group: 'org.reflections', name: 'reflections', version:'0.9.10'
compile(group: 'org.springframework', name: 'spring-core', version:'4.2.1.RELEASE') {
exclude(module: 'commons-logging')
}
compile group: 'org.springframework', name: 'spring-beans', version:'4.2.1.RELEASE'
compile group: 'org.springframework', name: 'spring-webmvc', version:'4.2.1.RELEASE'
compile group: 'org.springframework', name: 'spring-context-support', version:'4.2.1.RELEASE'
compile group: 'org.springframework', name: 'spring-context', version:'4.2.1.RELEASE'
testCompile project(':cas-server-core-tickets')
testCompile project(':cas-server-core-authentication')
testCompile project(':cas-server-core-util')
testCompile project(path: ":cas-server-core-authentication", configuration: "tests")
testCompile project(path: ":cas-server-core-util", configuration: "tests")
}

task packageTests(type: Jar) {
from sourceSets.test.output
classifier = 'tests'
}
artifacts.archives packageTests
10 changes: 3 additions & 7 deletions cas-server-core-services/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,13 @@ dependencies {
compile project(':cas-server-core-util')
compile project(':cas-server-core-events')
compile project(':cas-server-core-web')
testCompile project(':cas-server-core-util')
testCompile project(':cas-server-core-authentication')
testCompile project(path: ":cas-server-core-util", configuration: "tests")
testCompile project(':cas-server-core-authentication')
testCompile project(path: ":cas-server-core-authentication", configuration: "tests")

testCompile(group: 'org.hibernate', name: 'hibernate-validator', version:'5.2.1.Final') {
exclude(module: 'slf4j-api')
exclude(module: 'jboss-logging')
}
}

task packageTests(type: Jar) {
from sourceSets.test.output
classifier = 'tests'
}
artifacts.archives packageTests
29 changes: 12 additions & 17 deletions cas-server-core-tickets/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,21 @@
description = 'Apereo CAS Core Tickets'
dependencies {
compile project(':cas-server-core-api')
compile(group: 'org.hibernate', name: 'hibernate-core', version:'5.0.0.Final') {
exclude(module: 'jboss-logging-annotations')
exclude(module: 'javassist')
}
compile group: 'org.reflections', name: 'reflections', version:'0.9.10'
compile(group: 'org.hibernate', name: 'hibernate-core', version:'5.0.0.Final') {
exclude(module: 'jboss-logging-annotations')
exclude(module: 'javassist')
}
compile group: 'org.reflections', name: 'reflections', version:'0.9.10'
compile project(':cas-server-core-authentication')
compile project(':cas-server-core-util')
compile project(':cas-server-core-web')
compile(group: 'org.quartz-scheduler', name: 'quartz', version:'2.2.1') {
exclude(module: 'slf4j-api')
exclude(module: 'c3p0')
}
testCompile project(':cas-server-core-authentication')
testCompile project(':cas-server-core-util')
testCompile project(':cas-server-core-services')
compile(group: 'org.quartz-scheduler', name: 'quartz', version:'2.2.1') {
exclude(module: 'slf4j-api')
exclude(module: 'c3p0')
}
testCompile project(path: ":cas-server-core-authentication", configuration: "tests")
testCompile project(path: ":cas-server-core-util", configuration: "tests")
testCompile project(':cas-server-core-services')
testCompile project(path: ":cas-server-core-services", configuration: "tests")
}

task packageTests(type: Jar) {
from sourceSets.test.output
classifier = 'tests'
}
artifacts.archives packageTests
5 changes: 0 additions & 5 deletions cas-server-core-util/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,3 @@ dependencies {
compile group: 'org.springframework', name: 'spring-webmvc', version:'4.2.1.RELEASE'
}

task packageTests(type: Jar) {
from sourceSets.test.output
classifier = 'tests'
}
artifacts.archives packageTests
22 changes: 9 additions & 13 deletions cas-server-core-validation/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,16 @@
description = 'Apereo CAS Core Validation'
dependencies {
compile project(':cas-server-core-api')
compile(group: 'org.springframework', name: 'spring-core', version:'4.2.1.RELEASE') {
exclude(module: 'commons-logging')
}
compile group: 'org.springframework', name: 'spring-beans', version:'4.2.1.RELEASE'
compile group: 'org.springframework', name: 'spring-context-support', version:'4.2.1.RELEASE'
compile group: 'org.springframework', name: 'spring-context', version:'4.2.1.RELEASE'
compile(group: 'org.springframework', name: 'spring-core', version:'4.2.1.RELEASE') {
exclude(module: 'commons-logging')
}
compile group: 'org.springframework', name: 'spring-beans', version:'4.2.1.RELEASE'
compile group: 'org.springframework', name: 'spring-context-support', version:'4.2.1.RELEASE'
compile group: 'org.springframework', name: 'spring-context', version:'4.2.1.RELEASE'
testCompile project(':cas-server-core-authentication')
testCompile project(':cas-server-core-authentication')
testCompile project(':cas-server-core-services')
testCompile project(path: ":cas-server-core-authentication", configuration: "tests")
testCompile project(':cas-server-core-services')
testCompile project(path: ":cas-server-core-services", configuration: "tests")
}

task packageTests(type: Jar) {
from sourceSets.test.output
classifier = 'tests'
}
artifacts.archives packageTests

6 changes: 1 addition & 5 deletions cas-server-core-web/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,4 @@ dependencies {
compile group: 'org.springframework', name: 'spring-webmvc', version:'4.2.1.RELEASE'
}

task packageTests(type: Jar) {
from sourceSets.test.output
classifier = 'tests'
}
artifacts.archives packageTests

13 changes: 4 additions & 9 deletions cas-server-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,12 @@ dependencies {
exclude(module: 'aspectjrt')
exclude(module: 'validation-api')
}
testCompile project(':cas-server-core-tickets')
testCompile project(':cas-server-core-logout')
testCompile project(path: ":cas-server-core-tickets", configuration: "tests")
testCompile project(path: ":cas-server-core-logout", configuration: "tests")
testCompile project(':cas-server-core-util')
testCompile project(':cas-server-core-logout')
testCompile project(':cas-server-core-monitor')
testCompile project(':cas-server-core-services')
testCompile project(':cas-server-core-authentication')
testCompile project(path: ":cas-server-core-services", configuration: "tests")
testCompile project(path: ":cas-server-core-authentication", configuration: "tests")
}

task packageTests(type: Jar) {
from sourceSets.test.output
classifier = 'tests'
}
artifacts.archives packageTests
25 changes: 10 additions & 15 deletions cas-server-extension-clearpass/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,17 @@ dependencies {
compile project(':cas-server-core-api')
compile project(':cas-server-core-util')
compile project(':cas-server-core-tickets')
compile(group: 'net.sf.ehcache', name: 'ehcache', version:'2.10.0') {
exclude(module: 'slf4j-api')
}
compile(group: 'org.jasig.cas.client', name: 'cas-client-core', version:'3.4.1') {
exclude(module: 'servlet-api')
exclude(module: 'log4j-over-slf4j')
exclude(module: 'bcprov-jdk15')
exclude(module: 'slf4j-api')
}
compile(group: 'net.sf.ehcache', name: 'ehcache', version:'2.10.0') {
exclude(module: 'slf4j-api')
}
compile(group: 'org.jasig.cas.client', name: 'cas-client-core', version:'3.4.1') {
exclude(module: 'servlet-api')
exclude(module: 'log4j-over-slf4j')
exclude(module: 'bcprov-jdk15')
exclude(module: 'slf4j-api')
}
testCompile project(':cas-server-integration-ehcache')
testCompile project(':cas-server-core-authentication')
testCompile project(path: ":cas-server-core-authentication", configuration: "tests")
testCompile project(':cas-server-core-util')
}

task packageTests(type: Jar) {
from sourceSets.test.output
classifier = 'tests'
}
artifacts.archives packageTests
10 changes: 3 additions & 7 deletions cas-server-integration-ehcache-monitor/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@

description = 'Apereo CAS Ehcache Integration Monitor'
dependencies {
compile project(':cas-server-integration-ehcache')
compile project(':cas-server-core-monitor')
compile project(':cas-server-integration-ehcache')
compile project(':cas-server-core-monitor')
}

task packageTests(type: Jar) {
from sourceSets.test.output
classifier = 'tests'
}
artifacts.archives packageTests

Loading

0 comments on commit 160a619

Please sign in to comment.