forked from ghale/gradle-jenkins-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
152 lines (125 loc) · 3.6 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
buildscript {
repositories {
jcenter()
maven {
url 'http://repo.jenkins-ci.org/releases/'
}
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'org.gradle.api.plugins:gradle-nexus-plugin:0.7'
classpath "com.gradle.publish:plugin-publish-plugin:0.9.0"
}
}
apply plugin: "com.gradle.plugin-publish"
apply plugin: 'groovy'
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'nexus'
sourceCompatibility = 1.6
targetCompatibility = 1.6
repositories {
addAll(buildscript.repositories)
}
sourceSets {
integTest {
compileClasspath += sourceSets.main.output
}
}
configurations {
integTestCompile.extendsFrom testCompile
integTestRuntime.extendsFrom testRuntime
jenkins
}
dependencies {
compile(
gradleApi(),
localGroovy(),
'xmlunit:xmlunit:1.3',
'org.apache.ivy:ivy:2.2.0'
)
compile('org.codehaus.groovy.modules.http-builder:http-builder:0.6') {
exclude(module: 'groovy')
exclude(module: 'xercesImpl')
}
compile('org.jenkins-ci.plugins:job-dsl-core:1.34') {
exclude(module: 'groovy-all')
}
testCompile('com.netflix.nebula:nebula-test:1.12.5') {
exclude(module: 'groovy-all')
}
jenkins('org.jenkins-ci.main:jenkins-war:1.+') { transitive = false }
}
if (! project.hasProperty('jenkinsPort')) {
ext.jenkinsPort = 9999
}
task integTest(type: Test) {
binResultsDir = file("${buildDir}/integTest-results/binary/integTest")
reports.html.destination = "${buildDir}/reports/integTest"
reports.junitXml.destination = "${buildDir}/integTest=results"
classpath = sourceSets.integTest.runtimeClasspath
testClassesDir = compileIntegTestJava.destinationDir
systemProperty "jenkins.port", "${jenkinsPort}"
systemProperty "jenkins.plugin", "${jar.archivePath}"
shouldRunAfter test
}
check.dependsOn integTest
afterEvaluate {
javadocJar {
setDependsOn([groovydoc])
from groovydoc
}
}
task wrapper(type: Wrapper) {
gradleVersion = '1.12'
}
nexus {
sign = false
}
modifyPom {
project {
name 'gradle-jenkins-plugin'
description 'This is a gradle plugin for programmatically configuring Jenkins jobs.'
url 'https://github.com/ghale/gradle-jenkins-plugin'
inceptionYear '2012'
scm {
url 'https://github.com/ghale/gradle-jenkins-plugin.git'
connection 'scm:https://github.com/ghale/gradle-jenkins-plugin.git'
developerConnection 'scm:[email protected]/ghale/gradle-jenkins-plugin.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 'ghale'
name 'Gary Hale'
email '[email protected]'
}
}
}
}
pluginBundle {
website = 'https://github.com/ghale/gradle-jenkins-plugin'
vcsUrl = 'https://github.com/ghale/gradle-jenkins-plugin'
description = 'A Gradle plugin for programmatically managing Jenkins instances.'
tags = ['jenkins', 'gradle']
plugins {
jenkins {
id = 'com.terrafolio.jenkins'
displayName = 'Gradle Jenkins plugin'
}
}
mavenCoordinates {
groupId = project.group
artifactId = project.name
version = project.version
}
}
apply from: "gradle/jenkinsIntegTest.gradle"