github jbangdev/jbang v0.71.1

latest releases: v0.132.1, v0.132.0, v0.131.0...
4 years ago

0.71.0 (2021/05/25)

Note: if you use brew for updating jbang you might need to run brew tap --repair due to default branch renamed from master to main.

Kotlin support

@evanchooly dropped by and contributed initial experimental Kotlin support. Yes, you can now use Kotlin in addition to plain Java with jbang; you can for example write a Quarkus microservice in Kotlin like this: `

///usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS io.quarkus:quarkus-bom:${quarkus.version:1.11.0.Final}@pom
//DEPS io.quarkus:quarkus-resteasy
import javax.ws.rs.*
import javax.ws.rs.core.MediaType

@Path("/greeting")
class GreetingResource {
    @GET
    @Produces(MediaType.TEXT_PLAIN)
    fun hello() = "hello"
}

Note, the Kotlin support is experimental with the intent to let everyone and try it out and give feedback and we see where it should go.com.

Things that works now:

  • jbang init -t hello.kt hello creates a basic kotlin file.
  • jbang xyz.kt should "just work"
  • Quarkus integration verified to work for basic examples.

Things not yet implemented/tested (open issues if you need/want these):

  • jbang edit is not aware of kotlin
  • mix of .java and .kotlin not tested (if main file is .kt it should work)
  • Kotlin scripts (i.e. latest kotlin .main.kts nor kscripts .kts) are not supported

Alpine Linux container images

jbang will now download Java 16 builds for Alpine Linux to avoid just falling over.

info tools

jbang info tools have more information than before allowing tools like the experimental JBang Eclipse integration to work.

Finally some bug fixes and started move from master to main on repositories.

Bug Fixes

  • jdk home output won't print "echo" anymore (#841) (#617546d2)
  • Don't use eval in app scripts (#855) (#4add8362)
  • Trying to app install a GAV resulted in an NPE (#866) (#20ad4663, closes #778)
  • Update should now work on Windows (#878) (#44009595)

Features

  • Support Alpine Linux (#839) (#d5be441c)
  • info tools now returns a lot more information (#859) (#e03d6d96, closes #833)
  • Kotlin support (#876) (#211bcaed)

Don't miss a new jbang release

NewReleases is sending notifications on new releases.