Merge branch '5.8.x'
This commit is contained in:
commit
4d62621094
|
@ -2,9 +2,6 @@
|
||||||
antora:
|
antora:
|
||||||
extensions:
|
extensions:
|
||||||
- ./antora-linked-worktree-patch.js
|
- ./antora-linked-worktree-patch.js
|
||||||
runtime:
|
|
||||||
log:
|
|
||||||
format: pretty
|
|
||||||
site:
|
site:
|
||||||
title: Spring Security
|
title: Spring Security
|
||||||
url: https://docs.spring.io/spring-security/reference
|
url: https://docs.spring.io/spring-security/reference
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
"name": "spring-security-docs-antora",
|
|
||||||
"private": true,
|
|
||||||
"dependencies": {
|
|
||||||
"@antora/cli": "^3.1.0",
|
|
||||||
"@antora/site-generator-default": "^3.1.0"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,38 +1,32 @@
|
||||||
plugins {
|
plugins {
|
||||||
id "io.github.rwinch.antora" version "0.0.2"
|
id 'org.antora' version '1.0.0-alpha.3'
|
||||||
id "org.springframework.antora.check-version"
|
id 'org.springframework.antora.check-version'
|
||||||
}
|
}
|
||||||
|
|
||||||
apply plugin: 'io.spring.convention.docs'
|
apply plugin: 'io.spring.convention.docs'
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
|
|
||||||
node {
|
|
||||||
version = "16.17.0"
|
|
||||||
}
|
|
||||||
|
|
||||||
antora {
|
antora {
|
||||||
antoraVersion = "3.1.0"
|
version = '~3.1'
|
||||||
playbookFile = file("local-antora-playbook.yml")
|
playbook = file('local-antora-playbook.yml')
|
||||||
arguments = ["--clean", "--stacktrace"]
|
options = ['--clean', '--stacktrace']
|
||||||
}
|
|
||||||
|
|
||||||
tasks.antora {
|
|
||||||
dependsOn "generateAntora"
|
|
||||||
environment = [
|
environment = [
|
||||||
"ALGOLIA_API_KEY" : "82c7ead946afbac3cf98c32446154691",
|
'ALGOLIA_API_KEY': '82c7ead946afbac3cf98c32446154691',
|
||||||
"ALGOLIA_APP_ID" : "244V8V9FGG",
|
'ALGOLIA_APP_ID': '244V8V9FGG',
|
||||||
"ALGOLIA_INDEX_NAME" : "security-docs"
|
'ALGOLIA_INDEX_NAME': 'security-docs'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register("generateAntora") {
|
tasks.antora.dependsOn 'generateAntora'
|
||||||
group = "Documentation"
|
|
||||||
description = "Generates the antora.yml for dynamic properties"
|
tasks.register('generateAntora') {
|
||||||
|
group = 'Documentation'
|
||||||
|
description = 'Generates the antora.yml for dynamic properties'
|
||||||
doLast {
|
doLast {
|
||||||
def docsTag = snapshotBuild ? 'current' : project.version
|
def docsTag = snapshotBuild ? 'current' : project.version
|
||||||
def ghTag = snapshotBuild ? 'main' : project.version
|
def ghTag = snapshotBuild ? 'main' : project.version
|
||||||
def ghUrl = "https://github.com/spring-projects/spring-security/tree/$ghTag"
|
def ghUrl = "https://github.com/spring-projects/spring-security/tree/$ghTag"
|
||||||
def ghOldSamplesUrl = "https://github.com/spring-projects/spring-security/tree/5.4.x/samples"
|
def ghOldSamplesUrl = 'https://github.com/spring-projects/spring-security/tree/5.4.x/samples'
|
||||||
def ghSamplesUrl = "https://github.com/spring-projects/spring-security-samples/tree/$samplesBranch"
|
def ghSamplesUrl = "https://github.com/spring-projects/spring-security-samples/tree/$samplesBranch"
|
||||||
def securityDocsUrl = "https://docs.spring.io/spring-security/site/docs/$docsTag"
|
def securityDocsUrl = "https://docs.spring.io/spring-security/site/docs/$docsTag"
|
||||||
def securityApiUrl = "$securityDocsUrl/api/"
|
def securityApiUrl = "$securityDocsUrl/api/"
|
||||||
|
@ -40,15 +34,15 @@ tasks.register("generateAntora") {
|
||||||
def springFrameworkApiUrl = "https://docs.spring.io/spring-framework/docs/$springFrameworkVersion/javadoc-api/"
|
def springFrameworkApiUrl = "https://docs.spring.io/spring-framework/docs/$springFrameworkVersion/javadoc-api/"
|
||||||
def springFrameworkReferenceUrl = "https://docs.spring.io/spring-framework/docs/$springFrameworkVersion/reference/html/"
|
def springFrameworkReferenceUrl = "https://docs.spring.io/spring-framework/docs/$springFrameworkVersion/reference/html/"
|
||||||
def versions = resolvedVersions(project.configurations.testRuntimeClasspath)
|
def versions = resolvedVersions(project.configurations.testRuntimeClasspath)
|
||||||
def ymlVersions = ""
|
def ymlVersions = ''
|
||||||
versions.call().each { name, version ->
|
versions.call().each { name, version ->
|
||||||
ymlVersions += """
|
ymlVersions += """
|
||||||
${name}: ${version}"""
|
${name}: ${version}"""
|
||||||
}
|
}
|
||||||
def outputFile = new File("$buildDir/generateAntora/antora.yml")
|
def outputFile = layout.buildDirectory.file('generateAntora/antora.yml').orNull.asFile
|
||||||
outputFile.getParentFile().mkdirs()
|
outputFile.getParentFile().mkdirs()
|
||||||
outputFile.createNewFile()
|
outputFile.createNewFile()
|
||||||
def antoraYmlText = file("antora.yml").getText()
|
def antoraYmlText = file('antora.yml').text.trim()
|
||||||
outputFile.setText("""$antoraYmlText
|
outputFile.setText("""$antoraYmlText
|
||||||
title: Spring Security
|
title: Spring Security
|
||||||
start_page: ROOT:index.adoc
|
start_page: ROOT:index.adoc
|
||||||
|
@ -71,23 +65,23 @@ ${ymlVersions}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testImplementation platform(project(":spring-security-dependencies"))
|
testImplementation platform(project(':spring-security-dependencies'))
|
||||||
testImplementation "com.unboundid:unboundid-ldapsdk"
|
testImplementation 'com.unboundid:unboundid-ldapsdk'
|
||||||
testImplementation "org.apache.directory.server:apacheds-core"
|
testImplementation 'org.apache.directory.server:apacheds-core'
|
||||||
testImplementation "org.springframework:spring-core"
|
testImplementation 'org.springframework:spring-core'
|
||||||
}
|
}
|
||||||
|
|
||||||
def resolvedVersions(Configuration configuration) {
|
def resolvedVersions(Configuration configuration) {
|
||||||
return {
|
return {
|
||||||
configuration.resolvedConfiguration
|
configuration.resolvedConfiguration
|
||||||
.resolvedArtifacts
|
.resolvedArtifacts
|
||||||
.collectEntries { [(it.name + "-version"): it.moduleVersion.id.version] }
|
.collectEntries { [(it.name + '-version'): it.moduleVersion.id.version] }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven { url "https://repo.spring.io/release" }
|
maven { url 'https://repo.spring.io/release' }
|
||||||
maven { url "https://repo.spring.io/milestone" }
|
maven { url 'https://repo.spring.io/milestone' }
|
||||||
maven { url "https://repo.spring.io/snapshot" }
|
maven { url 'https://repo.spring.io/snapshot' }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue