diff options
author | Shevek <[email protected]> | 2014-12-03 00:01:47 -0800 |
---|---|---|
committer | Shevek <[email protected]> | 2014-12-03 00:01:47 -0800 |
commit | a3306f269ec75a617f7bf4ee6a292a961ba2c1f5 (patch) | |
tree | 59b477b295579dfd60d4de301ff475ce999c1744 /gradle/github.gradle | |
parent | 28c3704abb4f98989d6aa57dc1395df99a77f7d2 (diff) |
SourceChangeEvent now uses an enum.
-> gradle 2.2.1
Diffstat (limited to 'gradle/github.gradle')
-rw-r--r-- | gradle/github.gradle | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gradle/github.gradle b/gradle/github.gradle new file mode 100644 index 0000000..5aeaabe --- /dev/null +++ b/gradle/github.gradle @@ -0,0 +1,30 @@ +apply plugin: 'org.ajoberstar.github-pages' + +def docTasks = [:] +[Javadoc,ScalaDoc,Groovydoc].each{ Class docClass -> + def allSources = allprojects.tasks*.withType(docClass).flatten()*.source + if (allSources) { + def shortName = docClass.simpleName.toLowerCase() + def docTask = task "aggregate${shortName.capitalize()}"(type: docClass, description: "Aggregate subproject ${shortName}s") { + source = allSources + destinationDir = file("${project.buildDir}/docs/${shortName}") + doFirst { + def classpaths = allprojects.findAll { it.plugins.hasPlugin(JavaPlugin) }.collect { it.sourceSets.main.compileClasspath } + classpath = files(classpaths) + } + } + docTasks[shortName] = docTask + publishGhPages.dependsOn(docTask) + } +} + +githubPages { + repoUri = "[email protected]:shevek/${rootProject.githubProjectName}.git" + pages { + docTasks.each { shortName, docTask -> + from(docTask.outputs.files) { + into "docs/${shortName}" + } + } + } +} |