forked from spockframework/spock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
executable file
·127 lines (101 loc) · 3.05 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
apply plugin: "base"
description = "Spock Framework"
ext {
libs = [
ant: "org.apache.ant:ant:1.8.2", // use same version as Groovy 1.8
asm: "asm:asm:3.2", // use same version as Groovy 1.8
cglib: "cglib:cglib-nodep:2.2.2",
easymock: "org.easymock:easymock:3.0",
groovy: "org.codehaus.groovy:groovy-all:1.8.9",
h2database: "com.h2database:h2:1.3.164",
jmock: "org.jmock:jmock:2.5.1",
jmock_junit4: "org.jmock:jmock-junit4:2.5.1",
junit: "junit:junit:4.11",
log4j: "log4j:log4j:1.2.16",
mockito: "org.mockito:mockito-all:1.9.0",
objenesis: "org.objenesis:objenesis:1.2"
]
}
allprojects {
ext.baseVersion = "1.0"
ext.groovyVersion = "1.8"
ext.snapshotVersion = true
group = "org.spockframework"
version = "$baseVersion-groovy-$groovyVersion" + (snapshotVersion ? "-SNAPSHOT" : "")
ext.groovyLessVersion = baseVersion + (snapshotVersion ? "-SNAPSHOT" : "")
apply from: script("common")
}
apply from: script("ide")
subprojects {
apply plugin: "groovy"
apply plugin: "signing"
sourceCompatibility = 1.5
repositories {
mavenCentral()
}
configurations {
all*.exclude module: "junit-dep"
}
dependencies {
compile(project.name == "spock-gradle" ? [] : libs.groovy)
}
signing {
sign configurations.archives
}
signArchives {
onlyIf { gradle.taskGraph.hasTask(uploadArchives) }
}
configureJavadoc(javadoc)
configureGroovydoc(groovydoc)
task sourcesJar(type: Jar) {
classifier "sources"
from sourceSets.main.allSource
}
task javadocJar(type: Jar) {
classifier "javadoc"
from javadoc
}
artifacts {
archives sourcesJar, javadocJar
}
}
task javadoc(type: Javadoc) {
title "Spock Framework API Documentation ($groovyLessVersion)"
def docPath = snapshotVersion ? "latest" : baseVersion
destinationDir file("build/javadoc/$docPath")
source subprojects.javadoc.source
classpath = files(subprojects.javadoc.classpath)
}
configureJavadoc(javadoc)
task groovydoc(type: Groovydoc) {
docTitle "Spock Framework API Documentation ($groovyLessVersion)"
windowTitle "Spock Framework API Documentation ($groovyLessVersion)"
def docPath = snapshotVersion ? "latest" : baseVersion
destinationDir file("build/groovydoc/$docPath")
source subprojects.groovydoc.source
classpath = files(subprojects.groovydoc.classpath)
groovyClasspath = project(":spock-core").groovydoc.groovyClasspath
}
task apidoc(dependsOn: ["javadoc", "groovydoc"])
configureGroovydoc(groovydoc)
File script(String name) {
project.file("gradle/${name}.gradle")
}
def configureJavadoc(task) {
configure(task) {
include "spock/**"
include "org/spockframework/mock/*"
configure(options) {
links "http://download.oracle.com/javase/1.5.0/docs/api/"
links "http://groovy.codehaus.org/gapi"
links "http://junit-team.github.com/junit/javadoc/4.10" // missing for 4.11
links "http://hamcrest.org/JavaHamcrest/javadoc/1.3/"
}
}
}
def configureGroovydoc(task) {
configure(task) {
include "spock/**"
include "org/spockframework/mock/*"
}
}