Skip to content

Commit

Permalink
Release picocli-jansi-graalvm version 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
remkop committed Jul 4, 2020
1 parent c50dbb3 commit b615526
Show file tree
Hide file tree
Showing 16 changed files with 79 additions and 55 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ In your project, we recommend you use the following dependencies:
```
// Gradle example
dependencies {
compile "info.picocli:picocli:4.2.0"
compile "info.picocli:picocli-jansi-graalvm:1.1.0"
compile "info.picocli:picocli:4.3.2"
compile "info.picocli:picocli-jansi-graalvm:1.2.0"
compile "org.fusesource.jansi:jansi:1.18"
annotationProcessor "info.picocli:picocli-codegen:4.2.0"
annotationProcessor "info.picocli:picocli-codegen:4.3.2"
}
```

Expand Down Expand Up @@ -112,7 +112,7 @@ set GRAAL_HOME=C:\apps\graalvm-ce-19.2.1
:: compile our my.pkg.MyApp class (assuming the source is in the .\src directory)
mkdir classes
javac -cp ^
.;picocli-4.2.0.jar;picocli-codegen-4.2.0.jar;jansi-1.18.jar;picocli-jansi-graalvm-1.1.0.jar ^
.;picocli-4.3.2.jar;picocli-codegen-4.3.2.jar;jansi-1.18.jar;picocli-jansi-graalvm-1.2.0.jar ^
-sourcepath src ^
-d classes src\my\pkg\MyApp.java
Expand All @@ -121,7 +121,7 @@ cd classes && jar -cvef my.pkg.MyApp ../myapp.jar * && cd ..
:: generate native image
%GRAAL_HOME%\bin\native-image ^
-cp picocli-4.2.0.jar;jansi-1.18.jar;picocli-jansi-graalvm-1.1.0.jar;myapp.jar ^
-cp picocli-4.3.2.jar;jansi-1.18.jar;picocli-jansi-graalvm-1.2.0.jar;myapp.jar ^
my.pkg.MyApp myapp
```

Expand Down Expand Up @@ -164,7 +164,7 @@ The `jni-config.json` file contains JNI configuration for all classes, methods a
The following command can be used to regenerate it:

```
java -cp picocli-4.2.0.jar;jansi-1.18.jar;picocli-codegen-4.2.0.jar ^
java -cp picocli-4.3.2.jar;jansi-1.18.jar;picocli-codegen-4.3.2.jar ^
picocli.codegen.aot.graalvm.JniConfigGenerator ^
org.fusesource.jansi.internal.CLibrary ^
org.fusesource.jansi.internal.Kernel32 ^
Expand Down
24 changes: 24 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# <a name="1.2.0"></a> 1.2.0 - Support `org.fusesource.jansi.Ansi.disable` property

This release adds support for the `org.fusesource.jansi.Ansi.disable` system property: if this property exists and is equal to, ignoring case, the string `"true"`, then no Jansi classes will be loaded.

The use of Jansi may cause problems for applications when running in some restricted Windows environments.
The problem is that AppLocker can forbid loading of non-signed libraries from the Windows temporary folder.

Jansi extracts a dll to the temporary folder of Windows as soon as one of its class is loaded, like when the `org.fusesource.jansi.AnsiConsole::systemInstall` method is called.

With this version of `picocli-jansi-graalvm`, applications can safely use the `picocli.jansi.graalvm.AnsiConsole::windowsInstall` method as below:

```java
public static void main(String[] args) {
// only loads Jansi classes if `org.fusesource.jansi.Ansi.disable` is not true
try (AnsiConsole ansi = AnsiConsole.windowsInstall()) { // enable colors on Windows
new CommandLine(new MyApp()).execute(args);
} // Closeable does cleanup when done
}
```

This internally checks the value of the `org.fusesource.jansi.Ansi.disable` system property before calling the `org.fusesource.jansi.AnsiConsole::systemInstall` method

End users can use this system property to use the application with reduced functionality, rather than being prevented from using the application altogether.

# <a name="1.1.0"></a> 1.1.0 - Closeable

This release adds a convenience API to reduce code in the application.
Expand Down
6 changes: 3 additions & 3 deletions docs/apidocs/allclasses-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_202) on Thu Nov 07 22:02:34 JST 2019 -->
<title>All Classes (picocli-jansi-graalvm 1.1.0 API)</title>
<meta name="date" content="2019-11-07">
<!-- Generated by javadoc (1.8.0_202) on Sat Jul 04 14:07:38 JST 2020 -->
<title>All Classes (picocli-jansi-graalvm 1.2.0 API)</title>
<meta name="date" content="2020-07-04">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
Expand Down
6 changes: 3 additions & 3 deletions docs/apidocs/allclasses-noframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_202) on Thu Nov 07 22:02:34 JST 2019 -->
<title>All Classes (picocli-jansi-graalvm 1.1.0 API)</title>
<meta name="date" content="2019-11-07">
<!-- Generated by javadoc (1.8.0_202) on Sat Jul 04 14:07:38 JST 2020 -->
<title>All Classes (picocli-jansi-graalvm 1.2.0 API)</title>
<meta name="date" content="2020-07-04">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
Expand Down
8 changes: 4 additions & 4 deletions docs/apidocs/constant-values.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_202) on Thu Nov 07 22:02:34 JST 2019 -->
<title>Constant Field Values (picocli-jansi-graalvm 1.1.0 API)</title>
<meta name="date" content="2019-11-07">
<!-- Generated by javadoc (1.8.0_202) on Sat Jul 04 14:07:38 JST 2020 -->
<title>Constant Field Values (picocli-jansi-graalvm 1.2.0 API)</title>
<meta name="date" content="2020-07-04">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Constant Field Values (picocli-jansi-graalvm 1.1.0 API)";
parent.document.title="Constant Field Values (picocli-jansi-graalvm 1.2.0 API)";
}
}
catch(err) {
Expand Down
8 changes: 4 additions & 4 deletions docs/apidocs/deprecated-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_202) on Thu Nov 07 22:02:34 JST 2019 -->
<title>Deprecated List (picocli-jansi-graalvm 1.1.0 API)</title>
<meta name="date" content="2019-11-07">
<!-- Generated by javadoc (1.8.0_202) on Sat Jul 04 14:07:38 JST 2020 -->
<title>Deprecated List (picocli-jansi-graalvm 1.2.0 API)</title>
<meta name="date" content="2020-07-04">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Deprecated List (picocli-jansi-graalvm 1.1.0 API)";
parent.document.title="Deprecated List (picocli-jansi-graalvm 1.2.0 API)";
}
}
catch(err) {
Expand Down
8 changes: 4 additions & 4 deletions docs/apidocs/help-doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_202) on Thu Nov 07 22:02:34 JST 2019 -->
<title>API Help (picocli-jansi-graalvm 1.1.0 API)</title>
<meta name="date" content="2019-11-07">
<!-- Generated by javadoc (1.8.0_202) on Sat Jul 04 14:07:38 JST 2020 -->
<title>API Help (picocli-jansi-graalvm 1.2.0 API)</title>
<meta name="date" content="2020-07-04">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="API Help (picocli-jansi-graalvm 1.1.0 API)";
parent.document.title="API Help (picocli-jansi-graalvm 1.2.0 API)";
}
}
catch(err) {
Expand Down
8 changes: 4 additions & 4 deletions docs/apidocs/index-all.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_202) on Thu Nov 07 22:02:34 JST 2019 -->
<title>Index (picocli-jansi-graalvm 1.1.0 API)</title>
<meta name="date" content="2019-11-07">
<!-- Generated by javadoc (1.8.0_202) on Sat Jul 04 14:07:38 JST 2020 -->
<title>Index (picocli-jansi-graalvm 1.2.0 API)</title>
<meta name="date" content="2020-07-04">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Index (picocli-jansi-graalvm 1.1.0 API)";
parent.document.title="Index (picocli-jansi-graalvm 1.2.0 API)";
}
}
catch(err) {
Expand Down
4 changes: 2 additions & 2 deletions docs/apidocs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_202) on Thu Nov 07 22:02:34 JST 2019 -->
<title>picocli-jansi-graalvm 1.1.0 API</title>
<!-- Generated by javadoc (1.8.0_202) on Sat Jul 04 14:07:38 JST 2020 -->
<title>picocli-jansi-graalvm 1.2.0 API</title>
<script type="text/javascript">
tmpTargetPage = "" + window.location.search;
if (tmpTargetPage != "" && tmpTargetPage != "undefined")
Expand Down
8 changes: 4 additions & 4 deletions docs/apidocs/overview-tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_202) on Thu Nov 07 22:02:34 JST 2019 -->
<title>Class Hierarchy (picocli-jansi-graalvm 1.1.0 API)</title>
<meta name="date" content="2019-11-07">
<!-- Generated by javadoc (1.8.0_202) on Sat Jul 04 14:07:38 JST 2020 -->
<title>Class Hierarchy (picocli-jansi-graalvm 1.2.0 API)</title>
<meta name="date" content="2020-07-04">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Class Hierarchy (picocli-jansi-graalvm 1.1.0 API)";
parent.document.title="Class Hierarchy (picocli-jansi-graalvm 1.2.0 API)";
}
}
catch(err) {
Expand Down
8 changes: 4 additions & 4 deletions docs/apidocs/picocli/jansi/graalvm/AnsiConsole.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_202) on Thu Nov 07 22:02:34 JST 2019 -->
<title>AnsiConsole (picocli-jansi-graalvm 1.1.0 API)</title>
<meta name="date" content="2019-11-07">
<!-- Generated by javadoc (1.8.0_202) on Sat Jul 04 14:07:38 JST 2020 -->
<title>AnsiConsole (picocli-jansi-graalvm 1.2.0 API)</title>
<meta name="date" content="2020-07-04">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="AnsiConsole (picocli-jansi-graalvm 1.1.0 API)";
parent.document.title="AnsiConsole (picocli-jansi-graalvm 1.2.0 API)";
}
}
catch(err) {
Expand Down
8 changes: 4 additions & 4 deletions docs/apidocs/picocli/jansi/graalvm/Workaround.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_202) on Thu Nov 07 22:02:34 JST 2019 -->
<title>Workaround (picocli-jansi-graalvm 1.1.0 API)</title>
<meta name="date" content="2019-11-07">
<!-- Generated by javadoc (1.8.0_202) on Sat Jul 04 14:07:38 JST 2020 -->
<title>Workaround (picocli-jansi-graalvm 1.2.0 API)</title>
<meta name="date" content="2020-07-04">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Workaround (picocli-jansi-graalvm 1.1.0 API)";
parent.document.title="Workaround (picocli-jansi-graalvm 1.2.0 API)";
}
}
catch(err) {
Expand Down
6 changes: 3 additions & 3 deletions docs/apidocs/picocli/jansi/graalvm/package-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_202) on Thu Nov 07 22:02:34 JST 2019 -->
<title>picocli.jansi.graalvm (picocli-jansi-graalvm 1.1.0 API)</title>
<meta name="date" content="2019-11-07">
<!-- Generated by javadoc (1.8.0_202) on Sat Jul 04 14:07:38 JST 2020 -->
<title>picocli.jansi.graalvm (picocli-jansi-graalvm 1.2.0 API)</title>
<meta name="date" content="2020-07-04">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
Expand Down
8 changes: 4 additions & 4 deletions docs/apidocs/picocli/jansi/graalvm/package-summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_202) on Thu Nov 07 22:02:34 JST 2019 -->
<title>picocli.jansi.graalvm (picocli-jansi-graalvm 1.1.0 API)</title>
<meta name="date" content="2019-11-07">
<!-- Generated by javadoc (1.8.0_202) on Sat Jul 04 14:07:38 JST 2020 -->
<title>picocli.jansi.graalvm (picocli-jansi-graalvm 1.2.0 API)</title>
<meta name="date" content="2020-07-04">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="picocli.jansi.graalvm (picocli-jansi-graalvm 1.1.0 API)";
parent.document.title="picocli.jansi.graalvm (picocli-jansi-graalvm 1.2.0 API)";
}
}
catch(err) {
Expand Down
8 changes: 4 additions & 4 deletions docs/apidocs/picocli/jansi/graalvm/package-tree.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_202) on Thu Nov 07 22:02:34 JST 2019 -->
<title>picocli.jansi.graalvm Class Hierarchy (picocli-jansi-graalvm 1.1.0 API)</title>
<meta name="date" content="2019-11-07">
<!-- Generated by javadoc (1.8.0_202) on Sat Jul 04 14:07:38 JST 2020 -->
<title>picocli.jansi.graalvm Class Hierarchy (picocli-jansi-graalvm 1.2.0 API)</title>
<meta name="date" content="2020-07-04">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="picocli.jansi.graalvm Class Hierarchy (picocli-jansi-graalvm 1.1.0 API)";
parent.document.title="picocli.jansi.graalvm Class Hierarchy (picocli-jansi-graalvm 1.2.0 API)";
}
}
catch(err) {
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ gradleBintrayPluginVersion=1.+
jansiVersion=1.18
junitJupiterVersion = 5.5.2
palantirGradleGraalVersion = 0.6.0
picocliVersion=4.0.4
projectVersion=1.1.1-SNAPSHOT
picocliVersion=4.3.2
projectVersion=1.2.0

0 comments on commit b615526

Please sign in to comment.