Files
spring-boot-data-geode/spring-geode-docs/spring-geode-docs.gradle
John Blum 0e8e3baeeb Remove unnecessary testImplementation dependencies (e.g. JUnit, Mockito, etc) from Project (module) Gradle build files.
The testImplementation dependencies have been declared in the testDependencies project extension defined in the DependencySetPlugin.

The testDependencies have been (implicitly) added to the Project's testImplementation dependencies inside the DependencySetPlugin.
2022-02-23 15:39:40 -08:00

132 lines
4.5 KiB
Groovy

plugins {
id "io.freefair.lombok" version "6.3.0"
}
import org.apache.tools.ant.filters.ReplaceTokens
apply plugin: 'io.spring.convention.docs'
apply plugin: 'io.spring.convention.spring-test'
description = "Generate Javadoc and Reference Documentation on Spring Boot for Apache Geode"
repositories {
maven { url "https://repo.spring.io/release" }
}
dependencies {
implementation project(':spring-geode-starter')
optional project(":spring-geode-starter-logging")
implementation "org.assertj:assertj-core"
implementation "org.projectlombok:lombok"
// See additional testImplementation dependencies declared in the testDependencies project extension
// defined in the DependencySetPlugin.
testImplementation project(":spring-geode-starter-test")
}
def versions = dependencyManagement.managedVersions
asciidoctor {
clearSources()
sources {
include "index.adoc"
include "guides/*.adoc"
}
}
asciidoctorj {
def apacheGeodeDocVersion = resolveApacheGeodeDocVersion("${apacheGeodeVersion}")
def githubBaseUrl = "https://github.com/spring-projects/spring-boot-data-geode"
def githubTag = snapshotBuild ? 'master' : project.version
def githubUrl = "$githubBaseUrl/tree/$githubTag"
attributes 'version' : project.version,
'version-snapshot': snapshotBuild,
'version-milestone': milestoneBuild,
'version-release': releaseBuild,
'download-url' : "${githubBaseUrl}/archive/${githubTag}.zip",
'github-url': githubUrl,
'github-samples-url': "${githubUrl}/spring-geode-samples",
'highlightjsdir@': "js/highlight",
'docinfodir@': ".",
'apache-geode-artifact-version' : "${apacheGeodeVersion}",
'apache-geode-doc-version' : apacheGeodeDocVersion,
'apache-geode-src' : "https://github.com/apache/geode/blob/rel/v${apacheGeodeVersion}",
'pivotal-cloudcache-artifact-version' : "${pivotalCloudCacheVersion}",
'pivotal-cloudcache-doc-version' : "1-13",
'pivotal-gemfire-artifact-version' : "${pivotalGemFireVersion}",
'pivotal-gemfire-doc-version' : "910",
'spring-version' : versions['org.springframework:spring-core'],
'spring-boot-version' : "${springBootVersion}",
'spring-boot-data-geode-version' : project.version,
'spring-data-commons-version' : "${springDataBomVersion}",
'spring-data-geode-version' : "${springDataGeodeVersion}",
'spring-session-data-gemfire-version' : "${springSessionDataGeodeVersion}",
'spring-session-data-geode-version' : "${springSessionDataGeodeVersion}",
'spring-test-data-gemfire-version' : "${springDataGeodeTestVersion}",
'spring-test-data-geode-version' : "${springDataGeodeTestVersion}",
'docs-dir' : rootProject.projectDir.path + '/spring-geode-docs',
'docs-src-dir' : rootProject.projectDir.path + '/spring-geode-docs/src/main/java',
'docs-resources-dir' : rootProject.projectDir.path + '/spring-geode-docs/src/main/resources',
'examples-dir' : rootProject.projectDir.path + '/spring-geode-examples',
'samples-dir' : rootProject.projectDir.path + '/spring-geode-samples',
'starter-logging-dir' : rootProject.projectDir.path + '/spring-geode-starter-logging',
'starter-logging-src-dir' : rootProject.projectDir.path + '/spring-geode-starter-logging/src/main/src',
'starter-logging-resources-dir' : rootProject.projectDir.path + '/spring-geode-starter-logging/src/main/resources'
}
asciidoctorPdf {
clearSources()
sources {
include "index.adoc"
// include "guides/*.adoc"
}
}
javadoc {
configure(options) {
links = [
"https://docs.spring.io/spring/docs/current/javadoc-api/",
"https://docs.spring.io/spring-boot/docs/current/api/",
"https://docs.spring.io/spring-boot-data-geode/docs/${project.version}/api/",
"https://docs.spring.io/spring-data/commons/docs/current/api/",
"https://docs.spring.io/spring-data/geode/docs/current/api/",
"https://geode.apache.org/releases/latest/javadoc/",
]
}
}
processResources {
eachFile { file ->
if (!file.name.endsWith(".jks")) {
file.filter ReplaceTokens, tokens: [
'project-dir' : rootProject.projectDir.path,
'project-version' : project.version,
'docs-dir' : rootProject.projectDir.path + '/spring-geode-docs',
'samples-dir' : rootProject.projectDir.path + '/spring-geode-samples'
]
}
}
}
String resolveApacheGeodeDocVersion(String apacheGeodeVersion) {
def apacheGeodeDocVersion = ''
def index = apacheGeodeVersion.lastIndexOf(".")
apacheGeodeVersion = index > -1 ? apacheGeodeVersion.substring(0, index) : apacheGeodeVersion
for (char character : apacheGeodeVersion.toCharArray()) {
if (Character.isDigit(character)) {
apacheGeodeDocVersion += character
}
}
return apacheGeodeDocVersion
}