forked from gigaSproule/swagger-gradle-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
126 lines (106 loc) · 3.58 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
plugins {
id "com.gradle.plugin-publish" version "0.9.9"
id "com.jfrog.bintray" version "1.7.3"
id 'net.researchgate.release' version '2.6.0'
id 'com.github.ben-manes.versions' version '0.17.0'
}
apply plugin: 'maven'
apply plugin: 'maven-publish'
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'jacoco' //Currently this does not exclude methods generated via Annotations (toString in this plugin)
repositories {
mavenLocal()
mavenCentral()
maven {
url 'https://dl.bintray.com/gigasproule/maven'
}
}
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}
group = 'com.benjaminsproule'
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
dependencies {
compile gradleApi()
compile localGroovy()
compile 'commons-io:commons-io:2.6'
compile 'org.apache.commons:commons-lang3:3.6'
compile 'org.apache.commons:commons-text:1.1'
compile 'com.github.jknack:handlebars:4.0.6'
compile 'com.fasterxml.jackson.core:jackson-core:2.9.2'
compile 'com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.9.2'
compile 'javax.xml.bind:jaxb-api:2.2.4'
//These should be pinned here until reflections/reflections#194 has been resolved
compile 'io.swagger:swagger-jaxrs:1.5.13'
compile 'io.swagger:swagger-jersey-jaxrs:1.5.13'
compile 'javax.ws.rs:javax.ws.rs-api:2.1'
compile 'com.sun.jersey:jersey-server:1.19.4'
compile 'org.springframework:spring-context:5.0.1.RELEASE'
compile 'org.springframework:spring-web:5.0.1.RELEASE'
testCompile 'junit:junit:4.12'
testCompile 'cglib:cglib-nodep:3.2.5'
testCompile('org.spockframework:spock-core:1.1-groovy-2.4') {
//We want to depend on the gradle version of groovy since this is a plugin
exclude module: 'groovy-all'
}
testCompile 'org.yaml:snakeyaml:1.19'
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
if (project.hasProperty('bintray_user') && project.hasProperty('bintray_apiKey')) {
bintray {
user = bintray_user
key = bintray_apiKey
configurations = ['archives']
pkg {
repo = 'maven'
name = 'swagger-gradle-plugin'
websiteUrl = 'https://github.com/gigaSproule/swagger-gradle-plugin'
vcsUrl = 'https://github.com/gigaSproule/swagger-gradle-plugin'
githubRepo = 'gigaSproule/swagger-gradle-plugin'
githubReleaseNotesFile = 'README.md'
licenses = ['Apache-2.0']
publish = true
version {
name = project.version
released = new Date()
}
}
}
afterReleaseBuild.dependsOn bintrayUpload
}
pluginBundle {
website = 'https://github.com/gigaSproule/swagger-gradle-plugin'
vcsUrl = 'https://github.com/gigaSproule/swagger-gradle-plugin'
description = 'Plugin to create Swagger documentation using Gradle'
tags = ['swagger', 'documentation']
plugins {
swagger {
id = 'com.benjaminsproule.swagger'
displayName = 'Swagger Gradle Plugin'
}
}
}
publishing {
publications {
pluginPublication(MavenPublication) {
from components.java
groupId project.group
artifactId project.name
version "${project.version}-SNAPSHOT"
}
}
}
tasks.jacocoTestReport.dependsOn('test')
tasks.build.dependsOn('jacocoTestReport')
afterReleaseBuild.dependsOn publishPlugins