Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed generation of documentation

  • Loading branch information...
commit 7d0dc7611c74a5910a86dfa2c261c1c2c7df5de9 1 parent e5dc8e0
graemerocher graemerocher authored
Showing with 32 additions and 14 deletions.
  1. +1 −1  build.gradle
  2. +31 −13 gradle/docs.gradle
2  build.gradle
View
@@ -140,7 +140,7 @@ subprojects { project ->
apply {
-// from 'gradle/docs.gradle'
+ from 'gradle/docs.gradle'
from 'gradle/assemble.gradle'
}
44 gradle/docs.gradle
View
@@ -8,17 +8,31 @@ task stubs {
def isolatedAnt = services.get(org.gradle.api.internal.project.IsolatedAntBuilder)
isolatedAnt.execute {
mkdir(dir: destinationDir)
- taskdef(name: "generatestubs", classname: "org.codehaus.groovy.grails.cli.GenerateStubsTask", classpath: sourceSets.main.runtimeClasspath.asPath)
+ taskdef(name: "generatestubs", classname: "org.codehaus.groovy.grails.cli.GenerateStubsTask") {
+ classpath {
+ for(sub in subprojects) {
+ pathelement path: sub.sourceSets.main.compileClasspath.asPath
+ }
+ }
+ }
generatestubs(destdir: destinationDir) {
classpath {
- pathelement path: sourceSets.main.runtimeClasspath.asPath
+ for(sub in subprojects) {
+ pathelement path: sub.sourceSets.main.compileClasspath.asPath
+ }
}
src {
- sourceSets.main.groovy.srcDirs.each { srcDir ->
- dirset(dir: srcDir) {
- exclude name: "**/*.properties"
- }
- }
+ for(sub in subprojects) {
+ sub.sourceSets.main.groovy.srcDirs.each { srcDir ->
+ if(srcDir.exists()) {
+ dirset(dir: srcDir) {
+ exclude name: "**/*.properties"
+ }
+
+ }
+ }
+ }
+
}
}
}
@@ -29,14 +43,16 @@ task docs {
destinationDir = 'doc'
}
-javadoc {
+task javadoc(type:Javadoc) {
+ classpath = files(subprojects.configurations.compile)
dependsOn stubs
maxMemory = '256M'
destinationDir = file("$docs.destinationDir/javadoc")
- source stubs.destinationDir, defaultSource
+ source subprojects.sourceSets.main.groovy.srcDirs + stubs.destinationDir
include "org/codehaus/groovy/grails/**", "grails/**"
+ exclude "**/**.groovy"
project.configure(options) {
- windowTitle = "Grails $version"
+ windowTitle = "Grails $grailsVersion"
docTitle = "<h1>Grails</h1>"
encoding = "UTF-8"
memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PACKAGE
@@ -50,10 +66,12 @@ javadoc {
verbose = false
}
-groovydoc {
+task groovydoc(type:Groovydoc) {
+ groovyClasspath = files(subprojects.configurations.compile)
destinationDir = file("$docs.destinationDir/api")
- windowTitle = "Grails $version"
- docTitle = "Grails $version"
+ windowTitle = "Grails $grailsVersion"
+ docTitle = "Grails $grailsVersion"
+ source subprojects.sourceSets.main.groovy.srcDirs
use = true
// Can't make these link methods to work
// link("http://static.springsource.org/spring/docs/3.0.x/javadoc-api", "org.springframework.")
Please sign in to comment.
Something went wrong with that request. Please try again.