stringbean / sbt-jandex   2.0.0

Apache License 2.0 GitHub

sbt plugin for generating Jandex indexes

Scala versions: 2.12
sbt plugins: 1.0

sbt-jandex

Build Status Codacy grade Known Vulnerabilities sbt-jandex version GitHub Discussions

An sbt plugin to generate Jandex indexes for projects.

Setup

Add the following lines to project/plugins.sbt:

// add the plugin
addSbtPlugin("software.purpledragon" % "sbt-jandex" % "<version>")

// add the Jandex 3.x library
libraryDependencies += "io.smallrye" % "jandex" % "3.1.2"

// or Jandex 2.x library
libraryDependencies += "org.jboss" % "jandex" % "2.4.3.Final"

// or Jandex 1.x library
libraryDependencies += "org.jboss" % "jandex" % "1.2.4.Final"

Jandex indexes will automatically be generated and added to the binary JARs.

Tasks

jandex

Generates Jandex index for the main classes and stores it in jandexOutput.value / jandex.idx.

Settings

jandexOutput

  • Description: Directory to store generated Jandex index in.
  • Accepts: File
  • Default: crossTarget.value / jandex

jandexIncludeInPackage

  • Description: Whether to include Jandex index in the main JAR. If true then the index will be included under `META-INF/jandex.idx.
  • Accepts: Boolean
  • Default: true