forked from kt3k/coveralls-gradle-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
167 lines (128 loc) · 4.06 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
// build.gradle
apply plugin: 'groovy'
apply plugin: 'maven'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'signing'
apply plugin: 'cobertura'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'maven-publish'
repositories {
mavenCentral()
}
dependencies {
compile localGroovy()
compile gradleApi()
compile 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.1'
compile 'org.apache.httpcomponents:httpmime:4.3'
testCompile 'junit:junit:4.11'
testCompile 'org.mockito:mockito-all:1.9.5'
testCompile 'com.github.tomakehurst:wiremock:1.18'
}
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'net.saliman:gradle-cobertura-plugin:2.2.4'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:0.5'
}
}
task groovydocJar(type: Jar, dependsOn: groovydoc) {
classifier = 'javadoc'
from 'build/docs/groovydoc'
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives jar
archives groovydocJar
archives sourcesJar
}
// sign archives if signatory exists
if (signing.signatory) {
signing {
sign configurations.archives
}
}
uploadArchives {
repositories {
mavenDeployer {
// sign pom if signatory exists
if (signing.signatory) {
beforeDeployment {
signing.signPom(it)
}
}
repository(url: System.getenv('MVN_REPO')) {
// set authentication info if sonatypeUsername property is set
if (project.hasProperty('sonatypeUsername')) {
authentication userName: sonatypeUsername, password: sonatypePassword
}
}
// additional pom settings (for maven central requirement)
pom.project {
name 'Gradle Coveralls Plugin'
description 'This plugin helps to upload coverage data to Coveralls'
url 'https://github.com/kt3k/coveralls-gradle-plugin'
scm {
url 'scm:[email protected]:kt3k/coveralls-gradle-plugin.git'
connection 'scm:[email protected]:kt3k/coveralls-gradle-plugin.git'
developerConnection 'scm:[email protected]:kt3k/coveralls-gradle-plugin.git'
}
licenses {
license {
name 'MIT License'
url 'https://raw.github.com/kt3k/coveralls-gradle-plugin/master/LICENSE'
distribution 'repo'
}
}
developers {
developer {
id 'kt3k'
name 'Yoshiya Hinosawa'
}
}
}
}
}
}
cobertura.coverageFormats = ['html', 'xml']
cobertura.coverageSourceDirs = sourceSets.main.groovy.srcDirs
// MavenPublication settings
publishing {
publications {
plugin(MavenPublication) {
from components.java
}
}
}
bintray {
if (project.hasProperty('bintrayUsername')) {
// these two should be defined out of the repository, for example, in ~/.gradle/gradle.properties
user = bintrayUsername
key = bintrayApiKey
}
publications = ['plugin']
pkg {
repo = 'gradle-plugins'
name = 'coveralls-gradle-plugin'
desc = 'Send coverage data to coveralls.io.'
websiteUrl = 'https://github.com/kt3k/coveralls-gradle-plugin'
issueTrackerUrl = 'https://github.com/kt3k/coveralls-gradle-plugin/issues'
vcsUrl = 'https://github.com/kt3k/coveralls-gradle-plugin.git'
licenses = ['MIT']
labels = ['coveralls', 'coverage']
publicDownloadNumbers = true
version {
name = '1.0.2'
vcsTag = 'v1.0.2'
attributes = [
'gradle-plugin': 'com.github.kt3k.coveralls:org.kt3k.gradle.plugin:coveralls-gradle-plugin'
]
}
}
}