115 lines
2.7 KiB
Groovy
115 lines
2.7 KiB
Groovy
plugins {
|
|
id 'java-library'
|
|
id 'org.antora' version '1.0.0'
|
|
id 'io.spring.antora.generate-antora-yml' version '0.0.1'
|
|
}
|
|
|
|
description = "Spring for GraphQL reference documentation"
|
|
|
|
configurations {
|
|
dependencyManagement {
|
|
canBeConsumed = false
|
|
canBeResolved = false
|
|
visible = false
|
|
}
|
|
matching { it.name.endsWith("Classpath") }.all { it.extendsFrom(dependencyManagement) }
|
|
}
|
|
|
|
dependencies {
|
|
dependencyManagement(enforcedPlatform(dependencies.project(path: ":platform")))
|
|
api project(':spring-graphql')
|
|
api project(':spring-graphql-test')
|
|
api 'org.springframework:spring-webflux'
|
|
api 'org.springframework:spring-webmvc'
|
|
api 'org.springframework:spring-websocket'
|
|
api 'org.springframework:spring-messaging'
|
|
api 'org.springframework.data:spring-data-commons'
|
|
api 'com.querydsl:querydsl-core'
|
|
api "org.springframework.boot:spring-boot-starter-graphql:${springBootVersion}"
|
|
api "org.springframework.boot:spring-boot-starter-web:${springBootVersion}"
|
|
}
|
|
|
|
jar {
|
|
enabled = false
|
|
}
|
|
|
|
javadoc {
|
|
enabled = false
|
|
}
|
|
|
|
|
|
/**
|
|
* Produce Javadoc for all Spring for GraphQL modules in "build/docs/javadoc"
|
|
*/
|
|
task api(type: Javadoc) {
|
|
group = "Documentation"
|
|
description = "Generates aggregated Javadoc API documentation."
|
|
title = "${rootProject.description} ${version} API"
|
|
|
|
dependsOn {
|
|
moduleProjects.collect {
|
|
it.tasks.getByName("jar")
|
|
}
|
|
}
|
|
|
|
options {
|
|
encoding = "UTF-8"
|
|
memberLevel = JavadocMemberLevel.PROTECTED
|
|
author = true
|
|
header = rootProject.description
|
|
use = true
|
|
splitIndex = true
|
|
links(project.ext.javadocLinks)
|
|
addStringOption('Xdoclint:none', '-quiet')
|
|
}
|
|
source = moduleProjects.collect { project ->
|
|
project.sourceSets.main.allJava
|
|
}
|
|
classpath = moduleProjects.collect { project ->
|
|
project.sourceSets.main.compileClasspath
|
|
}.sum()
|
|
maxMemory = "1024m"
|
|
destinationDir = file("$buildDir/docs/javadoc")
|
|
}
|
|
|
|
|
|
antora {
|
|
options = [clean: true, fetch: !project.gradle.startParameter.offline, stacktrace: true]
|
|
environment = [
|
|
'BUILD_REFNAME': 'HEAD',
|
|
'BUILD_VERSION': project.version,
|
|
]
|
|
}
|
|
|
|
tasks.named("generateAntoraYml") {
|
|
asciidocAttributes = project.provider( { ['spring-graphql-version': project.version,
|
|
'spring-boot-version': springBootVersion,
|
|
'spring-framework-version': springFrameworkVersion] } )
|
|
}
|
|
|
|
tasks.named("antora") {
|
|
mustRunAfter "check"
|
|
}
|
|
|
|
/**
|
|
* Zip all docs into a single archive
|
|
*/
|
|
task docsZip(type: Zip, dependsOn: ['api']) {
|
|
group = "Distribution"
|
|
description = "Builds -${archiveClassifier} archive containing api and reference " +
|
|
"for deployment at https://docs.spring.io/spring-graphql/docs."
|
|
from (api) {
|
|
into "api"
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
artifact docsZip
|
|
}
|
|
}
|
|
}
|
|
|
|
|