diff --git a/build.gradle b/build.gradle index 5edd923..a062563 100644 --- a/build.gradle +++ b/build.gradle @@ -17,6 +17,8 @@ apply plugin: 'io.spring.convention.root' group = 'org.springframework.security.experimental' description = 'Spring Authorization Server' +ext.snapshotBuild = version.contains("SNAPSHOT") + repositories { mavenCentral() } diff --git a/docs/manual/spring-security-oauth2-authorization-server-docs-manual.gradle b/docs/manual/spring-security-oauth2-authorization-server-docs-manual.gradle new file mode 100644 index 0000000..837e6be --- /dev/null +++ b/docs/manual/spring-security-oauth2-authorization-server-docs-manual.gradle @@ -0,0 +1,33 @@ +apply plugin: 'io.spring.convention.docs' +apply plugin: 'io.spring.convention.springdependencymangement' +apply plugin: 'io.spring.convention.dependency-set' +apply plugin: 'io.spring.convention.repository' +apply plugin: 'java' + +asciidoctor { + attributes([stylesheet: 'css/style.css']) + resources { + from(sourceDir) { + include "css/**" + } + } +} + +asciidoctorj { + def ghTag = snapshotBuild ? 'master' : project.version + def ghUrl = "https://github.com/spring-projects-experimental/spring-authorization-server/tree/$ghTag" + attributes 'spring-authorization-server-version' : project.version, + 'spring-boot-version' : springBootVersion, + revnumber : project.version, + 'gh-url': ghUrl, + 'gh-samples-url': "$ghUrl/samples" + attributeProvider resolvedVersions(project.configurations.testCompile) +} + +def resolvedVersions(Configuration configuration) { + return { + configuration.resolvedConfiguration + .resolvedArtifacts + .collectEntries { [(it.name + "-version"): it.moduleVersion.id.version] } + } +}