-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.gradle
120 lines (100 loc) · 3.94 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
plugins {
id 'java-gradle-plugin'
id "com.jfrog.bintray" version '1.8.4'
id 'net.researchgate.release' version '2.8.1'
}
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'maven-publish'
apply plugin: 'java-gradle-plugin'
group = 'de.fanero.gradle.plugin.nar'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
implementation gradleApi()
implementation localGroovy()
testImplementation gradleTestKit()
testImplementation group: 'junit', name: 'junit', version: '4.12'
testImplementation group: 'org.hamcrest', name: 'hamcrest-integration', version: '1.3'
testImplementation("org.spockframework:spock-core:1.3-groovy-2.5") {
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
}
}
sourceSets {
integrationTest {
groovy.srcDir file('src/integTest/groovy')
resources.srcDir file('src/integTest/resources')
compileClasspath += sourceSets.main.output + configurations.testRuntimeClasspath
runtimeClasspath += output + compileClasspath
}
functionalTest {
groovy.srcDir file('src/funcTest/groovy')
resources.srcDir file('src/funcTest/resources')
compileClasspath += sourceSets.main.output + configurations.testRuntimeClasspath
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
}
task functionalTest(type: Test) {
description = 'Runs the functional tests.'
group = 'verification'
testClassesDirs = sourceSets.functionalTest.output.classesDirs
classpath = sourceSets.functionalTest.runtimeClasspath
mustRunAfter test
}
check.dependsOn functionalTest
gradlePlugin {
testSourceSets sourceSets.functionalTest
}
task sourceJar(type: Jar) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifact sourceJar
pom.withXml {
Node root = asNode()
root.appendNode('name', 'Gradle Nar Plugin')
root.appendNode('description', 'Gradle plugin to support development of Apache NiFi nar archives')
root.appendNode('url', 'https://github.com/sponiro/gradle-nar-plugin')
root.appendNode('inceptionYear', '2015')
def scm = root.appendNode('scm')
scm.appendNode('url', 'https://github.com/sponiro/gradle-nar-plugin')
scm.appendNode('connection', 'scm:https://github.com/sponiro/gradle-nar-plugin.git')
scm.appendNode('developerConnection', 'scm:git:https://github.com/sponiro/gradle-nar-plugin.git')
def license = root.appendNode('licenses').appendNode('license')
license.appendNode('name', 'The Apache Software License, Version 2.0')
license.appendNode('url', 'http://www.apache.org/licenses/LICENSE-2.0.txt')
license.appendNode('distribution', 'repo')
def developers = root.appendNode('developers')
def rkuehne = developers.appendNode('developer')
rkuehne.appendNode('id', 'rkuehne')
rkuehne.appendNode('name', 'Robert Kühne')
rkuehne.appendNode('email', '[email protected]')
}
}
}
}
afterReleaseBuild.dependsOn bintrayUpload
bintray {
user = project.hasProperty('bintrayUser') ? project.getProperty('bintrayUser') : null
key = project.hasProperty('bintrayKey') ? project.getProperty('bintrayKey') : null
publications = ['mavenJava']
pkg {
repo = 'gradle-plugins'
name = 'gradle-nar-plugin'
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/sponiro/gradle-nar-plugin'
}
}