forked from ghale/gradle-jenkins-plugin
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
135 lines (110 loc) · 3.22 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
buildscript {
repositories {
jcenter()
mavenLocal()
maven {
url 'http://repo.jenkins-ci.org/releases/'
}
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'com.gradle.publish:plugin-publish-plugin:0.9.9'
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2'
classpath 'net.researchgate:gradle-release:2.6.0'
classpath 'com.gradle:build-scan-plugin:2.4.1'
classpath 'gradle.plugin.com.github.kt3k.coveralls:coveralls-gradle-plugin:2.8.4'
}
}
apply plugin: 'com.gradle.plugin-publish'
apply plugin: 'java-gradle-plugin'
apply plugin: 'groovy'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'maven-publish'
apply plugin: 'net.researchgate.release'
apply plugin: 'jacoco'
apply plugin: 'org.sonarqube'
apply plugin: 'com.gradle.build-scan'
apply plugin: 'com.github.kt3k.coveralls'
repositories {
addAll(buildscript.repositories)
}
release {
buildTasks = ['publishPlugins']
}
defaultTasks 'dailyBuild'
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
/*
coveralls {
jacocoReportPath 'build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml'
}
*/
task dailyBuild(type: GradleBuild) {
tasks = ['jar', 'test', 'jacocoTestReport', 'coveralls']
}
sourceSets {
}
dependencies {
compile gradleApi()
//compile 'org.codehaus.groovy:groovy-all:2.4.12'
compile 'xmlunit:xmlunit:1.3'
compile 'org.jenkins-ci:version-number:1.4'
compile('org.codehaus.groovy.modules.http-builder:http-builder:0.7.2') {
exclude(module: 'groovy')
}
compile('org.jenkins-ci.plugins:job-dsl-core:1.66') {
exclude(module: 'groovy-all')
}
compile 'com.google.guava:guava:19.0'
testCompile('com.netflix.nebula:nebula-test:3.1.0') {
exclude(module: 'groovy-all')
}
testCompile('org.spockframework:spock-core:1.0-groovy-2.4') {
exclude(module: 'groovy-all')
}
}
if (! project.hasProperty('jenkinsPort')) {
ext.jenkinsPort = 9999
}
// I use sonarcloud only for local build.
// For travis build please refer coveralls.io
sonarqube {
properties {
property "sonar.sourceEncoding", "UTF-8"
property "sonar.organization", "crc83-github"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.login", "${github_sonar_token}"
}
}
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
publishAlways()
}
pluginBundle {
website = 'https://github.com/crc83/gradle-jenkins-plugin'
vcsUrl = 'https://github.com/crc83/gradle-jenkins-plugin'
description = 'A Gradle plugin for programmatically managing Jenkins instances.'
tags = ['jenkins', 'gradle']
plugins {
jenkins {
id = 'com.sbelei.jenkins'
displayName = 'Gradle Jenkins plugin'
}
}
mavenCoordinates {
groupId = project.group
artifactId = project.name
version = project.version
}
}
test {
ignoreFailures = true
}