forked from allegro/axion-release-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
151 lines (121 loc) · 3.89 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
plugins {
id 'groovy'
id 'java-gradle-plugin'
id 'maven'
id 'jacoco'
id 'pl.allegro.tech.build.axion-release' version '1.5.0'
id 'com.github.kt3k.coveralls' version '2.3.1'
id "com.gradle.plugin-publish" version "0.9.1"
id "com.bmuschko.nexus" version "2.3.1" apply false
id "io.codearte.nexus-staging" version "0.5.3" apply false
id "me.champeau.gradle.jmh" version "0.4.3"
}
if (project.hasProperty('mavenCentral')) {
apply from: 'gradle/mavenCentral.gradle'
}
scmVersion {
tag {
prefix = 'axion-release'
}
hooks {
pre 'fileUpdate', [files: ['README.md', 'docs/conf.py'], pattern: { v, p -> /'$v'/ }, replacement: { v, p -> "'$v'" }]
pre 'commit'
}
versionCreator 'versionWithBranch'
}
group = 'pl.allegro.tech.build'
version = scmVersion.version
sourceCompatibility = '1.7'
repositories {
mavenCentral()
}
project.ext.versions = [
jgit: '4.5.2.201704071617-r'
]
sourceSets {
integration {
java.srcDir project.file('src/integration/java')
groovy.srcDir project.file('src/integration/groovy')
resources.srcDir project.file('src/integration/resources')
resources.srcDir project.sourceSets.test.resources
resources.srcDir project.sourceSets.main.resources
compileClasspath = project.sourceSets.main.output +
project.sourceSets.test.output +
project.configurations.testRuntime
runtimeClasspath = output + compileClasspath
}
}
dependencies {
compile gradleApi()
compile localGroovy()
compile group: 'org.ajoberstar', name: 'grgit', version: '1.7.2'
compile group: 'org.eclipse.jgit', name: 'org.eclipse.jgit', version: versions.jgit
compile group: 'org.eclipse.jgit', name: 'org.eclipse.jgit.ui', version: versions.jgit
compile group: 'com.jcraft', name: 'jsch', version: '0.1.54'
compile group: 'com.github.zafarkhaja', name: 'java-semver', version: '0.9.0'
testCompile(group: 'org.spockframework', name: 'spock-core', version: '1.0-groovy-2.4') {
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
}
testCompile group: 'cglib', name: 'cglib-nodep', version: '3.1'
testCompile group: 'org.objenesis', name: 'objenesis', version: '2.4'
testCompile gradleTestKit()
}
test {
testLogging {
events 'passed', 'skipped', 'failed'
exceptionFormat = 'full'
}
}
project.configurations {
integration {
extendsFrom project.configurations.testRuntime
description = 'Dependencies for integration tests'
transitive = true
visible = true
}
}
task integrationTest(type: Test) {
testClassesDirs = project.sourceSets.integration.output.classesDirs
classpath = project.sourceSets.main.output +
project.sourceSets.test.output +
project.sourceSets.integration.runtimeClasspath +
project.configurations.testRuntime +
project.configurations.integrationRuntime
testLogging {
events 'passed', 'skipped', 'failed'
exceptionFormat = 'full'
}
}
tasks.check.dependsOn integrationTest
jmh {
benchmarkMode = ['ss']
duplicateClassesStrategy = 'warn'
}
gradlePlugin {
testSourceSets project.sourceSets.integration
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
task wrapper(type: Wrapper) {
gradleVersion = '4.0'
}
pluginBundle {
website = 'https://github.com/allegro/axion-release-plugin'
vcsUrl = 'https://github.com/allegro/axion-release-plugin'
description = 'Release and version management plugin.'
tags = ['release', 'version']
plugins {
release {
id = 'pl.allegro.tech.build.axion-release'
displayName = 'axion-release-plugin'
}
}
mavenCoordinates {
groupId = 'pl.allegro.tech.build'
artifactId = 'axion-release-plugin'
}
}