Code Monkey home page Code Monkey logo

jandex-gradle-plugin's Introduction

jandex-gradle-plugin

Build Status Gradle Plugin Portal


Runs jandex on a Gradle project.

Usage

Option #1

buildscript {
    repositories {
        gradlePluginPortal()
        mavenCentral()
    }
    dependencies {
        classpath 'org.kordamp.gradle:jandex-gradle-plugin:2.0.0'
    }
}
apply plugin: 'org.kordamp.gradle.jandex'

Option #2

plugins {
    id 'org.kordamp.gradle.jandex' version '2.0.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.

ℹ️
Requires Java 11+ and Gradle 8+.

Configuration

Plugin configuration

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

ℹ️
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

Jandex Version

This plugin relies on Jandex 3.1.7 to perform its job, however you may configure a different version if needed. Simply add the desired version (for the maven coordinates io.smallrye:jandex:<version>) to the jandex extension as shown next

jandex {
    version = '3.0.0'
}
⚠️
This plugin supports Jandex 3 as a minimum since version 1.0.0.

Migration

Starting with version 0.9.0 the chosen Jandex dependency must be resolved using explicit repositories, in other words, it is no longer part of the plugin’s default classpath. Failure to declare a repository from which this dependency may be resolved will result in a build failure.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.