Why Gradle?
Broad Platform Support
Java & JVM languages
Android’s build system
…
Robust Dependency Management
Straightforward dependencies
…
Powerful Yet Concise Logic
…
Dan Allen - @mojavelinux
Writing is a #$%@! ordeal.
Why Gradle?
Broad Platform Support
Java & JVM languages
Android’s build system
…
Robust Dependency Management
Straightforward dependencies
…
Powerful Yet Concise Logic
…
Yet we fabricate even more barriers.
Let’s fix that.
Bad
<class accessibility="public"
name="HelloWorld">
<annonymousBlock>
<method type="static"
accessibility="public"
inheritability="final"
name="main">
<arguments>
<variableArguments name="args"
type="java.lang.String"/>
</arguments>
<annonymousBlock>
<methodCall method="println"
object="java.lang.System.out">
<argument value="Hello World!"
type="java.lang.String"/>
</methodCall>
</annonymousBlock>
</method>
</annonymousBlock>
</class>
Good
= Getting Started with Java
Author Name
Here's your first Java application.
.HelloWorld.java
[source,java]
----
public class HelloWorld {
public static void main(String args[]) {
System.out.println("Hello, world!"); <1>
}
}
----
<1> Prints "Hello, world!" to the console.
Compile this source to a class file using `javac`.
Then, run the compiled class file using `java`.
AsciiDocsyntax | Asciidoctorparser + tools |
edit | read | version | share | convert |
No special markup is required.
A paragraph is just consecutive lines of text.
To start a paragraph, offset it by a blank line.
= Document Title
== Section Level 1
=== Section Level 2
==== Section Level 3
===== Section Level 4
====== Section Level 5
= Section Level 0 (book doctype only)
Unordered
| Ordered
|
| bold italic
custom |
|
| open |
| listing, source |
| literal |
| example, admonition |
| sidebar |
| quote |
:source-highlighter: coderay
[source,java]
----
public class HelloWorld {
public static void main(String args[]) {
System.out.println("Hello, world!"); <1>
}
}
----
<1> Prints "Hello, world!" to the console.
NOTE: For your info.
IMPORTANT: Don't forget!
image::tux.png[Tux,265,314]
video::SCZF6I-Rc4I[youtube,853,480]
icon:heart[2x]
<name>:<target>[<attributes>]
<name>::<target>[<attributes>]
Limit the markup you have to type,
not the markup you can type.
Custom syntax (issue:<id>[]
)
Custom converters (PDF, reveal.js, …)
AST transforms
+
gists
+
gitbook.io
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.2'
}
}
apply plugin: 'org.asciidoctor.convert'
asciidoctor {
attributes toc: 'left', icons: 'font'
}
asciidoctor {
extensions {
inlinemacro (name: 'issue') { parent, target, attrs ->
options = [
type: ':link',
target: "http://issues/browse/${target}".toString()
]
createInline(parent, 'anchor',
target, attrs, options).render()
}
}
}
⁃⁃⁃⁃⁃⁃⁃⁃⁃⁃⁃⁃.
⁃⁃⁃⁃⁃⁃.
⁃⁃⁃⁃⁃⁃⁃⁃⁃.
:uri-project: http://example.org
Find out more about {uri-project}[project name].
include::{uri-macros}/how_to_complete_this_guide.adoc[]
[source,groovy]
----
include::build.gradle[tag=repositories]
----
I find going back to Markdown akin to trading in utensils and eating with my hands.
I can do truly amazing things with my AsciiDoc source book
…this has very serious and interesting implications for the publishing industry as a whole.
Sarah White (@carbonfray)
#2: Comment it