forked from jenkinsci/groovy-events-listener-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
84 lines (72 loc) · 2.31 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
buildscript {
repositories {
jcenter()
maven {
url 'http://repo.jenkins-ci.org/releases/'
}
}
dependencies {
classpath 'org.jenkins-ci.tools:gradle-jpi-plugin:0.15.0'
}
}
defaultTasks 'clean', 'jpi'
/**
=== Usage ===
gradlew jpi - Build the Jenkins plugin file, which can then be found in the build directory. The file will currently end in ".hpi".
gradlew publishToMavenLocal - Build the Jenkins plugin and install it into your local Maven repository.
gradlew publish - Deploy your plugin to the Jenkins Maven repository to be included in the Update Center.
gradlew server - Start a local instance of Jenkins (http://localhost:8080) with the plugin pre-installed for testing and debugging.
*/
apply plugin: 'org.jenkins-ci.jpi'
apply from: "$rootDir/gradle/common.gradle"
apply plugin: 'jacoco'
repositories {
mavenCentral()
jcenter()
maven {
url 'http://repo.jenkins-ci.org/releases/'
}
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
check.dependsOn jacocoTestReport
jenkinsPlugin {
coreVersion = '1.581'
shortName = project.name
displayName = jenkinsDisplayName
url = "https://wiki.jenkins-ci.org/display/JENKINS/$jenkinsDisplayName"
gitHubUrl = "https://github.com/jenkinsci/$project.name"
compatibleSinceVersion = '1.20'
fileExtension = 'hpi'
developers {
developer {
id 'nickg'
name 'Nick Grealy'
email 'nickgrealy@gmail.com'
}
}
}
configurations { forceGroovy }
dependencies {
forceGroovy "org.codehaus.groovy:groovy-all:2.4.6"
compile 'org.apache.ivy:ivy:2.4.0' // For @Grab
testCompile('org.hamcrest:hamcrest-core:1.3') { force = true }
testCompile('junit:junit:4.12') { force = true }
testCompile 'org.mockito:mockito-all:1.10.19'
// bdd testing
testCompile "info.cukes:cucumber-junit:1.2.4"
testCompile "info.cukes:cucumber-java:1.2.4"
}
jpi {
classpath configurations.forceGroovy // add the Groovy lib to the plugin to make @Grap work
}
/**
* We must exclude the junit-dep dependency, because it is clashing with junit when we run the AcceptanceTests.
*/
configurations.findAll {!it.name.endsWith('junit-dep')}.each { conf ->
conf.exclude group: "junit", module: "junit-dep"
}