65 lines
2.2 KiB
Groovy
65 lines
2.2 KiB
Groovy
apply plugin: 'io.spring.convention.docs'
|
|
apply plugin: 'io.spring.convention.management-configuration'
|
|
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 docsTag = snapshotBuild ? 'current' : project.version
|
|
def ghTag = snapshotBuild ? 'main' : project.version
|
|
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 ghSamplesUrl = "https://github.com/spring-projects/spring-security-samples/tree/$ghTag"
|
|
def securityDocsUrl = "https://docs.spring.io/spring-security/site/docs/$docsTag"
|
|
def oldSecurityApiUrl = "https://docs.spring.io/spring-security/site/docs/5.4.x/api/"
|
|
def springVersion = "5.3.x"
|
|
def securityApiUrl = "$securityDocsUrl/api/"
|
|
def securityReferenceUrl = "$securityDocsUrl/reference/html5/"
|
|
def springFrameworkApiUrl = "https://docs.spring.io/spring-framework/docs/$springVersion/javadoc-api/"
|
|
attributes 'spring-security-version' : project.version,
|
|
'spring-boot-version' : springBootVersion,
|
|
revnumber : project.version,
|
|
'gh-url': ghUrl,
|
|
'gh-samples-url': ghSamplesUrl,
|
|
'gh-old-samples-url': ghOldSamplesUrl,
|
|
'old-security-api-url': oldSecurityApiUrl,
|
|
'security-api-url': securityApiUrl,
|
|
'security-reference-url': securityReferenceUrl,
|
|
'spring-framework-api-url': springFrameworkApiUrl
|
|
attributeProvider resolvedVersions(project.configurations.testRuntimeClasspath)
|
|
}
|
|
|
|
docsZip {
|
|
from(project(':spring-security-docs-guides').asciidoctor) {
|
|
into 'guides'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
management platform(project(":spring-security-dependencies"))
|
|
testImplementation "com.unboundid:unboundid-ldapsdk"
|
|
testImplementation "org.apache.directory.server:apacheds-core"
|
|
testImplementation "org.springframework:spring-core"
|
|
}
|
|
|
|
def resolvedVersions(Configuration configuration) {
|
|
return {
|
|
configuration.resolvedConfiguration
|
|
.resolvedArtifacts
|
|
.collectEntries { [(it.name + "-version"): it.moduleVersion.id.version] }
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven { url "https://repo.spring.io/release" }
|
|
}
|