forked from renatoathaydes/spock-reports
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
131 lines (110 loc) · 3.2 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
plugins {
id "com.jfrog.bintray" version "1.6"
id 'groovy'
id 'idea'
id 'maven'
}
defaultTasks 'clean', 'jar', 'test'
group = 'com.athaydes'
version = "1.2.13"
description = 'This project is a global extension for Spock to create test (or, in Spock terms, Specifications) reports.'
def groovyVersion = '2.0.8'
def spockVersion = '1.0-groovy-2.0'
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
compile "org.codehaus.groovy:groovy-all:${groovyVersion}"
compile "org.spockframework:spock-core:${spockVersion}"
compile 'org.slf4j:slf4j-api:1.7.13'
testCompile "cglib:cglib-nodep:2.2.2"
testCompile "org.slf4j:slf4j-simple:1.7.13"
}
test {
maxParallelForks = 4
exclude '**/FakeTest.class'
systemProperty 'project.buildDir', project.buildDir
testLogging.showStandardStreams = true
beforeTest { descriptor ->
logger.lifecycle( "Running test: " + descriptor )
}
}
jar {
manifest {
attributes(
"Implementation-Title": "Athaydes-Spock-Reports",
"Implementation-Version": version )
}
}
/* Publishing config */
task javadocJar( type: Jar ) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar( type: Jar ) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives javadocJar, sourcesJar
}
// add all the info required by Maven Central to the pom
configure( install.repositories.mavenInstaller ) {
pom.project {
inceptionYear '2013'
name project.name
packaging 'jar'
description project.description
url 'https://github.com/renatoathaydes/spock-reports'
scm {
connection 'git@github.com:renatoathaydes/spock-reports.git'
developerConnection 'git@github.com:renatoathaydes/spock-reports.git'
url 'https://github.com/renatoathaydes/spock-reports'
}
licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'renatoathaydes'
name 'Renato Athaydes'
email 'renato@athaydes.com'
}
}
}
}
def getProjectProperty = { String propertyName ->
project.properties[ propertyName ]
}
bintray {
user = getProjectProperty "bintrayUserName"
key = getProjectProperty "bintrayApiKey"
configurations = [ 'archives' ]
publish = true
pkg {
repo = 'maven'
name = 'spock-reports'
licenses = [ 'Apache-2.0' ]
labels = [ 'groovy', 'java', 'spock', 'bdd', 'test', 'report' ]
publicDownloadNumbers = true
//noinspection GroovyAssignabilityCheck
version {
name = project.version
vcsTag = project.version
gpg {
sign = true
}
mavenCentralSync {
sync = true
user = getProjectProperty 'ossrhUsername'
password = getProjectProperty 'ossrhPassword'
close = '1' // '0' to NOT close
}
}
}
}
bintrayUpload.dependsOn build, sourcesJar