-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
146 lines (126 loc) · 3.84 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
plugins {
id 'java-gradle-plugin'
id 'org.jetbrains.kotlin.jvm' version '1.3.31'
id 'com.gradle.plugin-publish' version '0.10.1'
id 'groovy'
}
dependencies {
api project(':xddl-core')
api project(':xddl-plugin-markdown')
api project(':xddl-plugin-json-schema')
api project(':xddl-plugin-graphvis')
api project(':xddl-plugin-elasticsearch')
api project(':xddl-plugin-java')
api project(':xddl-plugin-hive')
api project(':xddl-plugin-migrate')
api project(':xddl-plugin-plantuml')
api project(':xddl-plugin-swift')
api project(':powerglide')
api 'ognl:ognl:3.0.4'
api 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
testImplementation('org.spockframework:spock-core:1.1-groovy-2.4') {
exclude group: 'org.codehaus.groovy'
}
}
sourceSets {
functional {
groovy.srcDir file('src/functional/groovy')
java.srcDir file('src/functional/java')
resources.srcDir file('src/functional/resources')
compileClasspath += sourceSets.main.output + configurations.testRuntimeClasspath
runtimeClasspath += output + compileClasspath
}
integration {
groovy.srcDir file('src/integration/groovy')
java.srcDir file('src/integration/java')
resources.srcDir file('src/integration/resources')
compileClasspath += sourceSets.main.output + sourceSets.functional.output + configurations.testRuntimeClasspath
runtimeClasspath += output + compileClasspath
}
}
dokka {
outputFormat = 'html'
}
task functional(type: Test) {
description = 'Runs the functional tests.'
group = 'verification'
testClassesDirs = sourceSets.functional.output.classesDirs
classpath = sourceSets.functional.runtimeClasspath
mustRunAfter test //, integrationTest
testLogging {
showStandardStreams = true
}
jacoco {
enabled = true
append = true
destinationFile = file("${buildDir}/jacoco/test.exec")
}
}
task integration(type: Test) {
description = 'Runs the integration tests.'
group = 'verification'
testClassesDirs = sourceSets.integration.output.classesDirs
classpath = sourceSets.integration.runtimeClasspath
mustRunAfter test
testLogging {
showStandardStreams = true
}
jacoco {
enabled = true
append = true
destinationFile = file("${buildDir}/jacoco/test.exec")
}
}
check.dependsOn functional
if(project.hasProperty("kebernet_bintray")) {
bintray {
user = getProperty("kebernet_bintray")
key = getProperty("kebernet_bintray_api")
pkg {
repo = 'maven'
name = 'xddl'
publish = true
licenses = ['Apache-2.0']
publications = ['xddl']
}
}
}
publishing {
publications {
xddl(MavenPublication) {
from components.java
groupId "${project.group}"
artifactId "${project.group}.gradle.plugin"
version rootProject.version
artifact sourceJar {
classifier "sources"
}
artifact packageJavadoc
}
}
}
pluginBundle {
website = "https://github.com/atl-tw/xddl"
vcsUrl = "https://github.com/atl-tw/xddl.git"
description = "Multi-environment DDLs"
tags = ['json', 'java', 'hive', 'markdown', "elasticsearch"]
plugins {
xddl {
id = 'net.kebernet.xddl'
displayName = "xDDL"
description = "Extensible Data Definition Language"
}
}
}
gradlePlugin {
//noinspection GroovyAssignabilityCheck
plugins {
//noinspection GroovyAssignabilityCheck
xddl {
id = 'net.kebernet.xddl'
//noinspection GroovyAssignabilityCheck
implementationClass = 'net.kebernet.xddl.gradle.XDDLPlugin'
}
}
}
tasks.functional.dependsOn clean