Uh oh!
There was an error while loading. Please reload this page.
chore: fix deprecated Gradle APIs, move to com.gradleup.shadow - #17
chore: fix deprecated Gradle APIs, move to com.gradleup.shadow#17devin-ai-integration[bot] wants to merge 3 commits into
Conversation
…w plugin Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
kinyoklion
commented
Jul 28, 2026
Devin, should we be using the newer version of this that has been renamed |
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Good call — switched to I stayed on the 8.3.x line rather than 9.x: shadow 9.x calls Verified locally with a real SDK key: |
Co-Authored-By: jbailey@launchdarkly.com <accounts@sidewaysgravity.com>
Summary
Removes all Gradle deprecation warnings from this example ("Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0") and moves off the unmaintained
com.github.johnrengelman.shadowplugin.Why each piece is required rather than cosmetic:
mainClassName→mainClass:JavaApplication.setMainClassName/JavaExec.mainwere deprecated and removed in Gradle 8.project.mainClassNameconvention, so switching tomainClassalone makes./gradlew assemblefail withproperty 'mainClassName' doesn't have a configured value. The plugin was renamed tocom.gradleup.shadow, which requires Gradle 8.x — hence the wrapper bump.group 'x',version 'x',maven { url "…" }) is deprecated as of Gradle 8.14 and scheduled for removal in Gradle 10.Staying on shadow 8.3.x rather than 9.x: shadow 9 calls
AdhocComponentWithVariants.addVariantsFromConfiguration(Provider, Action), which only exists in Gradle 9, and Gradle 9 requires Java 17+ to run — that would contradict the README's documented "Java 11 or higher".No LaunchDarkly SDK version change: all dependency constraints are open ranges within the current major with no committed lockfile, so they already resolve to the latest compatible releases —
launchdarkly-openfeature-serverprovider→ 1.1.3,launchdarkly-java-server-sdk→ 7.15.0,dev.openfeature:sdk→ 1.22.0. No deprecated LaunchDarkly/OpenFeature APIs inMain.java(javac -Xlint:deprecationis clean).Verification
Run locally against a real server-side SDK key, on Java 17:
./gradlew clean assemble run --warning-mode all— zero deprecation warnings; printsSDK successfully initialized!/The sample-feature feature flag evaluates to false.java -jar build/libs/hello-openfeature-java-server-1.0-SNAPSHOT-all.jar(the exact command CI runs) — same successful output, exit 0. The shadow jar filename is unchanged.Link to Devin session: https://app.devin.ai/sessions/163c5cf635184c5ebdbc345afa517958
Requested by: @jsonbailey