-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
114 lines (98 loc) · 2.97 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
plugins {
id "java-gradle-plugin"
id "maven-publish"
id "org.asciidoctor.jvm.convert"
id "org.asciidoctor.jvm.pdf"
id "org.springframework.boot.conventions"
id "org.springframework.boot.internal-dependency-management"
id "org.springframework.boot.maven-repository"
id "org.springframework.boot.optional-dependencies"
}
description = "Spring Boot Gradle Plugin"
configurations {
asciidoctorExtensions
documentation
}
repositories {
maven {
url "https://repo.spring.io/release"
mavenContent {
includeGroup "io.spring.asciidoctor"
}
}
}
dependencies {
api(platform(project(":spring-boot-project:spring-boot-dependencies")))
asciidoctorExtensions(platform(project(":spring-boot-project:spring-boot-parent")))
asciidoctorExtensions("io.spring.asciidoctor:spring-asciidoctor-extensions-block-switch")
implementation(project(":spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform"))
implementation(project(":spring-boot-project:spring-boot-tools:spring-boot-loader-tools"))
implementation("io.spring.gradle:dependency-management-plugin")
implementation("org.apache.commons:commons-compress")
implementation("org.springframework:spring-core")
optional(platform(project(":spring-boot-project:spring-boot-dependencies")))
optional("org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50")
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
testImplementation("org.assertj:assertj-core")
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.mockito:mockito-core")
testImplementation("org.testcontainers:testcontainers")
}
gradlePlugin {
plugins {
springBootPlugin {
id = "org.springframework.boot"
implementationClass = "org.springframework.boot.gradle.plugin.SpringBootPlugin"
}
}
}
task dependencyVersions(type: org.springframework.boot.build.constraints.ExtractVersionConstraints) {
enforcedPlatform(":spring-boot-project:spring-boot-dependencies")
}
tasks.withType(org.asciidoctor.gradle.jvm.AbstractAsciidoctorTask) {
dependsOn dependencyVersions
doFirst {
attributes "dependency-management-plugin-version": dependencyVersions.versionConstraints["io.spring.gradle:dependency-management-plugin"]
}
}
asciidoctor {
configurations "asciidoctorExtensions"
sources {
include "index.adoc"
}
attributes "stylesheet": "css/style.css"
}
asciidoctorPdf {
sources {
include "index.adoc"
}
}
javadoc {
options {
author = true
docTitle = "Spring Boot Gradle Plugin ${project.version} API"
encoding = "UTF-8"
memberLevel = "protected"
outputLevel = "quiet"
splitIndex = true
use = true
windowTitle = "Spring Boot Gradle Plugin ${project.version} API"
}
}
task zip(type: Zip) {
dependsOn asciidoctor, asciidoctorPdf
duplicatesStrategy "fail"
from(asciidoctorPdf.outputDir) {
into "reference/pdf"
rename "index.pdf", "${project.name}-reference.pdf"
}
from(asciidoctor.outputDir) {
into "reference/html"
}
from(javadoc) {
into "api"
}
}
artifacts {
"documentation" zip
}