From 3f2d0b4bc515d7b83a317c2d49d7cc99f9db3890 Mon Sep 17 00:00:00 2001 From: Costin Leau Date: Fri, 1 Jul 2011 18:46:52 +0300 Subject: [PATCH] + add package exclude --- docs/build.gradle | 55 ++++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/docs/build.gradle b/docs/build.gradle index 48b78c7c1..c032b3aa6 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -8,6 +8,7 @@ apply plugin: 'docbook' assemble.dependsOn = ['api', 'docbook'] +[docbookHtml, docbookFoPdf, docbookHtmlSingle]*.group = 'Documentation' [docbookHtml, docbookFoPdf, docbookHtmlSingle]*.sourceFileName = 'index.xml' [docbookHtml, docbookFoPdf, docbookHtmlSingle]*.sourceDirectory = new File(projectDir, 'src/reference/docbook') @@ -31,27 +32,45 @@ refSpec = copySpec { task reference (type: Copy) { dependsOn 'docbook' - group = 'Documentation' description = "Builds aggregated DocBook" + group = "Documentation" destinationDir = buildDir with(refSpec) } task api(type: Javadoc) { - group = 'Documentation' + group = "Documentation" description = "Builds aggregated JavaDoc HTML for all core project classes." - + // this task is a bit ugly to configure. it was a user contribution, and // Hans tells me it's on the roadmap to redesign it. srcDir = file("${projectDir}/src/api") destinationDir = file("${buildDir}/api") tmpDir = file("${buildDir}/api-work") - optionsFile = file("${tmpDir}/apidocs/javadoc.options") - options.stylesheetFile = file("${srcDir}/spring-javadoc.css") - options.links = ["http://static.springframework.org/spring/docs/3.0.x/javadoc-api"] - options.overview = "${srcDir}/overview.html" - options.docFilesSubDirs = true + + configure(options) { + stylesheetFile = file("${srcDir}/spring-javadoc.css") + links = ["http://static.springframework.org/spring/docs/3.0.x/javadoc-api"] + overview = "${srcDir}/overview.html" + docFilesSubDirs = true + outputLevel = org.gradle.external.javadoc.JavadocOutputLevel.QUIET + breakIterator = true + showFromProtected() + groups = [ + 'Spring Data Key Value Core': ['org.springframework.data.keyvalue*'], + 'Spring Data Redis Support' : ['org.springframework.data.keyvalue.redis*'], + 'Spring Data Riak Support' : ['org.springframework.data.keyvalue.riak*'] + ] + + links = [ + "http://static.springframework.org/spring/docs/3.0.x/javadoc-api", + "http://download.oracle.com/javase/6/docs/api/" + ] + + exclude "org/springframework/data/keyvalue/redis/config/**" + } + title = "${rootProject.description} ${version} API" // collect all the sources that will be included in the javadoc output @@ -76,26 +95,13 @@ task api(type: Javadoc) { } } } - -// javadoc settings -api.options.outputLevel = org.gradle.external.javadoc.JavadocOutputLevel.QUIET -api.options.breakIterator = true -api.options.showFromProtected() -api.options.groups = [ - 'Spring Data Key Value Core': ['org.springframework.data.keyvalue*'], - 'Spring Data Redis Support' : ['org.springframework.data.keyvalue.redis*'], - 'Spring Data Riak Support' : ['org.springframework.data.keyvalue.riak*']] - -api.options.links = [ - "http://static.springframework.org/spring/docs/3.0.x/javadoc-api", - "http://download.oracle.com/javase/6/docs/api/"] - + apiSpec = copySpec { into('api') { from(api.destinationDir) } } - + task docSiteLogin(type: org.springframework.gradle.tasks.Login) { if (project.hasProperty('sshHost')) { host = project.property('sshHost') @@ -107,7 +113,8 @@ task docSiteLogin(type: org.springframework.gradle.tasks.Login) { // upload task task uploadApi(type: org.springframework.gradle.tasks.ScpUpload) { dependsOn api, docbook - description = "Upload API Distribution" + description = "Upload API Distribution" + group = "Distribution" remoteDir = "./static.spring/spring-data/data-keyvalue/docs/${project.version}" login = docSiteLogin