Skip to content

Releases: jbangdev/jbang

v0.112.4

19 Nov 09:30
Compare
Choose a tag to compare

A few user contribute fixes (thanks @essobedo and @ritikverma2000) but otherwise a release to test and verify that dev.jbang:jbang-cli is now publish to maven central.

What's Changed

New Contributors

Full Changelog: v0.111.0...v0.112.4

v0.111.0

30 Sep 11:20
Compare
Choose a tag to compare

Lots of bugfixes and Groovy support now defaults to use Groovy 4. You can use //GROOVY <version> to use older Groovy if you need to.

🐛 Fixes

  • b52a829 support Groovy 4
  • d8b8bb4 fix: Now showing integration errors when verbose is on (#1630)
  • 04f61ed fix: check manifest exist before reading from it (#1687)
  • 66eef4f fix: alias settings not being properly applied (#1686)
  • 418b904 fix: upgrade to commons-text 1.10.0 (#1674)
  • 0541427 fix: remove -g from runtime options because groovyc does not accept -g

🧰 Tasks

  • ca942a6 chore: not necessary to remove "-g"
  • dd6e913 chore: update to Kotlin 1.8.22
  • c8b8acd chore: update default Groovy version to 4.0.14

Contributors

We'd like to thank the following people for their contributions:
Alex Karezin, Andrew O, GitHub, Libing Chen, Max Rydahl Andersen, P. Ottlinger, Tako Schotanus, allcontributors[bot]

v0.110.1

17 Aug 08:06
Compare
Choose a tag to compare

Changelog

🐛 Fixes

  • 64e2bef fix: we now only add -g flag to Java source types (#1657)
  • c535473 fix: Fixes NPE when running in container (#1660)

Contributors

We'd like to thank the following people for their contributions:
GitHub, Max Rydahl Andersen, Tako Schotanus

v0.110.0

23 Jul 07:35
Compare
Choose a tag to compare

Changelog

JBang will now use "central" rather than "mavencentral" as its id for fetching dependencies allowing for better sharing of downloads between Maven and JBang based builds. Also means you can do //REPOS central as a shorthand. Should not break users but is a behavior change thus released as minor rather than a patch.

Fixed a regression where maven artifacts with capital letters failed to download.

v0.109.0

08 Jul 08:35
Compare
Choose a tag to compare

Changelog

Fixes and a minor and major new feature.

Scripts and jars as dependencies

//DEPS aloca.jar or //DEPS myscript.java or even //DEPS https://my.site/some/script.java is now allowed.

Allowing you to use scripts (or jars) as dependencies is different from using //SOURCES in the sense that the //DEPS gets built in isolation and is a true dependency rather than built inside the project. Allows for more decoupled and interesting composability of your jbang scripts and applications. Mainly; allow you to build and publish a java library without an intermediate publishing step.

Use it responsibly :)

Debug customization

I (re)learned from @danberindei that IDE's can work as clients to allow the java app to connect to the debugger rather than the other way around. Quite useful.

Thus jbang now allows customizing how debug is configured.

You can still just do jbang --debug myapp.java but you can now also pass in a comma separated list to configure the JDPA connection string. i.e.jbang --debug=server=n myapp.java to have it be a client rather than a server. You can set any other JDPA flag this way.

Fixes

Docker publish had been failing the last few releases. Finally figured out the issue. Should now work. Crossing fingers.
Multi-user access were causing issues for caching in docker containers; that should be fixed too now.

🚀 Features

  • 1bfa853 feat: Added support for script dependencies (#1641)
  • d87feaa feat: --debug now allow multiple key/values. --debug=server=n,suspend=y (#1642)

🐛 Fixes

  • 61bdc6a fix: #1624 docker publish fail
  • d81bed7 fix: swallow any exceptions when setting file modified timestamp (#1639)

🧰 Tasks

  • c379bd3 chore: add justfile for those with bad memory

Contributors

We'd like to thank the following people for their contributions:
GitHub, Max Rydahl Andersen, Tako Schotanus

v0.108.0

10 Jun 11:16
Compare
Choose a tag to compare

Changelog

Recently support for main methods without a surrounding class was merged into OpenJDK main line.
This release now supports that feature.

At time of writing the default Termurin JDK builds does not have the latest build thus
for now you will have to manually build the JDK and set that up in your path.

Also since it is a Java preview feature you will need to use --enable-preview or put //PREVIEW in the file.

That means the smallest self-contained Java 21 example looks as follows:

//PREVIEW
//JAVA 21+

void main() {
    System.out.println("Hello World");
}

And can now be run using jbang main.java if you have Java 21 latest nightly build installed.

If you prefer

🚀 Features

  • 9c2255b feat: JEP 445: Unnamed Classes and Instance Main Methods (#1633)

🐛 Fixes

  • ac432ec fix: detect version from JAVA_RUNTIME_VERSION and don't use JAVA_VERS… (#1632)

  • 62d3d7b [minor] java 21 JEP445 support

Contributors

We'd like to thank the following people for their contributions:
GitHub, Max Rydahl Andersen

v0.107.0

16 May 22:28
Compare
Choose a tag to compare

Let's call this the "Java 21" release as it adds jbang --enable-preview option that allows you to do easily try out openjdk preview features like Java 21 String templates without having to deal with -souce 21 and individual flags for javac nor java.

The following will download Java 21 (early builds) if needed and evaluate the String template using the args variable:

jbang --java 21 --enable-preview -c 'print(STR."First arg is \{args[0]}!")' JBang

Note: At time of release Adoptium the default Java provider used by JBang does not have early Java 21 builds thus either install a Java 21 manually or set JBANG_JDK_VENDOR=openjdk in the environment to tell JBang to use openjdk builds.

Changelog

🚀 Features

🐛 Fixes

  • 5968e49 fix: export will now create missing output folders (#1618)
  • 01ab8e8 fix: don't try resolving implicit catalogs for URLs (#1619)
  • 854fc66 fix: no longer throws exception for certain config values (#1615)

  • c4a1ff4 [minor] release
  • 3d4e122 doc: note on why jshell needs more flags for enable preview

Contributors

We'd like to thank the following people for their contributions:
GitHub, Max Rydahl Andersen, Tako Schotanus

v0.106.3

16 Apr 19:55
Compare
Choose a tag to compare

Changelog

Fix issue where ChatGPT errors on bad keys or usage limits.

🧰 Tasks


Contributors

We'd like to thank the following people for their contributions:
Max Rydahl Andersen

v0.106.1

01 Apr 19:10
Compare
Choose a tag to compare

Changelog

  • 8516294 [patch] re-release as github failed to upload all artifacts

Contributors

We'd like to thank the following people for their contributions:
Max Rydahl Andersen

v0.106.0

01 Apr 14:20
Compare
Choose a tag to compare

Changelog

This enables use of GPT with JBang.

To use it you need an OPENAI_API_KEY and use the --preview flag.

export OPENAI_API_KEY=sk-xxxxxxx-x-xxxxxx
jbang init gh.java "connect to github an fetch all repositories under jbangdev and collect how many stars they have"

And JBang will call out using ChatGPT's API to initialize and create a jbang script that attempts to do what you expressed on the command line.

You can see it in action in this video: https://www.youtube.com/watch?v=4Ol3sMm8xDM

Enjoy!

🚀 Features

  • 152424f support use of ChatGPT in init

🐛 Fixes

  • 39ada52 remove codeblocks and make magiccontent part of init
  • 37ae906 essential space
  • 4388052 trim trailing whitespaces in //MODULE directive (#1602)

Contributors

We'd like to thank the following people for their contributions:
Max Rydahl Andersen, GitHub, Fred Bricon