Commit 95dbe325 authored by Christian Meyer's avatar Christian Meyer
Browse files

fixed broken deployJavadoc task

ZmtDochostPlugin, ZmtDeployPlugin.groovy
    moved remotes declaration to from ZmtDeployPlugin to ZmtDochostPlugin
ZmtJavadocPlugin.groovy
    removed code working only in multi-project setup
parent 1b0694dc
......@@ -13,15 +13,6 @@ public class ZmtDeployPlugin implements Plugin<Project> {
apply plugin: "org.hidetake.ssh"
apply plugin: "distribution"
remotes {
dochost {
host = determineCredentials.host
knownHosts = allowAnyHosts
user = credentials.dochostUser
password = credentials.dochostPw
}
}
task('deployZip') {
group = 'Upload'
description = 'Uploads zip distribution to dochost.'
......
......@@ -12,6 +12,7 @@ import groovy.swing.*
class ZmtDochostPlugin implements Plugin<Project> {
private static final def CONFIGURE = {
apply plugin: 'nu.studer.credentials'
apply plugin: 'org.hidetake.ssh'
task('determineCredentials') {
description = 'Ask user to enter credentials.'
......@@ -20,6 +21,15 @@ class ZmtDochostPlugin implements Plugin<Project> {
onlyIf { !credentials.dochostUser || !credentials.dochostPw }
}
remotes {
dochost {
host = determineCredentials.host
knownHosts = allowAnyHosts
user = credentials.dochostUser
password = credentials.dochostPw
}
}
determineCredentials.doLast {
def console = System.console()
// we can access console: ask for username / password
......
......@@ -14,46 +14,10 @@ class ZmtJavadocPlugin implements Plugin<Project> {
apply plugin: be.jlrhome.gradle.plantuml.PlantumlPlugin
// use svg instead of the default (png)
plantuml.fileFormat = net.sourceforge.plantuml.FileFormat.SVG
// do javadoc setup after evaluating project build files
afterEvaluate {
def projectDependencies = configurations.compile.dependencies.withType(ProjectDependency.class)
// making compile dependency project evaluate before
projectDependencies.each {
dep -> evaluationDependsOn(dep.dependencyProject.path)
}
// add javadoc links from compile dependencies
// that have been evaluated before
project.javadoc {
javadoc {
ext.targetPath = 'javadoc/' + project.name
// intranet target javadoc url for this project
ext.targetUrl = 'http://dochost.intra.zmt/' + targetPath
options {
// add java api link to all projects
links << "http://docs.oracle.com/javase/7/docs/api/"
// get links from dependencies
projectDependencies.each {
def dependencyJavadoc = it.dependencyProject.javadoc
// add links of dependency
links.addAll(
dependencyJavadoc.options.links
)
// and offline link to dependency's target url
linksOffline.add(new JavadocOfflineLink(
dependencyJavadoc.targetUrl,
dependencyJavadoc.destinationDir.path
))
links.add(dependencyJavadoc.targetUrl)
// remove duplicates
links = links.unique()
}
}
}
options.links << 'http://docs.oracle.com/javase/8/docs/api/'
}
task('deployJavadoc') {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment