Skip to content

Commit 2d4f20a

Browse files
committed
Use groovydoc plugin to reduce memory strain in Travis
1 parent 8692d92 commit 2d4f20a

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

build.gradle

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ buildscript {
1212
classpath 'com.bmuschko:gradle-nexus-plugin:2.3'
1313
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3"
1414
classpath "gradle.plugin.io.sdkman:gradle-sdkvendor-plugin:1.0.0"
15+
classpath "io.github.groovylang.groovydoc:groovydoc-gradle-plugin:1.0.1"
1516
}
1617
}
1718

@@ -160,6 +161,11 @@ apply from: "gradle/idea.gradle"
160161
subprojects { project ->
161162
version = grailsVersion
162163
group = "org.grails"
164+
165+
configurations {
166+
documentation
167+
}
168+
163169
ext.isTestSuite = project.name.startsWith("grails-test-suite")
164170
ext.isCiBuild = project.hasProperty("isCiBuild")
165171
ext.pomInfo = {
@@ -206,6 +212,7 @@ subprojects { project ->
206212
if(project.name == 'grails-bom') return
207213

208214
apply plugin: 'groovy'
215+
apply plugin: "io.github.groovylang.groovydoc"
209216
if(!isTestSuite) {
210217
apply plugin: 'com.bmuschko.nexus'
211218
apply plugin: 'maven-publish'
@@ -259,7 +266,18 @@ subprojects { project ->
259266
options.debug = true
260267
}
261268

269+
configure([groovydoc]) {
270+
onlyIf {
271+
!isTestSuite
272+
}
273+
classpath += configurations.documentation
274+
jvmArgs "-Xmx512M"
275+
}
276+
262277
configure([javadoc]) {
278+
onlyIf {
279+
!isTestSuite
280+
}
263281
options.encoding "UTF-8"
264282
options.docEncoding "UTF-8"
265283
options.charSet "UTF-8"
@@ -279,6 +297,10 @@ subprojects { project ->
279297
}
280298

281299
dependencies {
300+
documentation("org.fusesource.jansi:jansi:$jansiVersion")
301+
documentation("jline:jline:$jlineVersion")
302+
documentation "org.codehaus.groovy:groovy-ant:$groovyVersion"
303+
282304
compile groovyDependency
283305

284306
testCompile "org.codehaus.groovy:groovy-test:${groovyVersion}", {

gradle/docs.gradle

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
buildscript {
2+
repositories {
3+
maven { url "https://repo.grails.org/grails/core" }
4+
}
5+
dependencies {
6+
classpath "io.github.groovylang.groovydoc:groovydoc-gradle-plugin:1.0.1"
7+
}
8+
}
19
/**
210
* Since Grails is a mixed Groovy/Java codebase the javadoc tool needs stubs in order for javadoc compilation to pass
311
* This target generates a set of stubs for the Groovy sources
@@ -66,15 +74,15 @@ task javadoc(type:Javadoc) {
6674
verbose = false
6775
}
6876

69-
task groovydoc(type:Groovydoc) {
70-
def subs = subprojects.findAll { it.name != 'grails-dependencies' && it.name != 'grails-bom' && it.name != 'grails-compat' }
77+
task groovydoc(type:org.groovy.lang.groovydoc.tasks.GroovydocTask) {
78+
def subs = subprojects.findAll {
79+
it.name != 'grails-dependencies' && it.name != 'grails-bom' && it.name != 'grails-compat' && !it.name.startsWith("grails-test-suite") }
7180
classpath = files(subs.configurations.compile)
7281
groovyClasspath = files(subs.configurations.compile)
7382
destinationDir = file("$docs.destinationDir/api")
7483
windowTitle = "Grails $grailsVersion"
7584
docTitle = "Grails $grailsVersion"
7685
source subs.sourceSets.main.groovy.srcDirs
77-
use = true
7886
// Can't make these link methods to work
7987
// link("http://static.springsource.org/spring/docs/3.0.x/javadoc-api", "org.springframework.")
8088
// link("http://download.oracle.com/javase/1.5.0/docs/api", "java." , "javax.")

0 commit comments

Comments
 (0)