blob: af84b03087f45286f3017abd7ffb088abf702efb [file] [log] [blame]
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.asciidoctor:asciidoctor-gradle-jvm:3.3.2"
}
}
apply plugin: "org.asciidoctor.jvm.convert"
repositories {
mavenCentral()
maven { url "https://repo.grails.org/grails/core" }
}
asciidoctor {
resources {
from('src/docs/images')
into "./images"
}
attributes 'experimental' : 'true',
'compat-mode' : 'true',
'toc' : 'left',
'icons' : 'font',
'version' : project.version,
'sourcedir' : "${rootProject.allprojects.find { it.name == 'views-core'}.projectDir}/src/main/groovy"
}
configurations {
documentation
}
dependencies {
documentation project(path: ':views-json', configuration: 'documentation')
documentation project(path: ':views-markup', configuration: 'documentation')
documentation project(path: ':views-gradle', configuration: 'compileOnly')
}
task apidocs(type: Groovydoc, group: 'documentation') {
def allProjects = rootProject.allprojects.findAll { project ->
['views-core', 'views-json', 'views-json-testing-support', 'views-markup','views-gradle'].contains(project.name)
}
source allProjects.collect { project ->
project.files('src/main/groovy')
}
destinationDir = new File(buildDir, 'docs/api')
// Might need a classpath
docTitle = "Grails Views ${version}"
classpath = configurations.documentation
groovyClasspath = configurations.documentation
}
task docs(type:Copy, dependsOn:[apidocs, asciidoctor], group:'documentation') {
from "$buildDir/asciidoc/html5"
into "$buildDir/docs"
}