Option #1
buildscript {
repositories {
gradlePluginPortal()
mavenCentral()
}
dependencies {
classpath 'org.kordamp.gradle:jandex-gradle-plugin:0.13.0'
}
}
apply plugin: 'org.kordamp.gradle.jandex'
Option #2
plugins {
id 'org.kordamp.gradle.jandex' version '0.13.0'
}
This will add a jandex
task to your build, which will analyze the main
sourceSets by default, the generated index
will be placed in ${project.tasks.processResources.destinationDir}/META-INF/jandex.idx
.
The following properties can be specified in the jandex
task configuration
Name | Option | Property | Type | Default Value |
---|---|---|---|---|
processDefaultFileSet |
jandex-process-default-file-set |
jandex.process.default.file.set |
boolean |
true |
includeInJar |
jandex-includein-jar |
jandex.include.in.jar |
boolean |
true |
indexName |
jandex-index-name |
jandex.index.name |
String |
jandex.idx |
destination |
File |
build/jandex/jandex.idx |
||
sources |
ConfigurableFileCollection |
sourceSets.main.output.classesDirs |
Note
|
The generated index file will be copied to build/resources/main/META-INF/jandex.idx during the invocation of the
`processResources task if the includeInJar property is set to true .
|
Task properties may be defined on the command line using their option name, or their property name, such as
$ gradle jandex --jandex-index-name foo.idx
$ gradle jandex -Pjandex.index.name=foo.idx
$ gradle jandex -Djandex.index.name=foo.idx
$ set JANDEX_INDEX_NAME=foo.idx
$ gradle jandex