forked from jenkinsci/poll-mailbox-trigger-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
109 lines (93 loc) · 3.77 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
plugins {
// id "co.riiid.gradle" version "0.4.2"
id 'org.jenkins-ci.jpi' version '0.18.1'
}
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.
*/
ext.enforceJavaVersion = 1.7
apply from: "$rootDir/config/gradle/common.gradle"
apply from: "$rootDir/config/gradle/staticCodeAnalysis.gradle"
repositories {
// mavenLocal() https://jenkins.ci.cloudbees.com/job/plugins/job/poll-mailbox-trigger-plugin/64/console fails checkout home...
maven { url 'http://bits.netbeans.org/maven2/' }
maven { url 'http://repo.jenkins-ci.org/releases/' }
mavenCentral()
jcenter()
}
jenkinsPlugin {
// always support latest LTS!
coreVersion = '2.7.1'
shortName = project.name
displayName = jenkinsDisplayName
url = "https://wiki.jenkins-ci.org/display/JENKINS/$jenkinsDisplayName"
gitHubUrl = "https://github.com/jenkinsci/$project.name"
compatibleSinceVersion = '1.424'
fileExtension = 'hpi'
pluginFirstClassLoader = true
developers {
developer {
id 'nickg'
name 'Nick Grealy'
email 'nickgrealy@gmail.com'
}
}
}
dependencies {
compile "org.jenkins-ci.lib:xtrigger-lib:0.25"
compile("com.sun.mail:javax.mail:1.6.0"){
exclude module: 'activation'
}
// Useful for interrogating the injected environment variables...
// jenkinsPlugins 'org.jenkins-ci.plugins:envinject:1.92.1@jar'
// jenkinsPlugins 'org.jenkins-ci.plugins:matrix-project:1.7.1@jar'
testCompile('org.hamcrest:hamcrest-core:1.3') { force = true }
testCompile('junit:junit:4.12') { force = true }
testCompile 'org.jvnet.mock-javamail:mock-javamail:1.9'
testCompile 'org.mockito:mockito-all:1.10.19'
testCompile "info.cukes:cucumber-junit:1.2.4"
testCompile "info.cukes:cucumber-java:1.2.4"
}
/**
* 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"
}
jpi.outputs.upToDateWhen { false }
jpi.doLast {
verifySizeKb(file(jpi.archivePath), 841)
}
task unzip(type: Copy) {
from zipTree(file("$buildDir/libs/poll-mailbox-trigger-plugin.hpi"))
into file("${buildDir}/unpacked/dist")
}
unzip.dependsOn jpi
configurations.runtime {
resolutionStrategy {
force 'commons-codec:commons-codec:1.8'
force 'org.jenkins-ci:trilead-ssh2:build217-jenkins-8'
force 'commons-io:commons-io:2.4'
force 'org.codehaus.groovy:groovy-all:2.4.7'
force 'org.kohsuke.stapler:stapler:1.243'
force 'org.jenkins-ci:annotation-indexer:1.11'
force 'commons-beanutils:commons-beanutils:1.8.3'
force 'commons-lang:commons-lang:2.6'
force 'commons-logging:commons-logging:1.1.1'
force 'commons-collections:commons-collections:3.2.1'
force 'jaxen:jaxen:1.1-beta-11'
force 'org.springframework:spring-core:2.5.6.SEC03'
force 'net.java.dev.jna:jna:4.2.1'
force 'org.jvnet.localizer:localizer:1.23'
force 'com.google.guava:guava:14.0'
force 'com.jcraft:jzlib:1.1.3'
force 'org.springframework:spring-beans:2.5.6.SEC03'
force 'org.springframework:spring-context:2.5.6.SEC03'
force 'commons-fileupload:commons-fileupload:1.3.1-jenkins-1'
}
}