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 35
/
Copy pathbuild.gradle
113 lines (96 loc) · 3.75 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
// First, apply the publishing plugin
buildscript {
repositories {
mavenLocal() // for e2e test
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "com.gradle.publish:plugin-publish-plugin:0.9.6"
classpath "gradle.plugin.org.mockito:mockito-release-tools:0.8.32"
}
}
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: 'groovy'
apply plugin: 'com.gradle.plugin-publish'
apply plugin: 'checkstyle'
apply plugin: 'codenarc'
apply plugin: 'org.mockito.mockito-release-tools.gradle-plugin-releasing'
apply plugin: 'org.mockito.mockito-release-tools.release-needed'
apply from: 'gradle/precommit.gradle'
apply from: 'gradle/release.gradle'
sourceCompatibility = 1.6
targetCompatibility = 1.6
repositories { jcenter() }
group = 'gradle.plugin.org.mockito'
dependencies {
compile gradleApi()
compile "com.github.cliftonlabs:json-simple:2.1.2"
compile 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
testCompile("org.spockframework:spock-core:0.7-groovy-2.0") {
exclude module: "groovy-all"
}
testCompile "cglib:cglib-nodep:2.2.2"
testCompile "commons-lang:commons-lang:2.4"
testCompile gradleTestKit()
}
pluginBundle {
website = 'http://mockito.org/'
vcsUrl = 'https://github.com/mockito/mockito-release-tools'
description = 'Release tools and Gradle plugins that automate Mockito continuous delivery.'
tags = ['mockito', 'continuous delivery', 'release']
plugins {
//TODO update plugins
releaseNotesPlugin {
id = 'org.mockito.release-notes'
displayName = 'Mockito automated release notes generation plugin'
}
autoVersioningPlugin {
id = 'org.mockito.release-tools.auto-versioning'
displayName = 'Mockito automated versioning plugin'
tags = ['mockito', 'continuous delivery', 'release', 'versioning', 'auto-versioning', 'semantic-versioning']
}
gradlePluginReleasingPlugin {
id = 'org.mockito.mockito-release-tools.gradle-plugin-releasing'
displayName = 'Mockito automated versioning and Travis CI integration'
tags = ['mockito', 'continuous delivery', 'release', 'versioning', 'auto-versioning', 'semantic-versioning', 'travis']
}
releaseNeededPlugin {
id = 'org.mockito.mockito-release-tools.release-needed'
displayName = 'Mockito plugin for checking if release is needed'
tags = ['mockito', 'continuous delivery', 'release']
}
e2eTestPlugin {
id = 'org.mockito.mockito-release-tools.e2e-test'
displayName = 'Mockito e2e tests plugin'
tags = ['mockito', 'continuous delivery', 'release', 'e2e', 'end-to-end', 'end-2-end', 'test']
}
}
mavenCoordinates {
groupId = 'gradle.plugin.org.mockito'
artifactId = "mockito-release-tools"
}
}
task travisRelease {
dependsOn releaseNeeded
onlyIf { !releaseNeeded.releaseNotNeeded }
doLast {
logger.lifecycle("{} - Publishing to Gradle Plugin Portal...", path)
exec {
commandLine "./gradlew", "publishPlugins", "bumpVersionAndPush", "-Preleasing.dryRun=false",
"-Pgradle.publish.key=${System.getenv('GRADLE_PUBLISH_KEY')}",
"-Pgradle.publish.secret=${System.getenv('GRADLE_PUBLISH_SECRET')}"
}
}
}
task fastInstall { Task t ->
description = "Fast installation for quick local testing."
t.dependsOn install
gradle.taskGraph.whenReady {
if (it.hasTask(t)) {
//we don't need them for local testing so lets disable for faster execution
tasks.javadoc.enabled = false
tasks.groovydoc.enabled = false
}
}
}