-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
95 lines (84 loc) · 2.84 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
/*
* This build file was auto generated by running the Gradle 'init' task
* by 'ehongka' at '7/11/16 1:27 PM' with Gradle 2.13
*
* This generated file contains a sample Groovy project to get you started.
* For more details take a look at the Groovy Quickstart chapter in the Gradle
* user guide available at https://docs.gradle.org/2.13/userguide/tutorial_groovy_projects.html
*/
// Apply the groovy plugin to add support for Groovy
// apply plugin: 'groovy'
plugins {
id 'groovy'
id 'maven-publish'
id "com.jfrog.artifactory" version "4.4.0"
id "net.saliman.cobertura" version "2.3.2"
id "org.sonarqube" version "2.0.1"
id 'codenarc'
id 'com.github.kt3k.coveralls' version '2.6.3'
}
// In this section you declare where to find the dependencies of your project
repositories {
// Use 'jcenter' for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
test {
testLogging {
events "passed", "skipped", "failed"
}
}
// In this section you declare the dependencies for your production and test code
dependencies {
// We use the latest groovy 2.x version for building this library
compile 'org.codehaus.groovy:groovy-all:2.4.6'
// We use the awesome Spock testing and specification framework
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
testCompile 'junit:junit:4.12'
testRuntime 'org.slf4j:slf4j-api:1.7.18'
compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.21'
}
publishing {
publications {
mavenJava(MavenPublication) {
groupId 'tk.hongkailiu.test'
artifactId 'test-groovy'
version '0.1'
from components.java
}
}
}
cobertura {
coverageFormats = ['html', 'xml']
}
sonarqube {
properties {
property "sonar.language", "grvy"
property 'sonar.host.url', 'http://192.168.31.223:9000'
//property "sonar.junit.reportsPath", "$buildDir/test-results/"
property 'sonar.groovy.cobertura.reportPath', "$buildDir/reports/cobertura/coverage.xml"
//property 'sonar.groovy.codenarc.reportPath', "$buildDir/reports/codenarc/test.xml"
// deprecated
//property "sonar.profile", "ARM Profile for Groovy"
}
}
tasks.withType(CodeNarc) {
reports {
xml.enabled = true
html.enabled = true
}
}
codenarc {
toolVersion = "0.24.1"
configFile = new File('config/codenarc/rules.groovy')
//reportFormat = 'xml'
ignoreFailures = true
}
artifactoryPublish {
skip = false //Skip build info analysis and publishing (false by default)
//contextUrl = "${artifactory_contextUrl}"
publications ('mavenJava')
clientConfig.publisher.repoKey = 'gradle-local'
//clientConfig.publisher.username = "${artifactory_user}"
//clientConfig.publisher.password = "${artifactory_password}"
}