File tree Expand file tree Collapse file tree 2 files changed +29
-5
lines changed Expand file tree Collapse file tree 2 files changed +29
-5
lines changed Original file line number Diff line number Diff line change @@ -7,4 +7,5 @@ dependencies {
7
7
classpath ' nl.javadude.gradle.plugins:license-gradle-plugin:0.6.1'
8
8
classpath ' com.mapvine:gradle-cobertura-plugin:0.1'
9
9
classpath ' gradle-release:gradle-release:1.1.4'
10
+ classpath ' org.ajoberstar:gradle-git:0.5.0'
10
11
}
Original file line number Diff line number Diff line change @@ -63,11 +63,34 @@ subprojects { project ->
63
63
}
64
64
}
65
65
66
- task aggregateJavadoc (type : Javadoc ) {
67
- description = ' Aggregate all subproject docs into a single docs directory'
68
- source subprojects. collect {project -> project. sourceSets. main. allJava }
69
- classpath = files(subprojects. collect {project -> project. sourceSets. main. compileClasspath})
70
- destinationDir = new File (projectDir, ' doc' )
66
+ apply plugin : ' github-pages' // Used to create publishGhPages task
67
+
68
+ def docTasks = [:]
69
+ [Javadoc ,ScalaDoc ,Groovydoc ]. each { Class docClass ->
70
+ def allSources = allprojects. tasks* . withType(docClass). flatten()* . source
71
+ if (allSources) {
72
+ def shortName = docClass. simpleName. toLowerCase()
73
+ def docTask = task " aggregate${ shortName.capitalize()} " (type : docClass, description : " Aggregate subproject ${ shortName} s" ) {
74
+ source = allSources
75
+ doFirst {
76
+ def classpaths = allprojects. findAll { it. plugins. hasPlugin(JavaPlugin ) }. collect { it. sourceSets. main. compileClasspath }
77
+ classpath = files(classpaths)
78
+ }
79
+ }
80
+ docTasks[shortName] = docTask
81
+ processGhPages. dependsOn(docTask)
82
+ }
83
+ }
84
+
85
+ githubPages {
86
+ repoUri
= " [email protected] :quidryan/${ rootProject.githubProjectName} .git"
87
+ pages {
88
+ docTasks. each { shortName , docTask ->
89
+ from(docTask. outputs. files) {
90
+ into " docs/${ shortName} "
91
+ }
92
+ }
93
+ }
71
94
}
72
95
73
96
// Generate wrapper, which is distributed as part of source to alleviate the need of installing gradle
You can’t perform that action at this time.
0 commit comments