-
Notifications
You must be signed in to change notification settings - Fork 22
/
build.gradle
115 lines (97 loc) · 3.29 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
plugins {
id "groovy"
id "jacoco"
id "com.gradle.plugin-publish" version "0.10.0"
id "java-gradle-plugin"
}
version = System.getenv('TRAVIS_TAG') ? version : version + "-SNAPSHOT"
repositories {
jcenter()
}
dependencies {
implementation gradleApi()
implementation "org.slf4j:slf4j-api:1.7.16"
implementation "org.codehaus.groovy.modules.http-builder:http-builder:0.7"
implementation "org.apache.maven:maven-artifact:3.3.3"
testImplementation localGroovy() //Groovy packaged with gradle distro
testImplementation('org.spockframework:spock-core:1.1-groovy-2.4') {
exclude group: 'org.codehaus.groovy'
}
testImplementation gradleTestKit()
}
configurations {
integrationTestCompile.extendsFrom testImplementation
integrationTestRuntime.extendsFrom testRuntime
functionalTestCompile.extendsFrom testImplementation
functionalTestRuntime.extendsFrom testRuntime
}
test {
testLogging {
showStandardStreams = true
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: groovydoc) {
classifier = "javadoc"
from groovydoc.destinationDir
}
groovydoc {
// tell groovydoc to create links to Java/Groovy/Gradle docs instead of just printing names
link ("https://docs.oracle.com/javase/${JavaVersion.toVersion(project.targetCompatibility).majorVersion}/docs/api/", "java.", "javax.")
link ("http://docs.groovy-lang.org/${GroovySystem.version}/html/api/", "groovy.", "org.codehaus.groovy.")
link ("https://docs.gradle.org/${project.getGradle().getGradleVersion()}/javadoc/", "org.gradle.")
// these docs are more for plugin developers than end-users, so include everything
includePrivate = true
}
artifacts {
archives sourcesJar
archives javadocJar
}
gradlePlugin {
plugins {
sonarPlugin {
id = 'com.usaa.sonar-quality-gates'
implementationClass = 'com.usaa.plugin.gradle.sonarqube.SonarqubeQualityGatePlugin'
}
}
}
pluginBundle {
website = 'https://usaa.github.io/sonar-quality-gates'
vcsUrl = 'https://www.github.com/usaa/sonar-quality-gates'
description = 'Sonar quality gate/profile administration and gate verification.'
tags = ['sonar', 'admin', 'gate', 'quality-gate']
plugins {
sonarPlugin {
displayName = 'Sonar Quality Gate Plugin'
}
}
}
sourceSets {
integrationTest {
groovy.srcDir file('src/integTest/groovy')
resources.srcDir file('src/integTest/resources')
compileClasspath += sourceSets.main.output + configurations.testRuntime
runtimeClasspath += output + compileClasspath
}
functionalTest {
groovy.srcDir file('src/functTest/groovy')
resources.srcDir file('src/functTest/resources')
compileClasspath += sourceSets.main.output + configurations.testRuntime
runtimeClasspath += output + compileClasspath
}
}
task integrationTest(type: Test) {
description = 'Runs the integration tests.'
group = 'verification'
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
mustRunAfter test
test {
testLogging {
showStandardStreams = true
}
}
}