-
Notifications
You must be signed in to change notification settings - Fork 15
/
build.gradle
135 lines (117 loc) · 3.57 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
buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.0.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.0.0"
}
}
plugins {
id("java-gradle-plugin")
id("com.gradle.plugin-publish") version "0.10.1"
}
group = 'io.github.swagger2markup'
version = '2.0.0-SNAPSHOT'
description = 'A Swagger to Markup (AsciiDoc and Markdown) converter Gradle Plugin.'
apply plugin: 'groovy'
apply plugin: 'maven-publish'
apply plugin: 'jacoco'
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'com.jfrog.bintray'
apply plugin: "com.jfrog.artifactory"
tasks.withType(GroovyCompile) {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
options.deprecation = true
options.encoding = 'UTF-8'
options.compilerArgs << "-Xlint:unchecked"
}
repositories {
jcenter()
mavenCentral()
maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local/' }
}
dependencies {
compile gradleApi()
compile localGroovy()
compile ("io.github.swagger2markup:swagger2markup:2.0.0-SNAPSHOT")
testCompile("org.spockframework:spock-core:1.0-groovy-2.4") {
exclude group: "org.codehaus.groovy"
}
testCompile 'io.github.robwin:assertj-diff:0.1.1'
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifactory {
contextUrl = 'https://oss.jfrog.org'
resolve {
repository {
repoKey = 'libs-release'
}
}
publish {
repository {
repoKey = 'oss-snapshot-local' //The Artifactory repository key to publish to
//when using oss.jfrog.org the credentials are from Bintray. For local build we expect them to be found in
//~/.gradle/gradle.properties, otherwise to be set in the build server
username = project.hasProperty('bintrayUsername') ? project.bintrayUsername : System.getenv('BINTRAY_USER')
password = project.hasProperty('bintrayApiKey') ? project.bintrayApiKey : System.getenv('BINTRAY_KEY')
}
defaults {
publications('mavenJava')
}
}
if (System.properties['https.proxyHost']) {
clientConfig.proxy.host = System.properties['https.proxyHost']
clientConfig.proxy.port = System.properties['https.proxyPort'].toInteger()
}
}
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
tasks.coveralls {
dependsOn 'check'
}
test.doFirst {
classpath = classpath.filter { !it.name.contains("snakeyaml-1.6") }
}
artifacts {
archives sourcesJar
archives javadocJar
}
gradlePlugin {
plugins {
swagger2MarkupPlugin {
id = "io.github.RobWin.swagger2markup"
implementationClass = "io.github.swagger2markup.Swagger2MarkupPlugin"
}
}
}
pluginBundle {
website = 'https://github.com/RobWin/swagger2markup-gradle-plugin'
vcsUrl = 'https://github.com/RobWin/swagger2markup-gradle-plugin'
description = project.description
tags = ['swagger', 'asciidoc', 'markdown']
plugins {
swagger2MarkupPlugin {
displayName = 'Swagger2Markup Gradle plugin'
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '4.3.1'
}