-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
executable file
·175 lines (144 loc) · 4.75 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
apply plugin: "java"
apply plugin: "groovy"
apply plugin: "idea"
apply plugin: "spring-boot"
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.artifactory'
buildscript {
ext {
springBootVersion = "1.1.7.RELEASE"
}
repositories {
mavenCentral()
maven {
url "http://repo.springsource.org/milestone/"
}
maven {
url 'http://dl.bintray.com/jfrog/jfrog-jars'
}
maven {
url "https://edify.artifactoryonline.com/edify/libs-releases-local"
credentials {
username = "${artifactory_user}"
password = "${artifactory_password}"
}
}
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:1.0.2.RELEASE"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:+"
}
}
jar {
baseName = "cl-lo"
}
mainClassName = "org.commonlibrary.cllo.Application"
version = new File("version").text
group = "org.commonlibrary"
description = "Common Library Learning Object"
repositories {
maven {
url "http://repo.spring.io/milestone"
}
maven {
url "https://oss.sonatype.org/content/repositories/releases/"
}
maven{
url "http://repo.springsource.org/plugins-release/"
}
mavenCentral()
}
/**
* Artifactory configuration
*/
artifactory {
contextUrl = "${artifactory_contextUrl}"
publish {
repository {
repoKey = 'libs-releases-local'
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true
}
defaults {
publications ('mavenJava')
}
}
resolve {
repository {
repoKey = 'libs-releases'
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true
}
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
task stage(dependsOn: ["assemble"])
artifactoryPublish {
dependsOn jar
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
dependencies {
// Groovy.
compile "org.codehaus.groovy:groovy-all:2.4.6"
// Spring.
compile "org.springframework.boot:spring-boot-starter-web:${springBootVersion}"
compile "org.springframework.boot:spring-boot-starter:${springBootVersion}"
compile "org.springframework.boot:spring-boot-starter-data-mongodb:${springBootVersion}"
compile "org.springframework.boot:spring-boot-starter-data-jpa:${springBootVersion}"
compile "org.springframework.boot:spring-boot-starter-actuator:${springBootVersion}"
compile "org.springframework.boot:spring-boot-autoconfigure:${springBootVersion}"
// Third party dependencies.
compile "org.apache.tika:tika-core:1.4"
compile "com.fasterxml.jackson.core:jackson-databind:2.3.0"
compile "commons-collections:commons-collections:3.0"
compile "org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final"
compile "org.hibernate:hibernate-entitymanager:4.3.5.Final"
compile "org.postgresql:postgresql:9.3-1101-jdbc41"
compile "org.jboss.logging:jboss-logging:3.1.0.GA"
compile "com.amazonaws:aws-java-sdk-s3:1.11.26"
compile "com.rabbitmq:amqp-client:3.6.5"
compile "org.elasticsearch:elasticsearch:2.4.1"
compile "org.yaml:snakeyaml:1.17"
compile "commons-fileupload:commons-fileupload:1.3.1"
compile "commons-codec:commons-codec:1.10"
compile "org.liquibase:liquibase-core:3.1.1"
compile "com.zaxxer:HikariCP:1.4.0"
compile "com.mangofactory:swagger-springmvc:0.8.8"
compile "ch.qos.logback:logback-classic:1.1.2"
// CL project dependencies.
compile "org.commonlibrary:cl-auth-java:0.0.1"
compile "org.commonlibrary:cl-sdk-curricula:0.0.1"
// Runtime dependencies.
runtime "com.mattbertolini:liquibase-slf4j:1.2.1"
// Test dependencies.
testCompile "org.springframework.boot:spring-boot-starter-test:${springBootVersion}"
testCompile "org.spockframework:spock-core:1.1-groovy-2.4-rc-1"
testCompile "org.spockframework:spock-spring:1.1-groovy-2.4-rc-1"
testRuntime "cglib:cglib-nodep:3.2.4" // Allows mocking of classes (in addition to interfaces).
testRuntime "org.objenesis:objenesis:2.1" // Allows mocking of classes without default constructor (together with CGLIB).
}
test {
def testExclusions = project.hasProperty("excludeTests") ? excludeTests : "default"
testExclusions = testExclusions.split(",")
testExclusions.collect {
exclude "${it}**"
}
testLogging {
events "started", "passed"
}
}