forked from betamaxteam/betamax
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
138 lines (120 loc) · 3.77 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
apply plugin: 'groovy'
apply plugin: 'codenarc'
apply plugin: 'nexus'
apply plugin: 'github-pages'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.gradle.api.plugins:gradle-nexus-plugin:0.2'
classpath 'org.ajoberstar:gradle-git:0.2.0'
}
}
version = '1.2-SNAPSHOT'
group = 'co.freeside'
archivesBaseName = 'betamax'
repositories {
mavenCentral()
mavenRepo url: 'http://repository.codehaus.org'
}
dependencies {
groovy 'org.codehaus.groovy:groovy-all:1.8.8'
compile 'junit:junit:4.8.2',
'org.yaml:snakeyaml:1.10',
'org.apache.httpcomponents:httpclient:4.2.2',
'commons-lang:commons-lang:2.4',
'org.eclipse.jetty:jetty-server:7.3.1.v20110307'
testCompile('org.codehaus.groovy.modules.http-builder:http-builder:0.6') {
exclude module: 'groovy'
exclude module: 'httpclient'
}
testCompile('org.spockframework:spock-core:0.7-groovy-1.8') {
exclude module: 'groovy-all'
exclude module: 'junit-dep'
}
testCompile 'commons-httpclient:commons-httpclient:3.1',
'com.github.groovy-wslite:groovy-wslite:0.7.1'
testRuntime 'cglib:cglib-nodep:2.2.2'
}
modifyPom {
dependencies.removeAll(dependencies.findAll { it.scope == 'test' })
project {
name 'Betamax - An HTTP stubbing proxy for testing JVM applications.'
packaging 'jar'
description 'Betamax is a Groovy record/playback proxy for stubbing access to external HTTP resources when testing. Inspired by Ruby\'s VCR.'
url 'http://freeside.co/betamax'
inceptionYear '2011'
scm {
url 'scm:[email protected]:robfletcher/betamax.git'
connection 'scm:[email protected]:robfletcher/betamax.git'
developerConnection 'scm:[email protected]:robfletcher/betamax.git'
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
developers {
developer {
id 'robfletcher'
name 'Rob Fletcher'
url 'http://blog.freeside.co/'
roles {
role 'Lead'
role 'Founder'
}
}
}
}
}
nexus {
sign = true
}
codenarc {
toolVersion = '0.17'
ignoreFailures = true
}
groovydoc {
docTitle = "Betamax $version"
windowTitle = "Betamax $version"
footer = """<p style="text-align: center">API Documentation for Betamax $version - Licensed under the Apache License, Version 2.0 - <a href="http://freeside.co/betamax">http://freeside.co/betamax</a></p>"""
def apiUrls = [
'http://download.oracle.com/javase/7/docs/api',
'http://groovy.codehaus.org/api',
'http://junit.sourceforge.net/javadoc',
'http://snakeyamlrepo.appspot.com/releases/1.10/site/apidocs',
'http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs'
]
apiUrls.each {
try {
def packages = new URL("$it/package-list").text.tokenize('\n')
link(it, * packages)
} catch (IOException e) {
System.err.println("Unable to link docs to $it: " + e.getMessage())
}
}
}
githubPages {
repoUri = '[email protected]:robfletcher/betamax.git'
workingPath = "$buildDir/public"
pages {
exclude '**/_site/**'
from('src/docs') {
exclude '**/*.less'
}
from(groovydoc.outputs.files) {
into 'api'
}
}
}
test {
testLogging {
quiet {
events 'failed'
exceptionFormat 'short'
}
}
}