Skip to content

Commit 117b312

Browse files
committed
Integrate io.spring.convention.docs plugin
Closes spring-projectsgh-107
1 parent f7c8495 commit 117b312

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

build.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ apply plugin: 'io.spring.convention.root'
1717
group = 'org.springframework.security.experimental'
1818
description = 'Spring Authorization Server'
1919

20+
ext.snapshotBuild = version.contains("SNAPSHOT")
21+
2022
repositories {
2123
mavenCentral()
2224
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
apply plugin: 'io.spring.convention.docs'
2+
apply plugin: 'io.spring.convention.springdependencymangement'
3+
apply plugin: 'io.spring.convention.dependency-set'
4+
apply plugin: 'io.spring.convention.repository'
5+
apply plugin: 'java'
6+
7+
asciidoctor {
8+
attributes([stylesheet: 'css/style.css'])
9+
resources {
10+
from(sourceDir) {
11+
include "css/**"
12+
}
13+
}
14+
}
15+
16+
asciidoctorj {
17+
def ghTag = snapshotBuild ? 'master' : project.version
18+
def ghUrl = "https://github.com/spring-projects-experimental/spring-authorization-server/tree/$ghTag"
19+
attributes 'spring-authorization-server-version' : project.version,
20+
'spring-boot-version' : springBootVersion,
21+
revnumber : project.version,
22+
'gh-url': ghUrl,
23+
'gh-samples-url': "$ghUrl/samples"
24+
attributeProvider resolvedVersions(project.configurations.testCompile)
25+
}
26+
27+
def resolvedVersions(Configuration configuration) {
28+
return {
29+
configuration.resolvedConfiguration
30+
.resolvedArtifacts
31+
.collectEntries { [(it.name + "-version"): it.moduleVersion.id.version] }
32+
}
33+
}

0 commit comments

Comments
 (0)