This repository has been archived by the owner on Jan 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
/
build.gradle
106 lines (88 loc) · 2.59 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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.palantir:gradle-flexversion:0.7.0'
}
}
plugins {
id 'com.jfrog.bintray' version '1.6'
id 'com.gradle.plugin-publish' version '0.9.1'
}
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'maven-publish'
repositories {
jcenter()
}
apply plugin: 'gradle-flexversion'
flexversion.useTags = true
group 'com.palantir'
version flexVersion()
dependencies {
compile gradleApi()
compile localGroovy()
compile 'com.google.guava:guava:18.0'
testCompile 'org.hamcrest:hamcrest-all:1.3'
testCompile 'com.netflix.nebula:nebula-test:4.0.0'
}
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
task sourceJar(type: Jar) {
from sourceSets.main.allSource
classifier 'sources'
}
publishing {
publications {
PluginPublication(MavenPublication) {
from components.java
artifact(sourceJar) {
classifier 'sources'
}
}
}
}
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publish = true
pkg {
repo = 'releases'
name = 'gradle-jacoco-coverage'
userOrg = 'palantir'
licenses = ['Apache-2.0']
publications = ['PluginPublication']
}
}
bintrayUpload.onlyIf {
project.version.isTag == true
}
bintrayUpload.dependsOn { generatePomFileForPluginPublicationPublication }
bintrayUpload.dependsOn { sourceJar }
bintrayUpload.dependsOn { build }
pluginBundle {
website = 'https://github.com/palantir/gradle-jacoco-coverage'
vcsUrl = 'https://github.com/palantir/gradle-jacoco-coverage'
tags = ['java', 'code quality', 'jacoco', 'code coverage', 'coverage']
plugins {
jacocoCoveragePlugin {
id = 'com.palantir.jacoco-coverage'
displayName = 'Jacoco Coverage Plugin'
description = 'The com.palantir.jacoco-coverage plugin allows Gradle build scripts to configure minimum Java Code Coverage thresholds for projects, packages, classes, and files.'
}
jacocoFullReportPlugin {
id = 'com.palantir.jacoco-full-report'
displayName = 'Jacoco Full Report Plugin'
description = 'The com.palantir.jacoco-full-report plugin adds a task that produces a Jacoco report for the combined code coverage of the tests of all subprojects of the current project. '
}
}
}
publishPlugins.onlyIf {
project.version.isTag == true
}