This repository was archived by the owner on Aug 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbuild.gradle
More file actions
117 lines (96 loc) · 2.9 KB
/
build.gradle
File metadata and controls
117 lines (96 loc) · 2.9 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
plugins {
id 'com.github.hierynomus.license' version '0.13.1'
id 'com.github.kt3k.coveralls' version '2.8.1'
id 'com.gradle.plugin-publish' version '0.9.7'
id 'java-gradle-plugin'
id 'groovy'
id 'jacoco'
id 'maven-publish'
id 'com.stehno.gradle.webpreview' version '0.2.0'
id 'org.asciidoctor.convert' version '1.5.3'
id 'com.stehno.gradle.site' version '0.0.3'
}
version = '0.1.1'
group = 'io.github.http-builder-ng'
sourceCompatibility = 8
targetCompatibility = 8
repositories {
jcenter()
}
configurations {
groovyDoc
}
dependencies {
compile gradleApi()
compile localGroovy()
groovyDoc 'org.codehaus.groovy:groovy-groovydoc:2.4.12'
groovyDoc 'org.codehaus.groovy:groovy-ant:2.4.12'
// TODO: ideally the plugin would download the desired client only
compile("io.github.http-builder-ng:http-builder-ng-apache:$httpBuilderVersion") {
exclude module: 'groovy-all'
}
compile("io.github.http-builder-ng:http-builder-ng-okhttp:$httpBuilderVersion") {
exclude module: 'groovy-all'
}
testCompile('org.spockframework:spock-core:1.1-groovy-2.4') {
exclude module: 'groovy-all'
}
testCompile('com.stehno.ersatz:ersatz:1.5.0') {
exclude module: 'groovy-all'
exclude group: 'ch.qos.logback'
}
}
test {
maxParallelForks = Math.min(Runtime.runtime.availableProcessors(), 8)
}
groovydoc {
groovyClasspath = configurations.groovyDoc
}
asciidoctor {
options doctype: 'book'
backends = ['html5']
attributes 'source-highlighter': 'coderay',
'coderay-linenums-mode': 'table',
icon: 'font',
linkattrs: true,
encoding: 'utf-8'
}
license {
header rootProject.file('config/license_header.txt')
ext.year = Calendar.instance.get(Calendar.YEAR)
}
gradlePlugin {
plugins {
httpPlugin {
id = 'io.github.http-builder-ng.http-plugin'
implementationClass = 'io.github.httpbuilderng.http.HttpPlugin'
}
}
}
pluginBundle {
website = 'https://github.com/http-builder-ng/gradle-http-plugin'
vcsUrl = 'https://github.com/http-builder-ng/gradle-http-plugin'
description = 'Gradle plugin to aid in creating HTTP calls as tasks.'
tags = ['gradle', 'groovy']
plugins {
httpPlugin {
id = 'io.github.http-builder-ng.http-plugin'
displayName = 'Gradle HTTP Plugin'
}
}
}
jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
task publishSite(type: GradleBuild, group: 'Publishing', description: 'Publishes the documentation web site.', dependsOn: ['site']) {
buildFile = 'publish.gradle'
tasks = ['gitPublishPush']
}
site {
versionedFile 'src/docs/asciidoc/index.adoc'
assetDir '**/fonts/**'
}
tasks.site.dependsOn = ['build', 'jacocoTestReport', 'groovydoc', 'asciidoctor']