Skip to content

Commit

Permalink
WIP: testing
Browse files Browse the repository at this point in the history
  • Loading branch information
abelsromero committed Mar 9, 2024
1 parent 6f21ce5 commit ff78135
Show file tree
Hide file tree
Showing 34 changed files with 48 additions and 217 deletions.
9 changes: 6 additions & 3 deletions docs/antora/antora.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: gradle-plugin
title: Gradle Plugin Suite
version: 4.0
version: '4.0'
asciidoc:
attributes:
release-version: 4.0.2
Expand All @@ -14,11 +14,14 @@ asciidoc:
asciidoctor-maven-plugin-name: Asciidoctor Maven Plugin
asciidoctor-maven-plugin-url: https://github.com/asciidoctor/asciidoctor-maven-plugin
asciidoctor-url: https://asciidoctor.org
asciidoctorj-epub-name: Asciidoctorj-EPUB
asciidoctorj-epub-name: Asciidoctorj EPUB3
asciidoctorj-epub-url: https://github.com/asciidoctor/asciidoctorj-epub3
asciidoctorj-name: AsciidoctorJ
asciidoctorj-pdf-name: Asciidoctorj-PDF
asciidoctorj-pdf-name: Asciidoctorj PDF
asciidoctorj-pdf-url: https://github.com/asciidoctor/asciidoctorj-pdf
asciidoctorj-url: https://github.com/asciidoctor/asciidoctorj
asciidoctorjs-name: Asciidoctor.js
asciidoctorjs-url: https://github.com/asciidoctor/asciidoctor.js
gradle-url: https://gradle.org/
issues-asciidoctorj: https://github.com/asciidoctor/asciidoctorj/issues/
issues-jruby: https://github.com/asciidoctor/asciidoctorj/issues/
Expand Down
1 change: 1 addition & 0 deletions docs/antora/modules/ROOT/examples/base
1 change: 1 addition & 0 deletions docs/antora/modules/ROOT/examples/jvm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* xref:compatibility.adoc[]
* xref:index.adoc[]
* xref:compatibility.adoc[]
* xref:quick-start.adoc[]
* xref:common-task-configuration.adoc[]
Expand All @@ -8,8 +8,8 @@
* xref:asciidoctorj-epub-plugin.adoc[]
* xref:asciidoctorj-revealjs-plugin.adoc[]
// * xref:asciidoctorj-leanpub-plugin.adoc[]
* xref:asciidoctor-diagram.adoc[]
* xref:asciidoctorj-gems-plugin.adoc[]
* xref:asciidoctor-diagram.adoc[]
// * xref:kindlegen-plugin.adoc[]
* xref:asciidoctorj-custom-extensions.adoc[]
* xref:asciidoctorjs-plugin.adoc[]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[[diagram]]
= Using AsciidoctorJ Diagram

The new plugins have built-in support for `asciidoctorj-diagram`. Simply add the following to the project or task extension and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ asciidoctor {
The {asciidoctorj-name}-specific entities that can be set are:

[horizontal]
include::{plugin-jvm}/main/groovy/org/asciidoctor/gradle/jvm/AsciidoctorJExtension.groovy[indent=0,tags="extension-property"]
include::ROOT:example$jvm/src/main/groovy/org/asciidoctor/gradle/jvm/AsciidoctorJExtension.groovy[indent=0,tags="extension-property"]

The following common entities can also be set:

[horizontal]
include::{plugin-base}/main/groovy/org/asciidoctor/gradle/base/AbstractImplementationEngineExtension.groovy[indent=0,tags="extension-property"]
include::ROOT:example$base/src/main/groovy/org/asciidoctor/gradle/base/AbstractImplementationEngineExtension.groovy[indent=0,tags="extension-property"]

// TODO: Split attributes into a standalone section that is not part of base plugin.
[#options-and-attributes]
Expand Down Expand Up @@ -139,13 +139,14 @@ asciidoctorj {
}
}
----
<1> {asciidoctorj-epub-name} version. If not specified asciidoctorj-epub will not be on the classpath. If you plan to use the EPUB backend and not using the EPUB plugin, then you need to set a version here.
<2> {asciidoctorj-pdf-name} version. If not specified asciidoctorj-pdf will not be on the classpath. If you plan to use the PDF backend and not using the PDF plugin, then you need to set a version here.
<3> See <<diagram,AsciidoctorJ Diagram>>,
<4> Version of Groovy Extensions DSL. If not specified and no extensions are specified, Groovy DSL will not be used. However, if any extensions are added without setting an explicit version and default version will be used.
<5> {asciidoctorj-leanpub-name} version. If not specified asciidoctorj-leanpub will not be on the classpath. If you plan to use the Leanpub backend and not using the Leanpub plugin, then you need to set a version here.
<1> {asciidoctorj-pdf-url}[{asciidoctorj-pdf-name}] version. If not specified asciidoctorj-pdf will not be on the classpath. If you plan to use the PDF backend and not using the PDF plugin, then you need to set a version here.
<2> {asciidoctorj-epub-url}[{asciidoctorj-epub-name}] version. If not specified asciidoctorj-epub will not be on the classpath. If you plan to use the EPUB backend and not using the EPUB plugin, then you need to set a version here.
<3> See xref:page$asciidoctor-diagram.adoc[].
<4> Version of https://github.com/asciidoctor/asciidoctorj-groovy-dsl[Groovy Extensions DSL]. If not specified and no extensions are specified, Groovy DSL will not be used. However, if any extensions are added without setting an explicit version and default version will be used.
<5> https://github.com/asciidoctor/asciidoctor-leanpub-converter[Asciidoctor Leanpub Converter] version. If not specified asciidoctorj-leanpub will not be on the classpath. If you plan to use the Leanpub backend and not using the Leanpub plugin, then you need to set a version here.

When using the {kotlin-dsl} the same settings can be achieved use something similar `getModules().getPdf().version("1.2.3")`. In a similar fashion shortcuts can be achieved in the {groovy-dsl}:
When using the Kotlin DSL the same settings can be achieved use something similar `getModules().getPdf().version("1.2.3")`.
In a similar fashion shortcuts can be achieved in the Groovy DSL:

[source,groovy,role="primary"]
.build.gradle
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[[asciidoctorj-extensions,Adding custom {asciidoctorj-name} extensions]]
= Adding Custom Extensions

Starting with version 1.5.0 you were able to write your own Asciidoctor extensions in Groovy, or any other JVM language
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[[asciidoctorj-epub-plugin,{asciidoctorj-name} EPUB plugin]]
= The AsciidoctorEpub Plugin
= {asciidoctorj-name} EPUB plugin

INFO: As from version 3.3 support for KindleGen is dropped as Amazon no longer has the binary available for download.

Expand All @@ -22,7 +21,7 @@ plugins {
----
When applying `org.asciidoctor.jvm.epub` it creates a single task of type `org.asciidoctor.gradle.jvm.epub.AsciidoctorEpubTask` which is then configured to:

* Output source to "${buildDir}/docs/asciidocEpub"
* Output source to "$\{buildDir}/docs/asciidocEpub"
* Not to copy any resources to the output directory
* It will set also a default version for `asciidoctorj-epub` artifact. To override set `asciidoctorj.epubVersion` or `asciidoctorEpub.asciidoctorj.epubVersion`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[[asciidoctorj-gems-plugin,AsciidoctorJ GEMs plugin]]
= Ruby GEM support
= AsciidoctorJ GEMs plugin

GEM support is simplified via the `org.asciidoctor.jvm.gems` plugin.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[[asciidoctorj-leanpub-plugin,{asciidoctorj-name} Leanpub plugin]]
= The AsciidoctorLeanpub Plugin
= {asciidoctorj-name} Leanpub plugin

When applying `org.asciidoctor.jvm.leanpub` it creates a single task of type `org.asciidoctor.gradle.jvm.epub.AsciidoctorLeanTask` which is then configured to:

* Output source to "${buildDir}/docs/asciidocLeanpub".
* Output source to "$\{buildDir}/docs/asciidocLeanpub".
* Set also a default version for `asciidoctor-leanpub-backend` artifact.
To override set `asciidoctorj.leanpubVersion` or `asciidoctorLeanpub.asciidoctorj.leanpubVersion`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
:AsciidoctorPdfTask-url: {groovydoc-jvm}/AsciidoctorPdfTask.html
[[asciidoctorj-pdf-plugin,AsciidoctorJ PDF plugin]]
= The AsciidoctorPdf Plugin
= {asciidoctorj-pdf-name} plugin

[source,groovy,role="primary"]
[subs=attributes+]
Expand All @@ -24,7 +22,7 @@ When applying `org.asciidoctor.jvm.pdf` it creates a single task of type `org.as

The default task is named `asciidoctorPdf` and is configured to:

* Output source to "${buildDir}/docs/asciidocPdf".
* Output source to "$\{buildDir}/docs/asciidocPdf".
* Not to copy any resources to the output directory.
* It will set also a default version for `asciidoctorj-pdf` artifact. To override set `asciidoctorj.pdfVersion` or `asciidoctorPdf.asciidoctorj.pdfVersion`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
= The New AsciidoctorJ Plugin
= AsciidoctorJ Plugin

[source,groovy,role="primary"]
[subs=attributes+]
Expand All @@ -21,6 +21,6 @@ plugins {
When applying `org.asciidoctor.jvm.convert` it creates a single task of type `org.asciidoctor.gradle.jvm.AsciidoctorTask` called `asciidoctor`.

By convention, it sets the
* `sourceDir` to `src/docs/asciidoc`
* `outputDir` to `${buildDir}/docs/asciidoc`

* `sourceDir` to `src/docs/asciidoc`
* `outputDir` to `$\{buildDir}/docs/asciidoc`
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[[asciidoctorj-revealjs-plugin,AsciidoctorJ Reveal.js plugin]]
= The AsciidoctorJ Reveal.js Plugin
= AsciidoctorJ Reveal.js plugin

[source,groovy,role="primary"]
[subs=attributes+]
Expand All @@ -24,15 +23,15 @@ When applying `org.asciidoctor.jvm.revealjs` support is added for creating slide
* Create a task called `asciidoctorRevealJs`.
* Create an extension called `revealjs` which is used for configuring the version of Reveal.js as well as a template.
* Create an extension called `revealjsPlugins` which will allow for downloading additional Reveal.js plugins.
* Output source to "${buildDir}/docs/asciidocRevealJs"
* Output source to "$\{buildDir}/docs/asciidocRevealJs"
* Copy all resources to the output directory including Reveal.js templates.
* Apply the `org.asciidoctor.jvm.gems` plugin as GEM support is required.
The `AsciidoctorRevealJSTask` task type has the following additional methods:

[horizontal]
revealjsOptions:: Configure special Reveal.js options.
Can be configured via Closure or Action. See <<RevealJsOptions>> for more details.
Can be configured via Closure or Action. See xref:#RevealJsOptions[] for more details.
templateDir:: Location where the template directory will be located on disk before Asciidoctor processing starts.
theme:: The Reveal.js theme to use.
The theme must match one from the template.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
[[asciidoctorjs-plugin,{asciidoctorjs-name} plugin]]
= Working with Asciidoctor.js instead

Instead of {asciidoctorj-name}, {asciidoctorjs-name} can be used as a rendering engine as from 3.0.
Instead of {asciidoctorj-name}, {asciidoctorjs-url}[{asciidoctorjs-name}] can be used as a rendering engine from 3.0.

The configuration follows much the same as for {asciidoctorj-name}, but will a couple of differences.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ If you do not want this behaviour, then it can be turned off by doing
copyNoResources()
----

If you are using multiple languages and you have identical resource patterns for each language within `sourceDir/${lang}` you need to explicitly declare those on a per-language basis:
If you are using multiple languages and you have identical resource patterns for each language within `sourceDir/$\{lang}` you need to explicitly declare those on a per-language basis:

[source,groovy,role="primary"]
.build.gradle
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ task standalonePdfConverter(type: DeckTapeTask) {
<3> If screenshots are activated, then screenshot images of the slides are also produced.
<4> Image format. PMG and JPG are supported.
<5> Width and height of the exported slides.
<6> Range of slides to export. By default all are exported.
<6> Range of slides to export. By default, all are exported.

=== Combining with Reveal.js plugin
== Combining with Reveal.js plugin

If you do

Expand All @@ -60,6 +60,6 @@ plugins {
}
----

a little bit of _magic_ happens. A task called on `asciidoctorRevealJsExport` is created on demand from a rule and all of the appropriate properties are set on it so that it can export slides created by the `asciidoctorRevealJs` task.
a little bit of _magic_ happens. A task called on `asciidoctorRevealJsExport` is created on demand from a rule and all the appropriate properties are set on it so that it can export slides created by the `asciidoctorRevealJs` task.

You can configure the `asciidoctorRevealJsExport` task like any other `DeckTapeTask`.
10 changes: 10 additions & 0 deletions docs/antora/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
= Asciidoctor Gradle Plugin Suite
:navtitle: Introduction

The {doctitle} is the official means of using {asciidoctor-url}[Asciidoctor] to convert all your {asciidoc-url}[AsciiDoc] documentation using {gradle-url}[Gradle].

This started as a port of the {asciidoctor-maven-plugin-url}[asciidoctor-maven-plugin-name] project founded by {lightguard} and relies on {asciidoctorj-url}[{asciidoctorj-name}] which was founded by {lordofthejars}.
In fact the 1.5.x series of the {plugin-name} can still be considered a port.

However, with 2.x series came a complete departure with functionality far exceeding any lightweight markup plugins for any other build tool.
With the 3.x serious allows for even more flexibility and options for the creation of a true DocuOps pipeline by bringing together Gradle as a powerful and generic build tool, and Asciidoctor as an agile and lightweight document generator.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions docs/antora/modules/file.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
some text
11 changes: 0 additions & 11 deletions docs/src/docs/asciidoc/appendix/hacking.adoc

This file was deleted.

10 changes: 0 additions & 10 deletions docs/src/docs/asciidoc/appendix/known-limitations.adoc

This file was deleted.

76 changes: 0 additions & 76 deletions docs/src/docs/asciidoc/appendix/tips-and-tricks.adoc

This file was deleted.

22 changes: 0 additions & 22 deletions docs/src/docs/asciidoc/attributes.adoc

This file was deleted.

Loading

0 comments on commit ff78135

Please sign in to comment.