Skip to content
This repository has been archived by the owner on Jun 21, 2021. It is now read-only.

Commit

Permalink
Update README.adoc (#15)
Browse files Browse the repository at this point in the history
* Update README.adoc

* Update README.adoc
  • Loading branch information
Architechi authored and rdmueller committed Jun 17, 2018
1 parent 5866b2b commit 33bda74
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion README.adoc
Expand Up @@ -105,4 +105,39 @@ The following `pom.xml` sample shows how to use the `asciidoc2confluence.groovy`

=== Usage with Gradle

_to be done..._
The following build.gradle sample shows how to use the asciidoc2confluence.groovy script with your Gradle build. It will run when you execute the gradle task gradlew publishToConfluence.

----
buildscript {
dependencies {
//for the exportJiraIssues Task
classpath 'org.codehaus.groovy.modules.http-builder:http-builder:0.6'
//for the renderToConfluence Task
classpath 'org.apache.httpcomponents:httpmime:4.3.1'
classpath 'org.jsoup:jsoup:1.9.1'
}
repositories {
jcenter()
}
}
task publishToConfluence(
description: 'publishes the HTML rendered output to confluence',
group: 'docToolchain'
) {
// Directory containing the documents to be processed by docToolchain.
// If the documents are together with docToolchain, this can be relative path.
// If the documents are outside of docToolchain, this must be absolute path, usually provided
// on the command line with -P option given to gradle.
def docDir = file('.').path
def confluenceConfigFile = "scripts/ConfluenceConfig.groovy"
def confluenceScript = project.file('scripts/asciidoc2confluence.groovy')
doLast {
binding.setProperty('docDir', docDir)
binding.setProperty('confluenceConfigFile', confluenceConfigFile)
evaluate(confluenceScript)
}
}
----

0 comments on commit 33bda74

Please sign in to comment.