Skip to content

Conversation

@greenrobot-team
Copy link
Member

Public PR to run GitHub Actions.

@greenrobot-team greenrobot-team force-pushed the 127-fix-examples-android-studio-ladybug branch 5 times, most recently from 2dd62a3 to ecb998c Compare December 3, 2024 07:29
@hagerf
Copy link

hagerf commented Jan 12, 2025

Would this PR make the warnings below that objectbox currently give me disappear?
warning: [options] source value 8 is obsolete and will be removed in a future release warning: [options] target value 8 is obsolete and will be removed in a future release warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.

@greenrobot-team
Copy link
Member Author

greenrobot-team commented Jan 13, 2025

@hagerf No, it won't. Thanks for reporting!

This warning occurs due to using JDK 21 to compile.

But we can make changes to the Flutter plugins to suppress it, made an internal note about that (objectbox-dart#127)!

If it bothers you, you can try to suppress the warning yourself. You likely need to add something like below to the relevant Gradle script in the android folder (note the below is for a KTS build script, it likely needs to be adapted to work in a Groovy build script typically used by Flutter projects):

// TODO Convert to Groovy to use in build.gradle (this is for a build.gradle.kts file)
tasks.withType(JavaCompile::class.java).configureEach {
    // Suppress JDK 21 warning about deprecated, but not yet removed, source and target value 8 support
    options.compilerArgs.add("-Xlint:-options")
}

Long term we need to use the Java 11 level to compile (Flutter appears to also prepare for that), but that has other complications (like a higher minimum supported Android SDK level).

@hagerf
Copy link

hagerf commented Jan 13, 2025

Thanks for the quick and detailed answer!
I assumed that it wouldn't. And thanks for the suggestions. Even though the warnings are a bit bothersome, I'm not a fan of suppressing warnings as they actually give useful information, in this case it means that some dependencies should be upgraded to compile with a newer version of Java. And even though I understand that raising the Android SDK level might not be something you want to do lightly, that's the real solution to this. Is there some thread or task to follow on Github for that?
Thanks again

@greenrobot-team
Copy link
Member Author

As part of this change I plan to suppress the warnings. And no, there is currently only an internal task to update to Java 11 level once it makes sense.

@hagerf
Copy link

hagerf commented Mar 30, 2025

Is this planned to be released soon? And maybe we could add this to this as well? I'm experiencing issues with updating some dependencies because object box is using old source_gen versions.

@greenrobot-team
Copy link
Member Author

greenrobot-team commented Mar 31, 2025

@hagerf Please avoid asking for updates, we will provide them when we have them. Reading and answering comments like this take time away from actually working on tasks.

@greenrobot-team greenrobot-team force-pushed the 127-fix-examples-android-studio-ladybug branch 3 times, most recently from aba06d2 to 3a2f021 Compare April 1, 2025 08:01
@greenrobot-team greenrobot-team added this to the 4.2.0 milestone Apr 1, 2025
@greenrobot-team greenrobot-team self-assigned this Apr 1, 2025
@greenrobot-team greenrobot-team force-pushed the 127-fix-examples-android-studio-ladybug branch 2 times, most recently from 7b065d6 to bb912e4 Compare April 1, 2025 08:38
At least Flutter SDK 3.7.12: This matches what can be built by CI due to
dependency constraints, so is the lowest version users could possibly be
using.

At least Flutter SDK 3.13.9: required to upgrade to Android Gradle
Plugin 8.2.1 (to support JDK 21) which requires using the namespace
property.

At least Flutter SDK 3.16.9: required to apply Flutter plugin using
plugins block, which is required to do further changes to support
JDK 21.
Also improve help output if run without arguments.
@greenrobot-team greenrobot-team force-pushed the 127-fix-examples-android-studio-ladybug branch from bb912e4 to 7fdd176 Compare April 1, 2025 09:00
@greenrobot-team greenrobot-team force-pushed the 127-fix-examples-android-studio-ladybug branch from 7fdd176 to 69dc5eb Compare April 1, 2025 09:25
@greenrobot-team greenrobot-team merged commit 8e68e68 into main Apr 1, 2025
18 checks passed
@greenrobot-team greenrobot-team deleted the 127-fix-examples-android-studio-ladybug branch April 1, 2025 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants