-
Notifications
You must be signed in to change notification settings - Fork 15
/
build.gradle
131 lines (112 loc) · 3.62 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
buildscript {
repositories {
jcenter()
}
}
plugins {
id 'groovy'
id 'idea'
id 'jacoco'
id 'nebula.maven-publish' version '4.4.4'
id 'nebula.maven-apache-license' version '4.4.4'
id 'nebula.javadoc-jar' version '4.4.4'
id 'nebula.source-jar' version '4.4.4'
id 'nebula.info' version '3.0.3'
id 'nebula.contacts' version '3.0.1'
id 'nebula.nebula-release' version '3.1.1'
id 'nebula.nebula-bintray' version '3.1.0'
id 'com.gradle.plugin-publish' version '0.9.1'
id 'com.github.kt3k.coveralls' version '2.4.0'
id 'org.ysb33r.gradletest' version '0.5.4'
}
description 'Gradle plugin to setup nebula-plugin'
group = 'com.netflix.nebula'
contacts {
'justin@halfempty.org' {
moniker 'Justin Ryan'
github 'quidryan'
}
'rob.spieldenner@gmail.com' {
moniker 'Rob Spieldenner'
github 'rspieldenner'
}
}
sourceCompatibility = 1.7
targetCompatibility = 1.7
repositories {
jcenter()
}
dependencies {
compile localGroovy()
compile gradleApi()
compile 'com.netflix.nebula:nebula-core:3.0.1'
compile 'com.netflix.nebula:nebula-bintray-plugin:3.1.0'
compile 'com.netflix.nebula:nebula-release-plugin:3.1.1'
compile 'org.ajoberstar:gradle-git' // using these but just want the version used by nebula-release-plugin
testCompile 'org.ajoberstar:grgit'
testCompile('com.netflix.nebula:nebula-test:4.0.0') {
exclude group: 'org.codehaus.groovy'
}
}
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
pluginBundle {
website = 'https://github.com/nebula-plugins/nebula-plugin-plugin'
vcsUrl = 'https://github.com/nebula-plugins/nebula-plugin-plugin.git'
plugins {
pluginplugin {
id = 'nebula.plugin-plugin'
displayName = 'Nebula Plugin Plugin'
description = 'Sets up publishing and release process for all of the other nebula plugins'
tags = ['nebula', 'plugin']
}
}
mavenCoordinates {
groupId = 'com.netflix.nebula'
artifactId = 'nebula-plugin-plugin'
}
}
// Wire up build and publishing process
tasks.matching { it.name == 'bintrayUpload' || it.name == 'artifactoryPublish'}.all { Task task ->
task.mustRunAfter('build')
tasks.release.dependsOn(task)
}
tasks.matching { it.name == 'bintrayUpload' }.all { Task task ->
project.gradle.taskGraph.whenReady { TaskExecutionGraph graph ->
task.onlyIf {
graph.hasTask(':final') || graph.hasTask(':candidate')
}
}
}
project.tasks.matching { it.name == 'artifactoryPublish'}.all { Task task ->
project.gradle.taskGraph.whenReady { TaskExecutionGraph graph ->
task.onlyIf {
graph.hasTask(':snapshot')
}
}
}
import org.ajoberstar.gradle.git.release.base.ReleasePluginExtension
ReleasePluginExtension releaseExtension = project.extensions.findByType(ReleasePluginExtension)
releaseExtension.with {
defaultVersionStrategy = nebula.plugin.release.NetflixOssStrategies.SNAPSHOT
}
if (project.hasProperty('release.travisci') && project.property('release.travisci').toBoolean()) {
project.tasks.release.deleteAllActions()
project.tasks.prepare.deleteAllActions()
nebulaRelease {
addReleaseBranchPattern(/HEAD/)
addReleaseBranchPattern(/v?\d+\.\d+\.\d+/)
addReleaseBranchPattern(/gradle-\d+\.\d+/)
}
}
gradleTest {
versions '2.2.1', '2.3', '2.4', '2.5', '2.6', '2.7', '2.8', '2.9', '2.10'
}
gradleTest.dependsOn(jar)
gradleTest.doFirst {
project.version = project.version.toString()
}