This is an automated email from the ASF dual-hosted git repository. dimas pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/polaris.git
The following commit(s) were added to refs/heads/main by this push: new b6e247ded Build: Make jandex dependency used for index generation managed (#2431) b6e247ded is described below commit b6e247deda8a618136ec16c75b86eb2a2d12642b Author: Robert Stupp <sn...@snazy.de> AuthorDate: Wed Aug 27 16:41:14 2025 +0200 Build: Make jandex dependency used for index generation managed (#2431) Also allows specifying the jandex index version for the build. This is a preparation step contributing to #2204, once a jandex fix for reproducible builds is available. Co-authored-by: Alexandre Dutra <adu...@apache.org> --- api/iceberg-service/build.gradle.kts | 2 +- api/management-model/build.gradle.kts | 2 +- api/management-service/build.gradle.kts | 2 +- api/polaris-catalog-service/build.gradle.kts | 2 +- build-logic/build.gradle.kts | 1 + build-logic/src/main/kotlin/polaris-java.gradle.kts | 16 ++++++++++++++++ build.gradle.kts | 9 +-------- extensions/federation/hadoop/build.gradle.kts | 2 +- extensions/federation/hive/build.gradle.kts | 2 +- gradle/baselibs.versions.toml | 1 + gradle/libs.versions.toml | 2 +- persistence/eclipselink/build.gradle.kts | 4 ++-- persistence/relational-jdbc/build.gradle.kts | 2 +- plugins/spark/v3.5/integration/build.gradle.kts | 2 +- polaris-core/build.gradle.kts | 2 +- runtime/admin/build.gradle.kts | 2 +- runtime/common/build.gradle.kts | 2 +- runtime/defaults/build.gradle.kts | 2 +- runtime/server/build.gradle.kts | 2 +- runtime/service/build.gradle.kts | 2 +- runtime/spark-tests/build.gradle.kts | 2 +- runtime/test-common/build.gradle.kts | 2 +- tools/container-spec-helper/build.gradle.kts | 2 +- tools/minio-testcontainer/build.gradle.kts | 2 +- tools/misc-types/build.gradle.kts | 2 +- 25 files changed, 41 insertions(+), 30 deletions(-) diff --git a/api/iceberg-service/build.gradle.kts b/api/iceberg-service/build.gradle.kts index a85a0f5f1..9ed83e7b3 100644 --- a/api/iceberg-service/build.gradle.kts +++ b/api/iceberg-service/build.gradle.kts @@ -22,7 +22,7 @@ import org.openapitools.generator.gradle.plugin.tasks.GenerateTask plugins { alias(libs.plugins.openapi.generator) id("polaris-client") - alias(libs.plugins.jandex) + id("org.kordamp.gradle.jandex") } dependencies { diff --git a/api/management-model/build.gradle.kts b/api/management-model/build.gradle.kts index 1572b3f13..19471470d 100644 --- a/api/management-model/build.gradle.kts +++ b/api/management-model/build.gradle.kts @@ -22,7 +22,7 @@ import org.openapitools.generator.gradle.plugin.tasks.GenerateTask plugins { alias(libs.plugins.openapi.generator) id("polaris-client") - alias(libs.plugins.jandex) + id("org.kordamp.gradle.jandex") } dependencies { diff --git a/api/management-service/build.gradle.kts b/api/management-service/build.gradle.kts index a83cee5c1..f4e380ec6 100644 --- a/api/management-service/build.gradle.kts +++ b/api/management-service/build.gradle.kts @@ -22,7 +22,7 @@ import org.openapitools.generator.gradle.plugin.tasks.GenerateTask plugins { alias(libs.plugins.openapi.generator) id("polaris-client") - alias(libs.plugins.jandex) + id("org.kordamp.gradle.jandex") } dependencies { diff --git a/api/polaris-catalog-service/build.gradle.kts b/api/polaris-catalog-service/build.gradle.kts index 7be201c46..59a65b22d 100644 --- a/api/polaris-catalog-service/build.gradle.kts +++ b/api/polaris-catalog-service/build.gradle.kts @@ -22,7 +22,7 @@ import org.openapitools.generator.gradle.plugin.tasks.GenerateTask plugins { alias(libs.plugins.openapi.generator) id("polaris-client") - alias(libs.plugins.jandex) + id("org.kordamp.gradle.jandex") } val genericTableModels = diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index eade127b1..cf06c59f1 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -23,6 +23,7 @@ dependencies { implementation(gradleKotlinDsl()) implementation(baselibs.errorprone) implementation(baselibs.idea.ext) + implementation(baselibs.jandex) implementation(baselibs.license.report) implementation(baselibs.nexus.publish) implementation(baselibs.shadow) diff --git a/build-logic/src/main/kotlin/polaris-java.gradle.kts b/build-logic/src/main/kotlin/polaris-java.gradle.kts index e8ae19afb..e1f284608 100644 --- a/build-logic/src/main/kotlin/polaris-java.gradle.kts +++ b/build-logic/src/main/kotlin/polaris-java.gradle.kts @@ -23,6 +23,8 @@ import net.ltgt.gradle.errorprone.errorprone import org.gradle.api.tasks.compile.JavaCompile import org.gradle.api.tasks.testing.Test import org.gradle.kotlin.dsl.named +import org.kordamp.gradle.plugin.jandex.JandexExtension +import org.kordamp.gradle.plugin.jandex.JandexPlugin import publishing.PublishingHelperPlugin plugins { @@ -38,6 +40,20 @@ plugins { apply<PublishingHelperPlugin>() +plugins.withType<JandexPlugin>().configureEach { + extensions.getByType(JandexExtension::class).run { + version = + versionCatalogs + .named("libs") + .findLibrary("jandex") + .orElseThrow { GradleException("jandex version not found in libs.versions.toml") } + .get() + .version + // https://smallrye.io/jandex/jandex/3.4.0/index.html#persistent_index_format_versions + indexVersion = 12 + } +} + checkstyle { val checkstyleVersion = versionCatalogs diff --git a/build.gradle.kts b/build.gradle.kts index 2d8e0bb7b..06fa84c61 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -20,12 +20,7 @@ import java.net.URI import org.nosphere.apache.rat.RatTask -buildscript { - repositories { maven { url = java.net.URI("https://plugins.gradle.org/m2/") } } - dependencies { - classpath("org.kordamp.gradle:jandex-gradle-plugin:${libs.plugins.jandex.get().version}") - } -} +buildscript { repositories { maven { url = java.net.URI("https://plugins.gradle.org/m2/") } } } plugins { id("idea") @@ -33,8 +28,6 @@ plugins { id("polaris-root") alias(libs.plugins.rat) alias(libs.plugins.jetbrains.changelog) - // workaround for https://github.com/kordamp/jandex-gradle-plugin/issues/25 - alias(libs.plugins.jandex) apply false } val projectName = rootProject.file("ide-name.txt").readText().trim() diff --git a/extensions/federation/hadoop/build.gradle.kts b/extensions/federation/hadoop/build.gradle.kts index 431da94e5..d75a24ee2 100644 --- a/extensions/federation/hadoop/build.gradle.kts +++ b/extensions/federation/hadoop/build.gradle.kts @@ -19,7 +19,7 @@ plugins { id("polaris-client") - alias(libs.plugins.jandex) + id("org.kordamp.gradle.jandex") } dependencies { diff --git a/extensions/federation/hive/build.gradle.kts b/extensions/federation/hive/build.gradle.kts index 37b2b687d..15a90aadd 100644 --- a/extensions/federation/hive/build.gradle.kts +++ b/extensions/federation/hive/build.gradle.kts @@ -19,7 +19,7 @@ plugins { id("polaris-client") - alias(libs.plugins.jandex) + id("org.kordamp.gradle.jandex") } dependencies { diff --git a/gradle/baselibs.versions.toml b/gradle/baselibs.versions.toml index e542e3a72..1f9fdc5e4 100644 --- a/gradle/baselibs.versions.toml +++ b/gradle/baselibs.versions.toml @@ -20,6 +20,7 @@ [libraries] errorprone = { module = "net.ltgt.gradle:gradle-errorprone-plugin", version = "4.3.0" } idea-ext = { module = "gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext", version = "1.3" } +jandex = { module = "org.kordamp.gradle:jandex-gradle-plugin", version = "2.2.0" } license-report = { module = "com.github.jk1:gradle-license-report", version = "2.9" } nexus-publish = { module = "io.github.gradle-nexus:publish-plugin", version = "2.0.0" } shadow = { module = "com.gradleup.shadow:shadow-gradle-plugin", version = "9.0.2" } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 8fda9a66f..f90331f82 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -72,6 +72,7 @@ jakarta-persistence-api = { module = "jakarta.persistence:jakarta.persistence-ap jakarta-servlet-api = { module = "jakarta.servlet:jakarta.servlet-api", version = "6.1.0" } jakarta-validation-api = { module = "jakarta.validation:jakarta.validation-api", version = "3.1.1" } jakarta-ws-rs-api = { module = "jakarta.ws.rs:jakarta.ws.rs-api", version = "4.0.0" } +jandex = { module = "io.smallrye.jandex:jandex", version ="3.4.0" } javax-servlet-api = { module = "javax.servlet:javax.servlet-api", version = "4.0.1" } junit-bom = { module = "org.junit:junit-bom", version = "5.13.4" } keycloak-admin-client = { module = "org.keycloak:keycloak-admin-client", version = "26.0.6" } @@ -101,7 +102,6 @@ testcontainers-keycloak = { module = "com.github.dasniko:testcontainers-keycloak threeten-extra = { module = "org.threeten:threeten-extra", version = "1.8.0" } [plugins] -jandex = { id = "org.kordamp.gradle.jandex", version = "2.2.0" } openapi-generator = { id = "org.openapi.generator", version = "7.12.0" } quarkus = { id = "io.quarkus", version.ref = "quarkus" } rat = { id = "org.nosphere.apache.rat", version = "0.8.1" } diff --git a/persistence/eclipselink/build.gradle.kts b/persistence/eclipselink/build.gradle.kts index ae4cf7c6e..5d6f98769 100644 --- a/persistence/eclipselink/build.gradle.kts +++ b/persistence/eclipselink/build.gradle.kts @@ -23,9 +23,9 @@ fun isValidDep(dep: String): Boolean { } plugins { - id("polaris-server") alias(libs.plugins.quarkus) - alias(libs.plugins.jandex) + id("polaris-server") + id("org.kordamp.gradle.jandex") } dependencies { diff --git a/persistence/relational-jdbc/build.gradle.kts b/persistence/relational-jdbc/build.gradle.kts index 2750d4e19..f1ca24b0b 100644 --- a/persistence/relational-jdbc/build.gradle.kts +++ b/persistence/relational-jdbc/build.gradle.kts @@ -19,7 +19,7 @@ plugins { id("polaris-server") - alias(libs.plugins.jandex) + id("org.kordamp.gradle.jandex") } dependencies { diff --git a/plugins/spark/v3.5/integration/build.gradle.kts b/plugins/spark/v3.5/integration/build.gradle.kts index bcfd7e15f..f80952ce2 100644 --- a/plugins/spark/v3.5/integration/build.gradle.kts +++ b/plugins/spark/v3.5/integration/build.gradle.kts @@ -19,7 +19,7 @@ plugins { alias(libs.plugins.quarkus) - alias(libs.plugins.jandex) + id("org.kordamp.gradle.jandex") id("polaris-runtime") } diff --git a/polaris-core/build.gradle.kts b/polaris-core/build.gradle.kts index 06022187a..f5a889241 100644 --- a/polaris-core/build.gradle.kts +++ b/polaris-core/build.gradle.kts @@ -19,7 +19,7 @@ plugins { id("polaris-client") - alias(libs.plugins.jandex) + id("org.kordamp.gradle.jandex") } dependencies { diff --git a/runtime/admin/build.gradle.kts b/runtime/admin/build.gradle.kts index 29ac2c856..6b9537253 100644 --- a/runtime/admin/build.gradle.kts +++ b/runtime/admin/build.gradle.kts @@ -19,7 +19,7 @@ plugins { alias(libs.plugins.quarkus) - alias(libs.plugins.jandex) + id("org.kordamp.gradle.jandex") alias(libs.plugins.openapi.generator) id("polaris-runtime") // id("polaris-license-report") diff --git a/runtime/common/build.gradle.kts b/runtime/common/build.gradle.kts index f1753882f..d67317820 100644 --- a/runtime/common/build.gradle.kts +++ b/runtime/common/build.gradle.kts @@ -18,7 +18,7 @@ */ plugins { - alias(libs.plugins.jandex) + id("org.kordamp.gradle.jandex") id("polaris-server") } diff --git a/runtime/defaults/build.gradle.kts b/runtime/defaults/build.gradle.kts index b61c2458b..fa862eedc 100644 --- a/runtime/defaults/build.gradle.kts +++ b/runtime/defaults/build.gradle.kts @@ -18,7 +18,7 @@ */ plugins { - alias(libs.plugins.jandex) + id("org.kordamp.gradle.jandex") id("polaris-server") } diff --git a/runtime/server/build.gradle.kts b/runtime/server/build.gradle.kts index c5c1543ee..0be0859d8 100644 --- a/runtime/server/build.gradle.kts +++ b/runtime/server/build.gradle.kts @@ -22,7 +22,7 @@ import io.quarkus.gradle.tasks.QuarkusRun plugins { alias(libs.plugins.quarkus) - alias(libs.plugins.jandex) + id("org.kordamp.gradle.jandex") alias(libs.plugins.openapi.generator) id("polaris-runtime") // id("polaris-license-report") diff --git a/runtime/service/build.gradle.kts b/runtime/service/build.gradle.kts index 87e95c530..18204b357 100644 --- a/runtime/service/build.gradle.kts +++ b/runtime/service/build.gradle.kts @@ -19,7 +19,7 @@ plugins { alias(libs.plugins.quarkus) - alias(libs.plugins.jandex) + id("org.kordamp.gradle.jandex") id("polaris-runtime") id("java-test-fixtures") } diff --git a/runtime/spark-tests/build.gradle.kts b/runtime/spark-tests/build.gradle.kts index 57b778f53..e51d96d8b 100644 --- a/runtime/spark-tests/build.gradle.kts +++ b/runtime/spark-tests/build.gradle.kts @@ -19,7 +19,7 @@ plugins { alias(libs.plugins.quarkus) - alias(libs.plugins.jandex) + id("org.kordamp.gradle.jandex") id("polaris-runtime") } diff --git a/runtime/test-common/build.gradle.kts b/runtime/test-common/build.gradle.kts index 564ad5aaf..b728ea17a 100644 --- a/runtime/test-common/build.gradle.kts +++ b/runtime/test-common/build.gradle.kts @@ -19,7 +19,7 @@ plugins { alias(libs.plugins.quarkus) - alias(libs.plugins.jandex) + id("org.kordamp.gradle.jandex") id("polaris-runtime") } diff --git a/tools/container-spec-helper/build.gradle.kts b/tools/container-spec-helper/build.gradle.kts index 293844cf2..356a489ce 100644 --- a/tools/container-spec-helper/build.gradle.kts +++ b/tools/container-spec-helper/build.gradle.kts @@ -18,7 +18,7 @@ */ plugins { - alias(libs.plugins.jandex) + id("org.kordamp.gradle.jandex") id("polaris-server") } diff --git a/tools/minio-testcontainer/build.gradle.kts b/tools/minio-testcontainer/build.gradle.kts index 38351c762..43b3cd768 100644 --- a/tools/minio-testcontainer/build.gradle.kts +++ b/tools/minio-testcontainer/build.gradle.kts @@ -18,7 +18,7 @@ */ plugins { - alias(libs.plugins.jandex) + id("org.kordamp.gradle.jandex") id("polaris-server") } diff --git a/tools/misc-types/build.gradle.kts b/tools/misc-types/build.gradle.kts index 17203d74e..86e64da33 100644 --- a/tools/misc-types/build.gradle.kts +++ b/tools/misc-types/build.gradle.kts @@ -18,7 +18,7 @@ */ plugins { - alias(libs.plugins.jandex) + id("org.kordamp.gradle.jandex") id("polaris-client") }