Skip to content

Commit

Permalink
Convert to latest Asciidoctor gradle plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
deining authored and remkop committed Oct 5, 2020
1 parent 2453cb4 commit 2a34abd
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
14 changes: 12 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ buildscript {
}

dependencies {
classpath "org.asciidoctor:asciidoctor-gradle-plugin:$asciidoctorGradlePluginVersion"
classpath "org.asciidoctor:asciidoctor-gradle-jvm:$asciidoctorGradlePluginVersion"
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-beta.8'
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:$gradleBintrayPluginVersion"
classpath "gradle.plugin.org.beryx:badass-jar:1.1.3"
Expand All @@ -27,7 +27,7 @@ buildscript {
}
}

apply plugin: 'org.asciidoctor.convert' // version '1.5.8.1'
apply plugin: 'org.asciidoctor.jvm.convert' // version '3.2.0'
apply plugin: 'distribution'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
Expand Down Expand Up @@ -63,6 +63,15 @@ pluginManager.withPlugin('biz.aQute.bnd.builder') { // if plugin applied, execut
}
}

pluginManager.withPlugin('org.asciidoctor.jvm.convert') { // if plugin applied, execute this action
configurations {
tabbedCodeExt
}
dependencies {
tabbedCodeExt "com.bmuschko:asciidoctorj-tabbed-code-extension:0.3"
}
}

allprojects {
apply plugin: 'java'
apply plugin: 'java-library' // to avoid https://github.com/gradle/gradle/issues/1118
Expand Down Expand Up @@ -248,6 +257,7 @@ asciidoctor {
sourceDir = file('docs')
outputDir = file('build/docs')
logDocuments = true
configurations 'tabbedCodeExt'
// backends 'pdf', 'html'
// attributes 'sourcedir': file('docs') //project.sourceSets.main.java.srcDirs[0]
//// attributes 'pdf-stylesdir': 'theme',
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asciidoctorGradlePluginVersion = 1.6.1
asciidoctorGradlePluginVersion = 3.2.0
compileTestingVersion = 0.18
gradleBintrayPluginVersion = 1.+
groovyVersion = 2.4.10
Expand Down
6 changes: 4 additions & 2 deletions picocli-codegen/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,14 @@ task generateManpageAsciiDoc(type: JavaExec) {
}
}

apply plugin: 'org.asciidoctor.convert'
apply plugin: 'org.asciidoctor.jvm.convert'
asciidoctor {
dependsOn(generateManpageAsciiDoc)
sourceDir = file("${project.buildDir}/picocli-generated-docs")
outputDir = file("${project.buildDir}/docs")
logDocuments = true
backends 'manpage', 'html5'
outputOptions {
backends = ['manpage', 'html5']
}
}
javadoc.dependsOn('asciidoctor')
6 changes: 3 additions & 3 deletions picocli-examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
}

dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10"
}
}

Expand All @@ -25,7 +25,7 @@ dependencies {
compile rootProject
compile project(':picocli-groovy')
implementation "org.jetbrains.kotlin:kotlin-stdlib"
implementation 'org.scala-lang:scala-library:2.13.2'
implementation 'org.scala-lang:scala-library:2.13.3'
ivy "org.apache.ivy:ivy:$ivyVersion" // for Intelli/J
compile "org.codehaus.groovy:groovy-all:$groovyVersion",
"org.apache.ivy:ivy:$ivyVersion", // for Intelli/J
Expand All @@ -38,7 +38,7 @@ dependencies {
"org.hibernate.validator:hibernate-validator-annotation-processor:6.1.2.Final",
"javax.el:javax.el-api:3.0.0",
"org.glassfish.web:javax.el:2.2.6"
implementation "org.jetbrains.kotlin:kotlin-script-runtime:1.3.72"
implementation "org.jetbrains.kotlin:kotlin-script-runtime:1.4.10"
}
tasks.withType(GroovyCompile) {
// this, and the `configurations {ivy}` section, are a workaround for the dreaded
Expand Down

0 comments on commit 2a34abd

Please sign in to comment.