Skip to content

Commit 9b047a6

Browse files
urban-adeiningerremkop
authored andcommitted
Manual: present build scripts in tabs
1 parent 5aa084f commit 9b047a6

File tree

4 files changed

+90
-42
lines changed

4 files changed

+90
-42
lines changed

docs/index-docinfo-footer.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
newtoc.setAttribute('class', 'js-toc');
88
oldtoc.parentNode.replaceChild(newtoc, oldtoc);
99
tocbot.init({ contentSelector: '#content',
10-
headingSelector: 'h1, h2, h3, h4',
10+
headingSelector: 'h1, h2, h3, h4, h5',
1111
smoothScroll: false,
1212
collapseDepth: 3 });
1313
var handleTocOnResize = function() {
@@ -24,7 +24,7 @@
2424
}
2525
else {
2626
tocbot.refresh({ contentSelector: '#content',
27-
headingSelector: 'h1, h2, h3, h4',
27+
headingSelector: 'h1, h2, h3, h4, h5',
2828
smoothScroll: false,
2929
collapseDepth: 3 });
3030
}

docs/index.adoc

Lines changed: 84 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -265,14 +265,17 @@ The picocli Quick Guide shows other https://picocli.info/quick-guide.html#_examp
265265
You can add picocli as an external dependency to your project, or you can include it as source.
266266

267267
=== Add as External Dependency
268-
Below are examples of configuring Gradle or Maven to use picocli as an external dependency in your project.
268+
Below are examples of configuring Gradle or Maven to use picocli as an external dependency in your project:
269269

270-
==== Gradle
270+
.Gradle
271+
[source,groovy,role="primary"]
271272
----
272-
implementation 'info.picocli:picocli:4.5.3-SNAPSHOT'
273+
dependencies {
274+
implementation 'info.picocli:picocli:4.5.3-SNAPSHOT'
275+
}
273276
----
274-
275-
==== Maven
277+
.Maven
278+
[source,xml,role="secondary"]
276279
----
277280
<dependency>
278281
<groupId>info.picocli</groupId>
@@ -308,8 +311,25 @@ To configure this option, pass the `-Aproject=<some value>` to the javac compile
308311
===== IDE
309312
https://immutables.github.io/apt.html[This page] shows the steps to configure Eclipse and IntelliJ IDEA to enable annotation processing.
310313

311-
===== Maven
312-
```
314+
===== Using Build Tools
315+
316+
.Gradle
317+
[source,groovy,role="primary"]
318+
----
319+
dependencies {
320+
implementation 'info.picocli:picocli:4.5.3-SNAPSHOT'
321+
annotationProcessor 'info.picocli:picocli-codegen:4.5.3-SNAPSHOT'
322+
}
323+
324+
325+
compileJava {
326+
options.compilerArgs += ["-Aproject=${project.group}/${project.name}"]
327+
}
328+
----
329+
330+
.Maven
331+
[source,xml,role="secondary"]
332+
----
313333
<plugin>
314334
<groupId>org.apache.maven.plugins</groupId>
315335
<artifactId>maven-compiler-plugin</artifactId>
@@ -328,27 +348,12 @@ https://immutables.github.io/apt.html[This page] shows the steps to configure Ec
328348
</compilerArgs>
329349
</configuration>
330350
</plugin>
331-
```
351+
----
332352

333353
See the https://github.com/remkop/picocli/tree/master/picocli-codegen[`picocli-codegen` README] for more details.
334354

335-
336-
===== Gradle
337-
```
338-
dependencies {
339-
implementation 'info.picocli:picocli:4.5.3-SNAPSHOT'
340-
annotationProcessor 'info.picocli:picocli-codegen:4.5.3-SNAPSHOT'
341-
}
342-
```
343-
344-
```
345-
compileJava {
346-
options.compilerArgs += ["-Aproject=${project.group}/${project.name}"]
347-
}
348-
```
349-
350355
===== Kotlin Projects Using Gradle
351-
Kotlin projects should add the `kotlin-kapt` plugin to enable the Kotlin Annotation processing tool (kapt),
356+
Kotlin projects should add the `kotlin-kapt` plugin to enable the Kotlin Annotation processing tool (https://kotlinlang.org/docs/reference/kapt.html[kapt]),
352357
then replace `annotationProcessor` with `kapt`:
353358

354359
```
@@ -635,7 +640,7 @@ The https://github.com/remkop/picocli/blob/master/picocli-examples[`picocli-exam
635640
[CAUTION]
636641
.Interactive options and shell applications with JLine 2
637642
====
638-
Interactive options do not work in conjunction with JLine 2's `ConsoleReader`. Either implement a <<Custom Parameter Processing,`IParameterConsumer`>> which uses JLine2's `ConsoleReader` directly or use `picocli-shell-jline3`.
643+
Interactive options do not work in conjunction with JLine 2's `ConsoleReader`. Either implement a <<Custom Parameter Processing,`IParameterConsumer`>> which uses JLine2's `ConsoleReader` directly or use https://github.com/remkop/picocli/tree/master/picocli-shell-jline3[`picocli-shell-jline3`].
639644
====
640645

641646
=== Short (POSIX) Options
@@ -10380,7 +10385,6 @@ Since picocli dependencies are not available in the Spring Initializr, we have t
1038010385
.Maven
1038110386
[source,xml,role="primary"]
1038210387
----
10383-
<dependency>
1038410388
<dependency>
1038510389
<groupId>info.picocli</groupId>
1038610390
<artifactId>picocli-spring-boot-starter</artifactId>
@@ -11029,8 +11033,8 @@ X-Mailer: Picocli/Quarkus <1>
1102911033
X-Mailer-Version: 1.0 <2>
1103011034
# ...
1103111035
----
11032-
<1> Custom Header line 1, starting with ´X-` as defined in https://tools.ietf.org/html/rfc822[RFC 822]
11033-
<2> Custom Header line 2
11036+
<1> Custom header line 1, starting with `X-` as defined in https://tools.ietf.org/html/rfc822[RFC 822]
11037+
<2> Custom header line 2
1103411038

1103511039
The Quarkus guide for the https://quarkus.io/guides/picocli[Command mode with Picocli] has extended information on the Quarkus Picocli integration.
1103611040

@@ -11834,14 +11838,25 @@ Previous versions are available from the GitHub project https://github.com/remko
1183411838

1183511839
== Download
1183611840
You can add picocli as an external dependency to your project, or you can include it as source.
11837-
See the <<Source,source code>> below. Copy and paste it into a file called `CommandLine.java`, add it to your project, and enjoy!
1183811841

11839-
=== Gradle
11842+
=== Build tools
11843+
11844+
.Gradle
11845+
[source,groovy,role="primary"]
1184011846
----
1184111847
implementation 'info.picocli:picocli:4.5.3-SNAPSHOT'
1184211848
----
1184311849

11844-
=== Maven
11850+
.Gradle (Kotlin)
11851+
[source,kotlin,role="secondary"]
11852+
----
11853+
dependencies {
11854+
implementation("info.picocli:picocli-spring-boot-starter:4.5.3-SNAPSHOT")
11855+
}
11856+
----
11857+
11858+
.Maven
11859+
[source,xml,role="secondary"]
1184511860
----
1184611861
<dependency>
1184711862
<groupId>info.picocli</groupId>
@@ -11850,19 +11865,52 @@ implementation 'info.picocli:picocli:4.5.3-SNAPSHOT'
1185011865
</dependency>
1185111866
----
1185211867

11853-
=== Scala SBT
11868+
.Scala SBT
11869+
[source,role="secondary"]
1185411870
----
1185511871
libraryDependencies += "info.picocli" % "picocli" % "4.5.3-SNAPSHOT"
1185611872
----
1185711873

11858-
=== Ivy
11859-
11874+
.Ivy
11875+
[source,role="secondary"]
1186011876
----
1186111877
<dependency org="info.picocli" name="picocli" rev="4.5.3-SNAPSHOT" />
1186211878
----
1186311879

11880+
.Grape
11881+
[source,role="secondary"]
11882+
----
11883+
@Grapes(
11884+
@Grab(group='info.picocli', module='picocli', version='4.5.2')
11885+
)
11886+
----
11887+
11888+
.Leiningen
11889+
[source,role="secondary"]
11890+
----
11891+
[info.picocli/picocli "4.5.2"]
11892+
----
11893+
11894+
.Buildr
11895+
[source,role="secondary"]
11896+
----
11897+
'info.picocli:picocli:jar:4.5.2'
11898+
----
11899+
11900+
.Leiningen
11901+
[source,role="secondary"]
11902+
----
11903+
[info.picocli/picocli "4.5.2"]
11904+
----
11905+
11906+
.JBang
11907+
[source,role="secondary"]
11908+
----
11909+
//DEPS info.picocli:picocli:4.5.2
11910+
----
11911+
1186411912
=== Source
1186511913

11914+
By using picocli in source form, you can avoid having an external dependency on picocli.
1186611915
Picocli has only one source file: link:https://github.com/remkop/picocli/blob/master/src/main/java/picocli/CommandLine.java[CommandLine.java].
11867-
This facilitates including it in your project in source form to avoid having an external dependency on picocli.
11868-
11916+
This facilitates including picocli in your project: simply copy and paste the code of this file into a file called `CommandLine.java`, add it to your project, and enjoy!

docs/quick-guide.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ class SubcommandAsClass : Runnable {
285285
286286
override fun run() {
287287
for (code in languageCodes) {
288-
System.out.println("${code.toLowerCase()}: ${Locale(code).displayLanguage}")
288+
println("${code.toLowerCase()}: ${Locale(code).displayLanguage}")
289289
}
290290
}
291291
}

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ groovyVersion = 2.4.10
55
hamcrestCoreVersion = 1.3
66
ivyVersion = 2.4.0
77
jacocoVersion = 0.8.2
8-
jansiVersion = 1.15
8+
jansiVersion = 2.0.1
99
jlineVersion = 2.14.6
10-
jline3Version = 3.16.0
10+
jline3Version = 3.17.1
1111
junitDepVersion = 4.11
1212
junitVersion = 4.12
13-
springBootVersion = 2.3.5.RELEASE
13+
springBootVersion = 2.4.0
1414

1515
# projectPreviousReleaseVersion is non-SNAPSHOT, only published releases
1616
projectPreviousReleaseVersion = 4\\.5\\.2

0 commit comments

Comments
 (0)