forked from openapi-processor/openapi-processor-spring
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
177 lines (141 loc) · 4.34 KB
/
build.gradle
File metadata and controls
177 lines (141 loc) · 4.34 KB
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
plugins {
id 'jacoco'
id 'groovy'
id 'java-library'
id 'maven-publish'
id "org.sonarqube" version "3.0"
id 'org.jetbrains.dokka' version '1.4.10.2'
id 'org.jetbrains.kotlin.jvm' version '1.4.20'
id 'org.unbroken-dome.test-sets' version '3.0.1'
id "com.github.ben-manes.versions" version "0.36.0"
}
group projectGroupId
version projectVersion
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
ext {
processorApiVersion = '1.2.0'
jacksonVersion = '2.12.0'
bintrayUser = project.findProperty ('BINTRAY_USER') ?: System.getenv ("BINTRAY_USER") ?: 'n/a'
bintrayKey = project.findProperty ('BINTRAY_KEY') ?: System.getenv ("BINTRAY_KEY") ?: 'n/a'
}
repositories {
mavenCentral()
jcenter()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots"
}
maven {
url "https://dl.bintray.com/openapi-processor/primary"
content {
includeGroup "io.openapiprocessor"
}
mavenContent {
releasesOnly()
}
}
maven {
url "https://oss.jfrog.org/artifactory/oss-snapshot-local"
content {
includeGroup "io.openapiprocessor"
}
mavenContent {
snapshotsOnly()
}
}
}
sourceSets {
main {
java {
srcDirs "${buildDir}/version"
}
}
}
compileKotlin.dependsOn "generateVersion"
test {
useJUnitPlatform()
}
testSets {
testInt
}
check.dependsOn testInt
compileTestGroovy {
dependsOn 'compileKotlin'
classpath += files(compileKotlin.destinationDir)
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
dependencies {
components.all(JacksonPlatformRule)
components.all(KotlinPlatformRule)
compileOnly "io.openapiprocessor:openapi-processor-api:$processorApiVersion"
implementation 'io.openapiprocessor:openapi-processor-core:2020.4-SNAPSHOT'
implementation 'org.slf4j:slf4j-api:1.7.30'
testImplementation ("io.openapiprocessor:openapi-processor-api:$processorApiVersion")
testImplementation ('io.openapiprocessor:openapi-processor-test:2020.1.0') {
exclude group: 'com.google.guava'
}
testImplementation "com.fasterxml.jackson.core:jackson-core:$jacksonVersion"
testImplementation "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
testImplementation("com.google.jimfs:jimfs:1.1") {
exclude group: 'com.google.guava'
}
testImplementation 'org.codehaus.groovy:groovy:2.5.13'
testImplementation ('org.spockframework:spock-core:2.0-M3-groovy-2.5') {
exclude group: 'org.codehaus.groovy' // avoid unused groovy packages
}
testImplementation ('org.spockframework:spock-junit4:2.0-M3-groovy-2.5') {
exclude group: 'org.codehaus.groovy' // avoid unused groovy packages
}
testImplementation("io.mockk:mockk:1.10.2")
testImplementation("io.kotest:kotest-runner-junit5:4.3.1")
testImplementation 'net.bytebuddy:byte-buddy:1.10.18'
testImplementation 'ch.qos.logback:logback-classic:1.2.3'
constraints {
testImplementation ('org.junit.platform:junit-platform-engine:1.6.2')
testImplementation ('junit:junit:4.13')
}
}
tasks.withType(Test) {
finalizedBy jacocoTestReport
}
jacoco {
toolVersion = "0.8.6"
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled false
csv.enabled false
}
getExecutionData().setFrom(fileTree(buildDir).include("/jacoco/*.exec"))
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier.set ('sources')
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: [dokkaHtml]) {
archiveClassifier.set ('javadoc')
from "$buildDir/docs"
}
artifacts {
archives sourcesJar
archives javadocJar
}
dokkaHtml {
outputDirectory = file("$buildDir/docs/kotlin".toString ())
}
sonarqube {
properties {
property "sonar.projectKey", "openapi-processor_openapi-processor-spring"
property "sonar.organization", "openapi-processor"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.coverage.jacoco.xmlReportPaths", "$buildDir/reports/jacoco/test/jacocoTestReport.xml"
}
}
apply plugin: VersionPlugin
apply from: "${rootProject.rootDir}/gradle/publishing.gradle"
apply from: "${rootProject.rootDir}/gradle/publishing.tasks.gradle.kts"