aerogear / keycloak-metrics-spi

Adds a Metrics Endpoint to Keycloak
Apache License 2.0
523 stars 151 forks source link

Fix Gradle build for v4.0.0 and Keycloak 22 #175

Closed sirkrypt0 closed 10 months ago

sirkrypt0 commented 11 months ago

Motivation

The Gradle build is broken (see https://github.com/aerogear/keycloak-metrics-spi/issues/173#issuecomment-1669779136).

Why

The 4.0.0 release contains an update to Keycloak 22 introduced in #169 . While this adjusted the dependencies in the pom.xml for the Maven build, it did not adjust the build.gradle file. This lead to ./gradlew jar failing.

How

We have now adjusted the build.gradle to reflect the same dependency changes that have been made to the pom.xml. With that, we also bump the Keycloak version in the gradle.properties to 22.

Verification Steps

  1. Build with ./gradlew jar

Alternatively, use the Dockerfile from #173 for a clean environment:

FROM gradle:7.4.2-jdk17 AS metrics
WORKDIR /spi
USER root
RUN chown -R gradle /spi
USER gradle
RUN git clone https://github.com/aerogear/keycloak-metrics-spi.git . \
        && ./gradlew jar

Checklist: