kordamp / jandex-gradle-plugin

Jandex Gradle Plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Please document how to use fileSets

mvysny opened this issue · comments

I can't seem to be able to include additional directory for Jandex indexing. The following build.gradle:

plugins {
    id("org.kordamp.gradle.jandex") version "0.8.0"
}
jandex {
    fileSets = project.fileTree(dir: project.buildDir, includes: ["com/vaadin/flow/**/*.class"])
}

fails with:

* What went wrong:
Execution failed for task ':jandex'.
> Cannot convert the provided notation to a File or URI: directory '/home/mavi/work/inacta/vaadin-jandex/build'.
  The following types/formats are supported:
    - A String or CharSequence path, for example 'src/main/java' or '/usr/include'.
    - A String or CharSequence URI, for example 'file:/usr/include'.
    - A File instance.
    - A Path instance.
    - A Directory instance.
    - A RegularFile instance.
    - A URI or URL instance.
    - A TextResource instance.

Could you please give me a hand and tell me how to include additional folder with classes to index?

The fileSets property was removed in favor of sources. You can invoke sources.from(args) where args are valid inputs that a FileCollection can understand. Please refer to https://docs.gradle.org/current/userguide/working_with_files.html#sec:locating_files

Oh, I see, thank you, the fileSets is thus deprecated and shouldn't be used. Thanks, closing.