This repository has been archived by the owner on Jul 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
153 lines (136 loc) · 4.94 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'eclipse'
description = 'A spring social repository for Mongodb'
group = 'org.springframework.social'
version = "1.0.0-SNAPSHOT"
sourceCompatibility=1.6
targetCompatibility=1.6
repositories {
mavenCentral()
maven {url "http://maven.springframework.org/release"}
}
def springVersion = "3.1.1.RELEASE"
def securityVersion = "3.1.0.RELEASE"
def slf4jVersion = "1.6.1"
dependencies {
// spring framework
compile("org.springframework:spring-core:${springVersion}") {
exclude group: "commons-logging", module: "commons-logging"
}
compile("org.springframework:spring-context:${springVersion}") {
exclude group: "commons-logging", module: "commons-logging"
}
// spring security
compile("org.springframework.security:spring-security-config:${securityVersion}") {
exclude group: "commons-logging", module: "commons-logging"
}
compile("org.springframework.security:spring-security-web:${securityVersion}") {
exclude group: "commons-logging", module: "commons-logging"
}
compile "org.springframework.social:spring-social-core:1.0.2.RELEASE"
// logging
compile "org.slf4j:slf4j-api:${slf4jVersion}"
runtime "org.slf4j:jcl-over-slf4j:${slf4jVersion}",
"org.slf4j:slf4j-log4j12:${slf4jVersion}",
"log4j:log4j:1.2.16"
// JSR 303 with Hibernate Validator
compile "javax.validation:validation-api:1.0.0.GA",
"org.hibernate:hibernate-validator:4.0.2.GA"
// GCLIB, required for @Configuration usage
compile "cglib:cglib-nodep:2.2.2"
// mongodb
compile "org.springframework.data:spring-data-mongodb:1.0.1.RELEASE"
compile "org.mongodb:mongo-java-driver:2.7.3"
// unit testing
testCompile "junit:junit:4.10",
"org.mockito:mockito-core:1.9.0",
"org.springframework:spring-test:${springVersion}"
}
task createDirs(description: 'Creates the directory for the project.', group: 'Project') << {
sourceSets*.java.srcDirs*.each { it.mkdirs() }
sourceSets*.resources.srcDirs*.each { it.mkdirs() }
}
install {
repositories.mavenInstaller {
customizePom(pom, project)
}
}
def customizePom(pom, gradleProject) {
pom.whenConfigured { generatedPom ->
// add all items necessary for maven central publication
generatedPom.project {
name = gradleProject.description
description = gradleProject.description
url = 'https://github.com/SpringSource/spring-social'
organization {
name = 'SpringSource'
url = 'http://springsource.org/spring-social'
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
// scm {
// url = 'https://github.com/SpringSource/spring-social'
// connection = 'scm:git:git://github.com/SpringSource/spring-social'
// developerConnection = 'scm:git:git://github.com/SpringSource/spring-social'
// }
developers {
developer {
name = 'Carlo Micieli'
}
}
// For ease of CI builds for those using Maven - can copy pom.xml from build folder.
build {
plugins {
plugin {
groupId = 'org.apache.maven.plugins'
artifactId = 'maven-compiler-plugin'
configuration {
source = '1.6'
target = '1.6'
}
}
plugin {
groupId = 'org.apache.maven.plugins'
artifactId = 'maven-surefire-plugin'
configuration {
includes {
include = '**/*Tests.java'
}
excludes {
exclude = '**/*Abstract*.java'
}
}
}
}
resources {
resource {
directory = 'src/main/java'
includes = ['**/*']
excludes = ['**/*.java']
}
resource {
directory = 'src/main/resources'
includes = ['**/*']
}
}
testResources {
testResource {
directory = 'src/test/java'
includes = ['**/*']
excludes = ['**/*.java']
}
testResource {
directory = 'src/test/resources'
includes = ['**/*']
}
}
}
}
}
}