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> { ...@@ -13,15 +13,6 @@ public class ZmtDeployPlugin implements Plugin<Project> {
apply plugin: "org.hidetake.ssh" apply plugin: "org.hidetake.ssh"
apply plugin: "distribution" apply plugin: "distribution"
remotes {
dochost {
host = determineCredentials.host
knownHosts = allowAnyHosts
user = credentials.dochostUser
password = credentials.dochostPw
}
}
task('deployZip') { task('deployZip') {
group = 'Upload' group = 'Upload'
description = 'Uploads zip distribution to dochost.' description = 'Uploads zip distribution to dochost.'
......
...@@ -12,6 +12,7 @@ import groovy.swing.* ...@@ -12,6 +12,7 @@ import groovy.swing.*
class ZmtDochostPlugin implements Plugin<Project> { class ZmtDochostPlugin implements Plugin<Project> {
private static final def CONFIGURE = { private static final def CONFIGURE = {
apply plugin: 'nu.studer.credentials' apply plugin: 'nu.studer.credentials'
apply plugin: 'org.hidetake.ssh'
task('determineCredentials') { task('determineCredentials') {
description = 'Ask user to enter credentials.' description = 'Ask user to enter credentials.'
...@@ -19,6 +20,15 @@ class ZmtDochostPlugin implements Plugin<Project> { ...@@ -19,6 +20,15 @@ class ZmtDochostPlugin implements Plugin<Project> {
ext.wwwPath = '/var/www/dochost/' ext.wwwPath = '/var/www/dochost/'
onlyIf { !credentials.dochostUser || !credentials.dochostPw } onlyIf { !credentials.dochostUser || !credentials.dochostPw }
} }
remotes {
dochost {
host = determineCredentials.host
knownHosts = allowAnyHosts
user = credentials.dochostUser
password = credentials.dochostPw
}
}
determineCredentials.doLast { determineCredentials.doLast {
def console = System.console() def console = System.console()
......
...@@ -14,46 +14,10 @@ class ZmtJavadocPlugin implements Plugin<Project> { ...@@ -14,46 +14,10 @@ class ZmtJavadocPlugin implements Plugin<Project> {
apply plugin: be.jlrhome.gradle.plantuml.PlantumlPlugin apply plugin: be.jlrhome.gradle.plantuml.PlantumlPlugin
// use svg instead of the default (png) // use svg instead of the default (png)
plantuml.fileFormat = net.sourceforge.plantuml.FileFormat.SVG 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 javadoc {
// that have been evaluated before ext.targetPath = 'javadoc/' + project.name
project.javadoc { options.links << 'http://docs.oracle.com/javase/8/docs/api/'
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()
}
}
}
} }
task('deployJavadoc') { 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