Skip to content

Commit 343e9f9

Browse files
committed
Bump → 1.0.0
Doc, console and message improvements
1 parent b9a7b45 commit 343e9f9

2 files changed

Lines changed: 20 additions & 12 deletions

File tree

README.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To use this plugin, add the following to your `build.gradle`:
2323

2424
```groovy
2525
plugins {
26-
id "com.github.mrsarm.jshell.plugin" version "1.0.0-RC2"
26+
id "com.github.mrsarm.jshell.plugin" version "1.0.0"
2727
}
2828
```
2929

@@ -37,7 +37,7 @@ buildscript {
3737
}
3838
}
3939
dependencies {
40-
classpath "gradle.plugin.com.github.mrsarm:jshell-plugin:1.0.0-RC2"
40+
classpath "gradle.plugin.com.github.mrsarm:jshell-plugin:1.0.0"
4141
}
4242
}
4343
@@ -90,7 +90,7 @@ arguments, like:
9090
If you have a `startup.jsh` script at the root of the project
9191
but at some point you don't want to execute it nor any other
9292
startup script, just pass the `jshell.startup` property with an empty
93-
value: `gradle --console plain jshell -Pjshell.startup= -Pjshell.startup=`.
93+
value: `gradle --console plain jshell -Pjshell.startup=`.
9494

9595
Spring Boot applications
9696
------------------------
@@ -129,7 +129,7 @@ to the Spring beans.
129129
com.my.package.MyApplication.main(new String).main(new String[]{})
130130
```
131131

132-
You can also add the imports of the business class you are going
132+
You can also add the imports of the business classes you are going
133133
to play with, as many as you have, otherwise you can import them
134134
once the JShell started:
135135

@@ -181,9 +181,9 @@ to the Spring beans.
181181

182182
You can add to the `startup.jsh` not just the call to the `main` method
183183
and useful imports, but also adds the bean declarations you are
184-
going to use most like `var myUserService = ctx.App.getBean(MyUserService.class)`,
185-
or any other snippet of Java code that may save you time
186-
running each time the JShell.
184+
going to use most likely, eg.
185+
`var myUserService = ctx.App.getBean(MyUserService.class)`, or any other
186+
snippet of Java code that may save you time running each time the JShell.
187187

188188
The class `ctx.App` comes from the `spring-ctx` dependency added, checkout the
189189
[documentation](https://github.com/mrsarm/spring-ctx/blob/master/README.md)
@@ -208,7 +208,7 @@ Gradle command:
208208

209209
$ gradle --console plain classes jshell
210210

211-
### I have a JDK 9+ installation but my default JDK is the JDK 8 or below
211+
### I have a JDK 9+ installation, but my default JDK is the JDK 8 or below
212212

213213
In that case Gradle will try to use the default JDK, and `jshell` is
214214
not available in Java 8 and above. Moreover the steps to change the
@@ -228,9 +228,9 @@ not have effect anymore.
228228
You can even create an alias in your `~/.profile` / `~/.bashrc`
229229
file like: `alias setjava9='export JAVA_HOME=/System/Library/Java/...'`
230230
to later switch easily to the other distribution calling
231-
`setjava9`.
231+
`setjava9`, or `setjava8` to switch back.
232232

233-
### Gradle output is print with the jshell output in the console
233+
### Gradle output is mixed with the jshell output in the console
234234

235235
If content like `<-------------> 0% EXECUTING [16s]` is mixed
236236
in the console with the jshell output each time you try
@@ -241,6 +241,13 @@ adding the option `--no-daemon` to start up the jshell:
241241

242242
$ gradle --no-daemon --console plain jshell
243243

244+
### Tab completion not working
245+
246+
Auto-completion does not work, and pressing arrow keys triggers
247+
weird characters in the console. Unfortunately, with the
248+
current console support from Gradle, there is no
249+
solution for this [bug](https://github.com/mrsarm/jshell-plugin/issues/2).
250+
244251

245252
System Requirements
246253
-------------------
@@ -273,7 +280,7 @@ I forked it because the original project is not receiving patches
273280
and this version solves some issues and adds the following features:
274281

275282
- It works with **multi-module projects**
276-
- There is no need to set the env variable `JAVA_OPTS` with a bunch of
283+
- There is no need to set the env variable `JAVA_OPTS` with a bunch
277284
of arguments _"--add-exports jdk.jshell/jdk.intern..."_
278285
- It allows to run at the beginning of the session a _.jsh_ startup script
279286
- Special support to the **Spring Framework**

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ plugins {
22
id 'com.gradle.plugin-publish' version '0.11.0'
33
id 'maven-publish'
44
id 'groovy'
5+
id 'java-library'
56
}
67

78
group 'com.github.mrsarm'
8-
version '1.0.0-RC2'
9+
version '1.0.0'
910

1011
sourceCompatibility = 9
1112
targetCompatibility = 9

0 commit comments

Comments
 (0)