-
Notifications
You must be signed in to change notification settings - Fork 52
/
build.gradle
51 lines (42 loc) · 1.16 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
apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'codenarc'
def utilsPath = System.getenv('UTILS_PATH') ?: 'utils'
def pluginsPath = System.getenv('PLUGIN_OUTPUT_DIR') ?: 'plugins'
// jenkins war GAVs are only available in the following version format: x.x
def jenkinsVersion = System.getenv('JENKINS_VERSION').split('_|\\.')[1,2].join('.')
repositories {
maven { url 'http://repo.jenkins-ci.org/releases/' }
mavenCentral()
jcenter()
}
configurations {
libs
}
dependencies {
libs 'org.apache.ivy:ivy:2.4.0@jar'
}
codenarc {
toolVersion = '1.0'
configFile = file('codenarc/rules.groovy')
ignoreFailures = false
maxPriority1Violations = 0
maxPriority2Violations = 0
maxPriority3Violations = 0
// Display codenarc violations in the console for GitHub CI builds
// otherwise, default to creating an html report
if (System.getenv('CI_SYSTEM') == 'GitHub_CI') {
reportFormat = 'console'
}
}
task libs(type: Copy) {
into "${utilsPath}"
from configurations.libs
}
clean {
delete "${utilsPath}"
delete "${pluginsPath}"
}
tasks.withType(GroovyCompile) {
groovyClasspath += configurations.libs
}