Skip to content

Commit 2f7c4f6

Browse files
jprinetSteve Riesenberg
authored and
Steve Riesenberg
committed
Enable caching of :asciidoctor gradle task
1 parent 8d54f16 commit 2f7c4f6

File tree

11 files changed

+23
-7
lines changed

11 files changed

+23
-7
lines changed

buildSrc/src/main/java/org/springframework/gradle/docs/SpringAsciidoctorPlugin.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ private void configureAsciidoctorExtension(AbstractAsciidoctorTask asciidoctorTa
120120
// Not using intermediateWorkDir.
121121
// See https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/523
122122
resourcesSrcDirSpec.include("images/*.png", "css/**", "js/**", "**/*.java");
123+
// This exclusion is required to allow cacheability of :spring-authorization-server-docs:asciidoctor
124+
// The whole docs/src/docs/asciidoc folder is being passed as a task input
125+
resourcesSrcDirSpec.exclude("**/examples/build/**");
123126
});
124127
});
125128
if (asciidoctorTask instanceof AsciidoctorTask) {

docs/spring-authorization-server-docs.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ asciidoctor {
88
"spring-security-reference-base-url": "https://docs.spring.io/spring-security/reference",
99
"spring-security-api-base-url": "https://docs.spring.io/spring-security/site/docs/current/api",
1010
"spring-boot-reference-base-url": "https://docs.spring.io/spring-boot/docs/current/reference/html",
11-
"examples-dir": "examples",
12-
"samples-dir": "$rootDir/samples",
13-
"docs-java": "$sourceDir/examples/src/main/java",
1411
"chomp": "default headers packages",
1512
"toc": "left",
1613
"toclevels": "4"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:examples-dir: examples
2+
:samples-dir: ../../../../samples
3+
:docs-java: {docdir}/examples/src/main/java

docs/src/docs/asciidoc/getting-started.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
include::attributes.adoc[]
2+
13
[[getting-started]]
24
= Getting Started
35

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:examples-dir: ../examples
2+
:samples-dir: ../../../../../samples
3+
:docs-java: {docdir}/examples/src/main/java

docs/src/docs/asciidoc/guides/how-to-ext-grant-type.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
include::attributes.adoc[]
2+
13
[[how-to-extension-grant-type]]
24
= How-to: Implement an Extension Authorization Grant Type
35
:index-link: ../how-to.html
46
:docs-dir: ..
5-
:examples-dir: {docs-dir}/examples
67

78
This guide shows how to extend xref:{docs-dir}/index.adoc#top[Spring Authorization Server] with an https://datatracker.ietf.org/doc/html/rfc6749#section-4.5[extension authorization grant type].
89
The purpose of this guide is to demonstrate how to implement an extension authorization grant type and configure it at the xref:{docs-dir}/protocol-endpoints.adoc#oauth2-token-endpoint[OAuth2 Token endpoint].

docs/src/docs/asciidoc/guides/how-to-jpa.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
include::attributes.adoc[]
2+
13
[[how-to-jpa]]
24
= How-to: Implement core services with JPA
35
:index-link: ../how-to.html

docs/src/docs/asciidoc/guides/how-to-pkce.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
include::attributes.adoc[]
2+
13
[[how-to-pkce]]
24
= How-to: Authenticate using a Single Page Application with PKCE
35
:index-link: ../how-to.html
46
:docs-dir: ..
5-
:examples-dir: {docs-dir}/examples
67

78
This guide shows how to configure xref:{docs-dir}/index.adoc#top[Spring Authorization Server] to support a Single Page Application (SPA) with Proof Key for Code Exchange (PKCE).
89
The purpose of this guide is to demonstrate how to support a public client and require PKCE for client authentication.

docs/src/docs/asciidoc/guides/how-to-social-login.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
include::attributes.adoc[]
2+
13
[[how-to-social-login]]
24
= How-to: Authenticate using Social Login
35
:index-link: ../how-to.html
46
:docs-dir: ..
5-
:examples-dir: {docs-dir}/examples
6-
:samples-dir: {docs-dir}/../../../../samples
77
:github-ref: main
88
:github-base-url: https://github.com/spring-projects/spring-authorization-server/blob/{github-ref}
99

docs/src/docs/asciidoc/guides/how-to-userinfo.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
include::attributes.adoc[]
2+
13
[[how-to-userinfo]]
24
= How-to: Customize the OpenID Connect 1.0 UserInfo response
35
:index-link: ../how-to.html

docs/src/docs/asciidoc/how-to.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
include::attributes.adoc[]
2+
13
[[how-to]]
24
= How-to Guides
35

0 commit comments

Comments
 (0)