Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes the
run-sonarqubejob, failing ondevelopsince the Spring Boot 4.1 upgrade (476b600), and removes the obsolete Java 8 baseline that caused it.The failure
The Boot 4 BOM brings JUnit 6.0.3, which requires JVM 17+.
fineract-clientandfineract-avro-schemaspinned Java 8 via thejava {}extension, which applies to every source set — sotestCompileClasspathrequested a JVM 8 variant and JUnit 6 became unresolvable.Only Sonar caught it:
fineract-avro-schemashas nosrc/test, socompileTestJavaisNO-SOURCEand that configuration is never resolved in a normal build.:sonarresolves every module's test classpath, so it is the only job that trips.Why drop Java 8 rather than work around it
The pin dates to 0897f17 (Oct 2020), citing FINERACT-1214 — which is actually a bug about the Swagger client returning RxJava
Observables. Android appears there only in a wish-list of SDK variants that was never built. Three things make the baseline obsolete:fineract-avro-schemasit was already broken. Avro 1.12.1 is Java 11 bytecode (major 55) and every generated class extendsSpecificRecordBase, so a Java 8 JVM would fail withUnsupportedClassVersionError. Gradle never caught this because Avro publishes POM-only metadata, carrying noorg.gradle.jvm.versionattribute.minSdk.org.apache.fineracton Maven Central; the only publish anywhere is one ASF snapshot,fineract-client 1.6.1-…-SNAPSHOT, dated May 2022.Changes
fineract-clientfineract-avro-schemasfineract-clientis set to 17 rather than the toolchain's 25 deliberately: Android 14 provides Java 17 core libraries and AGP still requires/targets JDK 17, so Java 21+ bytecode is not consumable by D8/R8. Letting it inherit the toolchain would emit major 69 and silently break Android consumers.fineract-avro-schemashas no such story — it is consumed only by server-side modules, all on toolchain 25.Also removed, all tied to that baseline:
org.junit:junit-bom:5.14.4workaround infineract-client— raising to 17 fixes the incompatibility at its source, so the repo is now uniformly on JUnit 6.0.3-Xlint:-optionsinfineract-avro-schemas, which only silenced javac's "source 8 is obsolete"com.squareup.retrofit2:adapter-java8— unused (the client registers no call adapter factories) and present only because Retrofit's core kept a pre-Java-8 baseline; plus theadapter-java8/converter-java8entries inbuildSrc"fineract-client/**"fromrenovate.jsonignorePaths, added in 971179c as "specific versions for a reason" with the reason never recorded. It blocked exactly two pins:jackson-databind-nullable:0.2.6(already the latest) andjakarta.annotation-api:1.3.5. The latter is a real constraint but a namespace one, not a Java baseline one — the generated code has 1,464 uses ofjavax.annotation.Generated, which only exists in the 1.x line. Replaced with a scopedpackageRuledocumenting that, so the module's other dependencies become updatable again.Left in place deliberately:
dateLibrary: 'java8'(in OpenAPI Generator this selectsjava.time; the alternative islegacy=java.util.Date),jackson-datatype-jdk8,cucumber-java8,jsr305andjakarta.annotation-api:1.3.5. Despite the names, none are Java 8 compatibility shims.Verification
:sonarcompletes across the whole project (real task,dumpToFilemode, no token needed) — this also confirms no second failure was hiding behind the first.:fineract-client:checkand:fineract-avro-schemas:checkpass with--rerun-tasks, including modernizer, which now evaluates at 17/25 instead of 8.:integration-tests:compileTestJavaand:fineract-e2e-tests-core:compileTestJavacompile — integration-tests is the real consumer offineract-client, across 473 files.javap;junit-jupiter-api-6.0.3.jaris the only JUnit on any classpath repo-wide.Note for reviewers
This raises the published baseline for
fineract-clientfrom Java 8 to Java 17, so it is a deliberate compatibility change, not just a CI fix. No consumer is believed to be affected given nothing has been published since 2022 — but if you know of a Java 8 consumer of this SDK, please say so here.Checklist
fineract-clientsuite and by:sonaritself, the job that regressed.